LinuxCommandLibrary

npm-version

bumps package version

TLDR

Bump patch version
$ npm version patch
copy
Bump minor version
$ npm version minor
copy
Bump major version
$ npm version major
copy
Set specific version
$ npm version [1.2.3]
copy
Prerelease version
$ npm version prerelease
copy
No git tag
$ npm version patch --no-git-tag-version
copy

SYNOPSIS

npm version [version] [options]

DESCRIPTION

npm version bumps package version. Updates package.json and creates git tag.
The command manages version numbers. Follows semver conventions.

PARAMETERS

VERSION

Version or increment type.
patch
Increment patch (0.0.x).
minor
Increment minor (0.x.0).
major
Increment major (x.0.0).
--no-git-tag-version
Don't create git tag.
--help
Display help information.

CAVEATS

Creates git commit/tag by default. Working directory must be clean.

HISTORY

npm version provides semver version management with git integration.

SEE ALSO

npm(1), npm-publish(1), semver(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard