@werk/command-version v3.3.14
Werk Version Command
Update versions.
Install
npm i -D @werk/command-version
Set Versions
werk version 1.2.3
Bump Versions
werk version patch
This command is using the semver package inc()
function.
The basic bump types are as follows.
major
: 1.2.3 → 2.0.0 → 3.0.0minor
: 1.2.3 → 1.3.0 → 1.4.0patch
: 1.2.3 → 1.2.4 → 1.2.5premajor
: 1.2.3 → 2.0.0-0 → 3.0.0-0preminor
: 1.2.3 → 1.3.0-0 → 1.4.0-0prepatch
: 1.2.3 → 1.2.4-0 → 1.2.5-0prerelease
: 1.2.3 → 1.2.4-0 → 1.2.4-1
Use the --preid
option to set the prerelease identifier.
premajor --preid=alpha
: 1.2.3 → 2.0.0-alpha.0 → 3.0.0-alpha.0preminor --preid=alpha
: 1.2.3 → 1.3.0-alpha.0 → 1.4.0-alpha.0prepatch --preid=alpha
: 1.2.3 → 1.2.4-alpha.0 → 1.2.5-alpha.0prerelease --preid=alpha
: 1.2.3 → 1.2.4-alpha.0 → 1.2.4-alpha.1
Note the difference between prepatch
and prerelease
. The former will always bump the patch number and reset the prerelease number to zero. The later will only bump the patch number if the current version is not a prerelease, and will increment the prerelease number otherwise.
Bump Versions Automatically
If you're using Git with conventional commit messages, you can use the auto
bump type to automatically choose the correct bump level.
werk version auto
This will also update the CHANGELOG.md
file, unless the --no-changelog
flag is set.
Note: The auto
bump type is intended for releases, so the --preid
option is not supported. While working with prereleases, use the basic bump command instead.
Note: The auto
bump type requires a Git repository with a clean working tree.
Dependents
When a workspace version update is greater than a patch, any dependent workspaces will also be updated so that they have a minimum dependency on the new version, and the dependent's version will also be minimally (prerelease or patch number) bumped.
Graduating Prereleases
When the current version is a prerelease, the version
command will refuse to bump the version to a non-prerelease version. This is to prevent accidentally releasing a prerelease version. You need to explicitly set or bump the version to a non-prerelease in this case.
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
5 months ago
8 months ago
5 months ago
8 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
7 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
6 months ago
8 months ago
6 months ago
8 months ago
7 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago