npm version: Bump and Tag Releases
npm version updates the version, commits, and creates a git tag.
In a release pipeline npm version standardizes the bump. Disable its git actions when a separate tool owns tagging.
Common usage
npm version patch|minor|major--no-git-tag-version- bump only--preid=rcwithprerelease- respects semver
Example in CI
Bump without creating a tag (the workflow tags separately).
shell
npm version patch --no-git-tag-versionIn CI
If you let npm version push tags, configure a git identity first. Many teams use semantic-release instead to derive versions from commits.
Key takeaways
npm versionbumps, commits, and tags.--no-git-tag-versionfor bump-only.- Configure git identity for tagging in CI.