-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
npm/node-semver
#380Labels
Bugthing that needs fixingthing that needs fixingEnhancementnew feature or improvementnew feature or improvementRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Currently --preid only works correctly with non-numeric value. I have actually root caused it down to a bug in npm/node-semver and submitted a PR to fix it: npm/node-semver#380. I'm opening this issue for tracking purpose and hopefully to get some attention from the npm team.
Current Behavior:
Case 1:
$ cat package.json
{
"name": "test",
"version": "1.0.0-2021.0"
}
$ npm version prerelease --preid 2021
npm ERR! Version not changed
Case 2:
$ cat package.json
{
"name": "test",
"version": "1.0.0-2021.1"
}
$ npm version prerelease --preid 2021
v1.0.0-2021.0
Expected Behavior:
Case 1:
$ cat package.json
{
"name": "test",
"version": "1.0.0-2021.0"
}
$ npm version prerelease --preid 2021
v1.0.0-2021.1
Case 2:
$ cat package.json
{
"name": "test",
"version": "1.0.0-2021.1"
}
$ npm version prerelease --preid 2021
v1.0.0-2021.2
Environment:
$ node --version
v16.0.0
$ npm --version
7.10.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingEnhancementnew feature or improvementnew feature or improvementRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release