Gathering detailed insights and metrics for release-it
Gathering detailed insights and metrics for release-it
Gathering detailed insights and metrics for release-it
Gathering detailed insights and metrics for release-it
🚀 Automate versioning and package publishing
npm install release-it
Typescript
Module System
Min. Node Version
Node Version
NPM Version
60.5
Supply Chain
93.1
Quality
89.7
Maintenance
100
Vulnerability
95.3
License
JavaScript (99.56%)
Handlebars (0.44%)
Total Downloads
54,010,664
Last Day
57,199
Last Week
464,507
Last Month
2,296,476
Last Year
21,565,780
8,109 Stars
1,843 Commits
537 Forks
33 Watching
8 Branches
114 Contributors
Latest Version
17.11.0
Package Id
release-it@17.11.0
Unpacked Size
260.28 kB
Size
55.63 kB
File Count
72
NPM Version
11.0.0
Node Version
22.12.0
Publised On
23 Dec 2024
Cumulative downloads
Total Downloads
Last day
-38.7%
57,199
Compared to previous day
Last week
-11.7%
464,507
Compared to previous week
Last month
-3.1%
2,296,476
Compared to previous month
Last year
77.1%
21,565,780
Compared to previous year
24
24
🚀 Generic CLI tool to automate versioning and package publishing-related tasks:
package.json
)Use release-it for version management and publish to anywhere with its versatile configuration, a powerful plugin system, and hooks to execute any command you need to test, build, and/or publish your project.
Are you using release-it at work? Please consider sponsoring me!
Although release-it is a generic release tool, most projects use it for projects with npm packages. The recommended way to install release-it uses npm and adds some minimal configuration to get started:
1npm init release-it
Alternatively, install it manually, and add the release
script to package.json
:
1npm install -D release-it
1{ 2 "name": "my-package", 3 "version": "1.0.0", 4 "scripts": { 5 "release": "release-it" 6 }, 7 "devDependencies": { 8 "release-it": "^16.1.0" 9 } 10}
Run release-it from the root of the project using either npm run
or npx
:
1npm run release 2npx release-it
You will be prompted to select the new version, and more prompts will follow based on your configuration.
Using a monorepo? Please see this monorepo recipe.
Per-project installation as shown above is recommended, but global installs are supported as well:
npm install -g release-it
brew install release-it
Use Release It! - Containerized to run it in any environment as a standardized container without the need for a Node environment. Thanks Juan Carlos!
Here's a list of interesting external resources:
Want to add yours to the list? Just open a pull request!
Out of the box, release-it has sane defaults, and plenty of options to configure it. Most projects use a
.release-it.json
file in the project root, or a release-it
property in package.json
.
Here's a quick example .release-it.json
:
1{ 2 "$schema": "https://unpkg.com/release-it@17/schema/release-it.json", 3 "git": { 4 "commitMessage": "chore: release v${version}" 5 }, 6 "github": { 7 "release": true 8 } 9}
→ See Configuration for more details.
By default, release-it is interactive and allows you to confirm each task before execution:
By using the --ci
option, the process is fully automated without prompts. The configured tasks will be executed as
demonstrated in the first animation above. In a Continuous Integration (CI) environment, this non-interactive mode is
activated automatically.
Use --only-version
to use a prompt only to determine the version, and automate the rest.
How does release-it determine the latest version?
package.json
, its version
will be used (see npm to skip this).0.0.0
will be used as the latest version.Alternatively, a plugin can be used to override this (e.g. to manage a VERSION
or composer.json
file):
Add the --release-version
flag to print the next version without releasing anything.
Git projects are supported well by release-it, automating the tasks to stage, commit, tag and push releases to any Git remote.
→ See Git for more details.
GitHub projects can have releases attached to Git tags, containing release notes and assets. There are two ways to add GitHub releases in your release-it flow:
GITHUB_TOKEN
)→ See GitHub Releases for more details.
GitLab projects can have releases attached to Git tags, containing release notes and assets. To automate GitLab releases:
gitlab.release: true
→ See GitLab Releases for more details.
By default, release-it generates a changelog, to show and help select a version for the new release. Additionally, this changelog serves as the release notes for the GitHub or GitLab release.
The default command is based on git log ...
. This setting (git.changelog
) can be overridden. To further
customize the release notes for the GitHub or GitLab release, there's github.releaseNotes
or gitlab.releaseNotes
.
Make sure any of these commands output the changelog to stdout
. Note that release-it by default is agnostic to commit
message conventions. Plugins are available for:
To print the changelog without releasing anything, add the --changelog
flag.
→ See Changelog for more details.
With a package.json
in the current directory, release-it will let npm
bump the version in package.json
(and
package-lock.json
if present), and publish to the npm registry.
→ See Publish to npm for more details.
With release-it, it's easy to create pre-releases: a version of your software that you want to make available, while
it's not in the stable semver range yet. Often "alpha", "beta", and "rc" (release candidate) are used as identifiers for
pre-releases. An example pre-release version is 2.0.0-beta.0
.
→ See Manage pre-releases for more details.
Use --no-increment
to not increment the last version, but update the last existing tag/version.
This may be helpful in cases where the version was already incremented. Here are a few example scenarios:
release-it --no-increment --no-npm
to skip the npm publish
and try pushing the same Git tag again.Use script hooks to run shell commands at any moment during the release process (such as before:init
or
after:release
).
The format is [prefix]:[hook]
or [prefix]:[plugin]:[hook]
:
part | value |
---|---|
prefix | before or after |
plugin | version , git , npm , github , gitlab |
hook | init , bump , release |
Use the optional :plugin
part in the middle to hook into a life cycle method exactly before or after any plugin.
The core plugins include version
, git
, npm
, github
, gitlab
.
Note that hooks like after:git:release
will not run when either the git push
failed, or when it is configured not to
be executed (e.g. git.push: false
). See execution order for more details on execution order of plugin lifecycle
methods.
All commands can use configuration variables (like template strings). An array of commands can also be provided, they will run one after another. Some example release-it configuration:
1{ 2 "hooks": { 3 "before:init": ["npm run lint", "npm test"], 4 "after:my-plugin:bump": "./bin/my-script.sh", 5 "after:bump": "npm run build", 6 "after:git:release": "echo After git push, before github release", 7 "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}." 8 } 9}
The variables can be found in the default configuration. Additionally, the following variables are exposed:
1version 2latestVersion 3changelog 4name 5repo.remote, repo.protocol, repo.host, repo.owner, repo.repository, repo.project 6branchName 7releaseUrl
All variables are available in all hooks. The only exception is that the additional variables listed above are not yet
available in the init
hook.
Use --verbose
to log the output of the commands.
For the sake of verbosity, the full list of hooks is actually: init
, beforeBump
, bump
, beforeRelease
, release
or afterRelease
. However, hooks like before:beforeRelease
look weird and are usually not useful in practice.
Note that arguments need to be quoted properly when used from the command line:
1release-it --'hooks.after:release="echo Successfully released ${name} v${version} to ${repo.repository}."'
Using Inquirer.js inside custom hook scripts might cause issues (since release-it also uses this itself).
Use --dry-run
to show the interactivity and the commands it would execute.
→ See Dry Runs for more details.
release-it --verbose
(or -V
), release-it prints the output of every user-defined hook.release-it -VV
, release-it also prints the output of every internal command.NODE_DEBUG=release-it:* release-it [...]
to print configuration and more error details.Use verbose: 2
in a configuration file to have the equivalent of -VV
on the command line.
Since v11, release-it can be extended in many, many ways. Here are some plugins:
Plugin | Description |
---|---|
@release-it/bumper | Read & write the version from/to any file |
@release-it/conventional-changelog | Provides recommended bump, conventional-changelog, and updates CHANGELOG.md |
@release-it/keep-a-changelog | Maintain CHANGELOG.md using the Keep a Changelog standards |
@release-it-plugins/lerna-changelog | Integrates lerna-changelog into the release-it pipeline |
@jcamp-code/release-it-changelogen | Use @unjs/changelogen for versioning and changelog |
@release-it-plugins/workspaces | Releases each of your projects configured workspaces |
release-it-calver-plugin | Enables Calendar Versioning (calver) with release-it |
@grupoboticario/news-fragments | An easy way to generate your changelog file |
@j-ulrich/release-it-regex-bumper | Regular expression based version read/write plugin for release-it |
@jcamp-code/release-it-dotnet | Use .csproj or .props file for versioning, automate NuGet publishing |
release-it-pnpm | Add basic support for pnpm workspaces, integrates with bumpp and changelogithub |
changesets-release-it-plugin | Combine Changesets changelog management with release-it |
Internally, release-it uses its own plugin architecture (for Git, GitHub, GitLab, npm).
→ See all release-it plugins on npm.
→ See plugins for documentation to write plugins.
While mostly used as a CLI tool, release-it can be used as a dependency to integrate in your own scripts. See use release-it programmatically for example code.
The latest major version is v17, supporting Node.js 18 and up (as Node.js v16 is EOL). The previous major version was v16, supporting Node.js 16. Use release-it v15 for environments running Node.js v14. Also see CHANGELOG.md.
Are you using release-it at work? Please consider sponsoring me!
No vulnerabilities found.
Reason
28 commit(s) and 20 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
3 existing vulnerabilities detected
Details
Reason
Found 12/30 approved changesets -- score normalized to 4
Reason
branch protection is not maximal on development and all release branches
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More