Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
release-it
Advanced tools
Interactive release tool for Git repositories. Increment version, commit, tag, push, build, publish to npm. Supports to build and release to a distribution/component repository.
release-it is a versatile command-line tool for automating versioning and package publishing. It simplifies the release process by handling version bumps, changelogs, Git tags, and publishing to npm and other platforms.
Version Bumping
Automatically bumps the version of your project. In this example, it bumps the minor version.
release-it minor
Changelog Generation
Generates a changelog based on the commits since the last release.
release-it --changelog
Git Tagging
Creates a new Git tag for the release.
release-it --git.tag
NPM Publishing
Publishes the package to the npm registry.
release-it --npm.publish
Custom Hooks
Allows you to define custom hooks to run at various points in the release process.
{ "hooks": { "before:init": "echo 'This is a custom hook'" } }
standard-version is a tool for versioning and changelog generation based on conventional commits. It focuses on standardizing the release process and is less customizable compared to release-it.
semantic-release automates the versioning and package publishing process based on the commit history. It is highly configurable and integrates with CI/CD pipelines, making it more suitable for complex workflows compared to release-it.
lerna is a tool for managing JavaScript projects with multiple packages. It can handle versioning and publishing for monorepos, offering more advanced features for multi-package repositories compared to release-it.
Interactive release tool for Git repositories. Publish to npm. Optionally build and release to a distribution/component repository.
Automatically increments version in package.json, commit, tag, push, publish, done.
Obviously, Release It has released itself. Cool, heh?! There's also a Grunt plugin.
npm install release-it -g
Personally, I prefer to alias it to release
:
alias release="release-it"
The examples below assume this alias to be defined.
Release It can do a lot out-of-the-box, but has plenty of options to configure it.
$ release --help
Release It! v0.1.3
Usage: release <increment> [options]
Use e.g. "release minor" directly as shorthand for "release --increment=minor".
Options:
-c, --config Path to local configuration options [default: ".release.json"]
-d, --dry-run Do not touch or write anything, but show the commands and interactivity
-e, --debug Output exceptions
-f, --force Force tagging with Git
-h, --help Print help
-i, --increment Incrementing "major", "minor", or "patch" version; or specify version [default: "patch"]
-n, --non-interactive No interaction (assume default answers to questions)
-p, --publish Publish to npm (only in --non-interactive mode)
-v, --version Print version number
-V, --verbose Verbose output
{
"non-interactive": false,
"dry-run": false,
"verbose": false,
"force": false,
"pkgFiles": ["package.json"],
"increment": "patch",
"commitMessage": "Release %s",
"tagName": "%s",
"tagAnnotation": "Release %s",
"buildCommand": false,
"distRepo": false,
"distPkgFiles": null, /* Defaults to pkgFiles */
"distStageDir": ".stage",
"distBase": "dist",
"distFiles": ["**/*"],
"private": false,
"publish": false,
"publishPath": ".",
"githubTokenRef": "GITHUB_TOKEN",
"githubRelease": false,
"githubReleaseName": "Release %s",
"githubReleaseBodyCommand": "git log --pretty=format:'* %s (%h)' [REV_RANGE]"
}
Some projects use a special distribution repository.
There might be multiple reasons to do.
To release to a separate "distribution repo", you'll need to set distRepo
to a git endpoint (e.g. "git@github.com:webpro/awesome-component.git"
).
The tool assumes you've configured your SSH keys and remotes correctly. In case you need to configure things for GitHub, the following pages might be of help.
To create GitHub releases, you'll need to set githubRelease
to true
, get a GitHub access token, and make this available as the environment variable defined with githubTokenRef
. With the default settings, you could set it like this:
export GITHUB_TOKEN="f941e0..."
Place a .release.json
file in your project root, and Release It will use it to overwrite default settings. You can use --config
if you want to use another filename/location. Most options can be set on the command-line (these will have highest priority).
Many steps need your confirmation before execution.
By default, with the current repository:
pkgFiles
will be incremented.commitMessage
.tagName
(and tagAnnotation
). The %s
is replaced with the incremented version.githubReleaseName
and output of githubReleaseBodyCommand
).distRepo
, the package can be published directly to npm.Additionally, if a distribution repository is configured:
distBuildTask
shell command.distRepo
is cloned in distStageDir
.distFiles
are copied here (normalized by removing the distBase
from the target path).If present, your "private": true
setting in package.json will be respected and you will not be bothered with the question to publish to npm.
Release a "patch" update (increments the x
in 0.0.x
by one):
release
Release a patch, minor, major, or specific version:
release minor
release 0.8.3
release 2.0.0-rc.3
You can also do a dry run, which won't write/touch anything, but does output the commands it would execute, and show the interactivity:
release --dry-run
If you don't like questions and trust the tool, you can use the non-interactive
mode:
release --non-interactive
Provide a custom name for the GitHub release:
release --githubReleaseName="Awesome Ants"
Major dependencies:
The following Grunt plugins have been a source of inspiration:
Why did I need to create yet another "release" tool/plugin? I think it..
FAQs
Generic CLI tool to automate versioning and package publishing-related tasks.
The npm package release-it receives a total of 415,583 weekly downloads. As such, release-it popularity was classified as popular.
We found that release-it demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.