git-authors-cli
Advanced tools
Comparing version 1.0.39 to 1.0.40
@@ -53,3 +53,3 @@ #!/usr/bin/env node | ||
type: 'string', | ||
isMultiple: true, | ||
isMultiple: true | ||
} | ||
@@ -119,3 +119,4 @@ } | ||
const { author: pkgAuthor = {} } = require(pkgPath) | ||
const ignorePatternReg = (ignorePattern.length === 0) ? undefined : new RegExp(`(${ignorePattern.join('|')})`,'i'); | ||
const ignorePatternReg = | ||
ignorePattern.length === 0 ? undefined : new RegExp(`(${ignorePattern.join('|')})`, 'i') | ||
@@ -145,3 +146,8 @@ const contributors = extractContributors(stdout) | ||
.filter(({ author }) => !(ignorePatternReg && ignorePatternReg.test(author))) | ||
.sort((c1, c2) => c2.commits - c1.commits) | ||
.sort( | ||
(c1, c2) => | ||
c1.commits - c2.commits || // sort by commit count | ||
c1.email.localeCompare(c2.email) || // if equal, sort by email | ||
c1.name.toLowerCase().localeCompare(c2.name.toLowerCase()) // if equal, sort by name | ||
) | ||
@@ -148,0 +154,0 @@ const maxIndent = contributors.length ? getMaxIndent(contributors, 'commits') : '' |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://nicedoc.io/Kikobeats/git-authors-cli", | ||
"version": "1.0.39", | ||
"version": "1.0.40", | ||
"bin": { | ||
@@ -75,17 +75,2 @@ "git-authors": "bin/index.js", | ||
], | ||
"scripts": { | ||
"clean": "rm -rf node_modules", | ||
"contributors": "(finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true", | ||
"lint": "standard-markdown && standard", | ||
"postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)", | ||
"prerelease": "npm run update:check && npm run contributors", | ||
"pretest": "npm run lint", | ||
"pretty": "prettier-standard index.js {core,test,bin,scripts}/**/*.js --single-quote --print-width 100", | ||
"release": "standard-version -a", | ||
"release:github": "conventional-github-releaser -p angular", | ||
"release:tags": "git push --follow-tags origin HEAD:master", | ||
"test": "c8 ava", | ||
"update": "ncu -u", | ||
"update:check": "ncu -- --error-level 2" | ||
}, | ||
"preferGlobal": true, | ||
@@ -112,3 +97,19 @@ "license": "MIT", | ||
"pre-commit": "npx nano-staged" | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf node_modules", | ||
"contributors": "(finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true", | ||
"lint": "standard-markdown && standard", | ||
"postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)", | ||
"prerelease": "npm run update:check && npm run contributors", | ||
"pretest": "npm run lint", | ||
"pretty": "prettier-standard index.js {core,test,bin,scripts}/**/*.js --single-quote --print-width 100", | ||
"release": "standard-version -a", | ||
"release:github": "conventional-github-releaser -p angular", | ||
"release:tags": "git push --follow-tags origin HEAD:master", | ||
"test": "c8 ava", | ||
"update": "ncu -u", | ||
"update:check": "ncu -- --error-level 2" | ||
}, | ||
"readme": "# git-authors-cli\n\n![Last version](https://img.shields.io/github/tag/Kikobeats/git-authors-cli.svg?style=flat-square)\n[![NPM Status](https://img.shields.io/npm/dm/git-authors-cli.svg?style=flat-square)](https://www.npmjs.org/package/git-authors-cli)\n\n![](demo.png)\n\n> Detects project contributors and add it into `package.json`\n\nAdd credits for people that help you ship code is important, but it is a task easy to forget. This tool makes it easy to integrate as part of your release process, so your contributors are always up to date ✨.\n\n## Install\n\n```bash\n$ npm install git-authors-cli --global\n```\n\n## CLI\n\n```bash\n$ git-authors-cli --help\n\n Print all contributors and add it into package.json\n\n Usage\n $ git-authors-cli [options]\n\n Options\n --cwd Specify the path for running the command (defaults to process.cwd())\n --save Write contributors into package.json if it exists (defaults to true)\n --print Show information from the terminal (defaults to true)\n --ignore-pattern Skip authors if their name or email match pattern (allow multiple)\n\n Examples\n $ git-authors-cli # Get contributors for the current path project.\n $ git-authors-cli ~/Projects/metascraper # Get contributors for a specific path project.\n $ git-authors-cli --ignore-pattern noreply.github.com # Ignore github public surrogate emails.\n```\n\n## License\n\n**git-authors-cli** © [Kiko Beats](https://kikobeats.com), released under the [MIT](https://github.com/Kikobeats/git-authors-cli/blob/master/LICENSE.md) License.<br>\nAuthored and maintained by Kiko Beats with help from [contributors](https://github.com/Kikobeats/git-authors-cli/contributors).\n\n> [kikobeats.com](https://kikobeats.com) · GitHub [Kiko Beats](https://github.com/Kikobeats) · Twitter [@Kikobeats](https://twitter.com/Kikobeats)\n" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13692
164