git-authors-cli
Advanced tools
Comparing version 1.0.51 to 1.0.52
@@ -135,7 +135,2 @@ #!/usr/bin/env node | ||
.filter(({ name }) => !REGEX_BOT_NAMES.test(name)) | ||
.filter(({ email }) => | ||
isString(pkgAuthor) | ||
? !new RegExp(pkgAuthor, 'i').test(email) | ||
: !isSameEmail(pkgAuthor.email, email) | ||
) | ||
.filter(({ email }) => emailRegex().test(email)) | ||
@@ -154,3 +149,3 @@ .filter(({ author }) => !(ignorePatternReg && ignorePatternReg.test(author))) | ||
if (print) { | ||
(print === 'verbose' ? renderContributorsVerbose : renderContributors)( | ||
;(print === 'verbose' ? renderContributorsVerbose : renderContributors)( | ||
contributors, | ||
@@ -163,3 +158,9 @@ maxIndent | ||
if (pkg && save) { | ||
const newContributors = contributors.map(({ author }) => author) | ||
const newContributors = contributors | ||
.filter(({ email }) => | ||
isString(pkgAuthor) | ||
? !new RegExp(pkgAuthor, 'i').test(email) | ||
: !isSameEmail(pkgAuthor.email, email) | ||
) | ||
.map(({ author }) => author) | ||
const newPkg = { ...pkg, contributors: newContributors } | ||
@@ -166,0 +167,0 @@ await jsonFuture.saveAsync(pkgPath, newPkg) |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/Kikobeats/git-authors-cli", | ||
"version": "1.0.51", | ||
"version": "1.0.52", | ||
"bin": { | ||
@@ -8,0 +8,0 @@ "git-authors": "bin/index.js", |
12562
177