[BUG] inc premajor, preminor, and prepatch do the wrong thing if the version is already a pre-release.
Chưa có ai nhận issue này.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- JavaScript
- Star
- 5.5k
- Fork
- 598
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của npm/node-semver
-
semver:major
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
npm/node-semver#108 · 6 bình luận ·
-
Bug Needs Triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
npm/node-semver#906 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
npm/node-semver#904 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
npm/node-semver#900 ·
-
New issueNpmNdSrvĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
npm/node-semver#891 ·
Tất cả issue của npm/node-semver
Issue tương tự
-
Design only Leadership Survey SLFS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
bcgov/digital-journeys#2293 ·
-
Toolkit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
API Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jessepollak/home#1454 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mend: dependency security vulnerability untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
opensearch-project/OpenSearch-Dashboards#12822 ·
Maintainer thường phản hồi trong vòng 1 ngày