Skip to content

[BUG] $(npm version patch) no longer returns vX.Y.Z, but only X.Y.Z #2653

@asgerjensen

Description

@asgerjensen

This may have been on purpose, but i do not see the behavior change listed under breaking changes.
https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major

Current Behavior:

VERSION=$(npm version patch)
set tag to v1.0.1, but VERSION is 1.0.1

Expected Behavior:

NPM 6 behavior:

VERSION=$(npm version patch)
set tag to v1.0.1, and VERSION is v1.0.1

Steps To Reproduce:

  • npm init
  • echo $(npm version patch)

Environment:

Node 10, Node 15, npm 7.5.2
Ubuntu and Mac Catalina.

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions