Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@semantic-release/npm
Advanced tools
Package description
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.
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
}
]
}
Standard Version is a utility for versioning using semver and CHANGELOG generation powered by conventional commits. Unlike @semantic-release/npm, it is more focused on manual versioning control and does not automatically publish to npm, but it automates version bumping and changelog generation.
Release It! is a CLI tool to automate versioning and package publishing, similar to @semantic-release/npm. It supports various plugins for different release steps, including changelog generation, version bumping, and publishing. Release It! offers more configurability for manual intervention in the release process compared to the fully automated approach of @semantic-release/npm.
Readme
Set of semantic-release plugins for publishing to a npm registry.
Verify the presence of the NPM_TOKEN
environment variable, create or update the .npmrc
file with the token and verify the token is valid.
Determine the last release of the package on the npm
registry.
Publish the package on the npm
registry.
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"]
}
}
FAQs
semantic-release plugin to publish a npm package
We found that @semantic-release/npm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).