Socket
Socket
Sign inDemoInstall

@semantic-release/npm

Package Overview
Dependencies
150
Maintainers
4
Versions
130
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @semantic-release/npm

Set of semantic-release plugins to publish to a npm registry


Version published
Maintainers
4
Install size
5.35 MB
Created

Package description

What is @semantic-release/npm?

The @semantic-release/npm package is designed to automate the process of releasing new versions of npm packages. It updates the package version in package.json and publishes the package to the npm registry based on semantic versioning rules and the commit messages history. This tool is part of the Semantic Release ecosystem, which aims to fully automate the package release workflow, including determining the next version number, generating the release notes, and publishing the package.

What are @semantic-release/npm's main functionalities?

Update package version

This configuration snippet for the Semantic Release setup in the package.json file demonstrates how to automatically update the package version in package.json and publish the package to the npm registry. The 'npmPublish' option is set to true to enable publishing.

"release": {
  "prepare": [
    {
      "path": "@semantic-release/npm",
      "npmPublish": true
    }
  ]
}

Publish to npm registry

This configuration enables the automatic publishing of the package to the npm registry as part of the release process. It specifies that the @semantic-release/npm plugin should be used for the publishing step.

"release": {
  "publish": [
    {
      "path": "@semantic-release/npm",
      "npmPublish": true
    }
  ]
}

Other packages similar to @semantic-release/npm

Readme

Source

@semantic-release/npm

Set of semantic-release plugins for publishing to a npm registry.

Travis Codecov Greenkeeper badge

verifyConditions

Verify the presence of the NPM_TOKEN environment variable, create or update the .npmrc file with the token and verify the token is valid.

getLastRelease

Determine the last release of the package on the npm registry.

publish

Publish the package on the npm registry.

Configuration

For each plugin, the npm authentication token has to be configured with the environment variable NPM_TOKEN.

All the plugins are based on npm and will use the configuration from .npmrc. Any parameter returned by npm config list will be used by each plugin.

The registry and dist-tag can be configured in the package.json and will take precedence on the configuration in .npmrc:

{
  "publishConfig": {
    "registry": "https://registry.npmjs.org/",
    "tag": "latest"
  }
}

The plugins are used by default by semantic-release so no specific configuration is requiered to use them.

Each individual plugin can be disabled, replaced or used with other plugins in the package.json:

{
  "release": {
    "verifyConditions": ["@semantic-release/npm", "verify-other-condition"],
    "getLastRelease": "custom-get-last-release",
    "publish": ["@semantic-release/npm", "custom-publish"]
  }
}

Keywords

FAQs

Last updated on 30 Nov 2017

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