Socket
Socket
Sign inDemoInstall

semantic-release-contributors

Package Overview
Dependencies
528
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    semantic-release-contributors

semantic-release plugin to automatically update contributors list from git history


Version published
Weekly downloads
27
decreased by-46%
Maintainers
1
Install size
169 kB
Created
Weekly downloads
 

Readme

Source

📦🤖 semantic-release-contributors

semantic-release plugin to automatically update contributors list based on commits history

Semantic Release Commitizen friendly

Travis Codecov Known Vulnerabilities Maintainability

npm latest version npm bundle size npm bundle size LICENSE


StepDescription
prepareDetermine the contributors list by analyzing commits history.

Install

npm install semantic-release-contributors -D

How does it work

Whenener someone commit to the project, his/her name will be appended to the contributors list of your package.json file.

If Paul Smith commits to a project with the following set-up:

{
  "name": "your-project",
  "author": "Barney Rubble <b@rubble.com>",
  "contributors": [
    "John Doe <j@doe.com> (https://johndoe.com)"
  ]
}

The package.json file would then be updated to:

{
  "name": "your-project",
  "author": "Barney Rubble <b@rubble.com>",
  "contributors": [
    "John Doe <j@doe.com> (https://johndoe.com)",
    "Paul Smith <p.smith@domain.tld>"
  ]
}

NOTE: this package internally deserialize the contributors to objects (name, email, url) and make sure duplicated emails are removed. Contributors objects are then potentially re-serialized before being written to the package file (unless you opt for a different format)

Usage

The plugin can be configured in the semantic-release configuration file:

IMPORTANT: since this plugin acts on semantic-release's "prepare" step and do not commit the updated package.json file itself, it requires to be placed before "@semantic-release/git".

{
  "plugins": [
    // important: insert it before @semantic-release/git
    ["semantic-release-contributors", {
      "format": "string",
      "pkgRoot": "."
    }],
    // ...
    "@semantic-release/git"
    // ...
  ]
}

With this example:

  • the contributors will be stringified to name <email>
  • the package file containing the contributors will be read then updated in the current directory

Configuration

Options

OptionDescriptionDefault
formatstring or object. It defines which format will the contributors be written with to the package.json file.string
pkgRootDirectory path to publish..

Kill all humans

Keywords

FAQs

Last updated on 17 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc