From 48493868f711aff24c040c0ff421c7a55a56e8f0 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Mon, 1 Jul 2019 09:31:20 +0300 Subject: [PATCH] refactor: replace `git-contributors` with `contributors-from-git` Closes GH-28. Reviewed-by: Christian Murphy Reviewed-by: Titus Wormer --- index.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 77e1b66..eb2b9b7 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ 'use strict' -const gitContributors = require('git-contributors').GitContributors +const gitContributors = require('contributors-from-git') const injectContributors = require('remark-contributors') const resolve = require('resolve') const heading = require('mdast-util-heading-range') @@ -45,7 +45,7 @@ module.exports = function attacher (opts) { pkg.contributors.forEach(indexContributor.bind(null, indices)) } - gitContributors.list(cwd, function (err, contributors) { + gitContributors(cwd, function (err, contributors) { if (err) { if (/does not have any commits yet/.test(err)) { file.message('could not get Git contributors as there are no commits yet', null, `${plugin}:no-commits`) diff --git a/package.json b/package.json index db4ed83..234a1cc 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "index.js" ], "dependencies": { + "contributors-from-git": "^1.0.0", "deep-dot": "0.0.2", - "git-contributors": "^0.2.3", "mdast-util-heading-range": "^2.1.0", "parse-author": "^2.0.0", "remark-contributors": "^4.0.0",