Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-authors-cli

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-authors-cli - npm Package Compare versions

Comparing version 1.0.50 to 1.0.51

14

bin/help.js

@@ -13,12 +13,12 @@ 'use strict'

Options
${gray('--')}cwd ${gray(
'Specify the path for running the command (defaults to process.cwd())'
${gray('--')}cwd ${gray('Specify the path for running the command (defaults to process.cwd())')}
${gray('--')}ignore-pattern ${gray(
'Skip authors if their name or email match pattern (allow multiple)'
)}
${gray('--')}save ${gray(
${gray('--')}print ${gray(
'Show information from the terminal, also `print=verbose` to show more information. (defaults to true)'
)}
${gray('--')}save ${gray(
'Write contributors into package.json if it exists (defaults to true)'
)}
${gray('--')}print ${gray('Show information from the terminal (defaults to true)')}
${gray('--')}ignore-pattern ${gray(
'Skip authors if their name or email match pattern (allow multiple)'
)}

@@ -25,0 +25,0 @@ Examples

@@ -27,3 +27,3 @@ #!/usr/bin/env node

cwd: process.cwd(),
print: true,
print: '',
save: true,

@@ -34,2 +34,4 @@ ignorePattern: []

if (flags.print === '') flags.print = true
const loadPkg = path => {

@@ -54,2 +56,15 @@ try {

const renderContributorsVerbose = (contributors, maxIndent) => {
const maxIndexIndent = String(contributors.length).length
console.log()
contributors.forEach(({ author, commits, name }, index) => {
const prettyAuthor = colors.gray(author.replace(name, colors.white(name)))
const prettyCommits = colors.white(`${indent(maxIndent, commits)}${commits}`)
const humanIndex = index + 1
const prettyIndex = colors.gray(`${indent(maxIndexIndent, humanIndex)}${humanIndex}`)
console.log(` ${prettyIndex} ${prettyCommits} ${prettyAuthor}`)
})
}
const renderContributors = (contributors, maxIndent) => {

@@ -140,3 +155,8 @@ console.log()

if (contributors.length) {
if (print) renderContributors(contributors, maxIndent)
if (print) {
(print === 'verbose' ? renderContributorsVerbose : renderContributors)(
contributors,
maxIndent
)
}
const pkg = await loadPkg(pkgPath)

@@ -143,0 +163,0 @@

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/Kikobeats/git-authors-cli",
"version": "1.0.50",
"version": "1.0.51",
"bin": {

@@ -8,0 +8,0 @@ "git-authors": "bin/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc