From 85d6f712f2104bff92f3b587eedda36df43163c0 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 4 Aug 2021 11:51:24 +0200 Subject: [PATCH] Update `remark-contributors` --- index.js | 12 +++--------- package.json | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index 35a8ff5..c3bcbb2 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ import path from 'path' import gitContributors from 'contributors-from-git' -import injectContributors from 'remark-contributors' +import remarkContributors from 'remark-contributors' import {read} from 'to-vfile' import {findUpOne} from 'vfile-find-up' import {loadPlugin} from 'load-plugin' @@ -169,18 +169,12 @@ export default function remarkGitContributors(options) { formatters.social = false } - injectContributors({ + remarkContributors({ contributors, formatters, appendIfMissing: options.appendIfMissing, align: 'left' - })(root, file, (error) => { - if (error) { - reject(error) - } else { - resolve() - } - }) + })(root, file).then(resolve, reject) } }) } diff --git a/package.json b/package.json index 36bfaa1..414d357 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "load-plugin": "^4.0.0", "mdast-util-heading-range": "^3.0.0", "parse-author": "^2.0.0", - "remark-contributors": "^5.0.0", + "remark-contributors": "^6.0.0", "to-vfile": "^7.0.0", "vfile-find-up": "^6.0.0" },