[BUG] inc premajor, preminor, and prepatch do the wrong thing if the version is already a pre-release.
还没有人认领这个 Issue。
评估
这个 Issue 还没有评估数据。
描述
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
From the docs:
premajor in one call will bump the version up to the next major version and down to a prerelease of that major version. preminor, and prepatch work the same way.
If we do these steps in isolation (using the internal, "pre" that does the down to a prerelease) we get:
> semver.inc('2.0.0-pre', 'major')
'2.0.0'
> semver.inc('2.0.0', 'pre')
'2.0.0-0'
But if we do premajor
> semver.inc('2.0.0-pre', 'premajor')
'3.0.0-0'
Expected Behavior
premajor et al should "do what it says on the tin", and not jump an extra major/minor/patch.
Steps To Reproduce
No response
Environment
- 主要语言
- JavaScript
- 星标
- 5.5k
- 派生
- 607
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
npm/node-semver 的其他 Issue
-
Bug Needs Triage
难度 2/5 1-3 小时 新手友好度 84/100
npm/node-semver#908 ·
-
semver:major
难度 2/5 1-3 小时 新手友好度 68/100
npm/node-semver#108 · 6 条评论 ·
-
Bug Needs Triage
难度 3/5 1-2 天 新手友好度 64/100
npm/node-semver#909 ·
-
Bug Needs Triage
难度 3/5 1-2 天 新手友好度 68/100
npm/node-semver#906 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 76/100
npm/node-semver#904 ·
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
openlibhums/janeway#5604 ·
维护者通常 1 天内回复
-
[BUG] Generic OSC does not initialize OSC client on startup when "Listen for Feedback" is disabled未关闭
难度 2/5 1-3 小时 新手友好度 86/100
-
area/statement-execution TS conversion
难度 2/5 1-3 小时 新手友好度 76/100
scylladb/nodejs-rs-driver#584 ·
维护者通常 2 天内回复
-
documentation good first issue help wanted
难度 1/5 1-3 小时 新手友好度 92/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
维护者通常 3 天内回复