-
-
Notifications
You must be signed in to change notification settings - Fork 313
feat(schemes): adds support for SemVer 2.0 (dot in pre-releases) (fix #1025) #1072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(schemes): adds support for SemVer 2.0 (dot in pre-releases) (fix #1025) #1072
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## master #1072 +/- ## ========================================== + Coverage 97.33% 97.53% +0.19% ========================================== Files 42 55 +13 Lines 2104 2477 +373 ========================================== + Hits 2048 2416 +368 - Misses 56 61 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c29db83 to
23e8291
Compare
@woile
woile
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work again 🎉
I'm in for a breaking change cleaning up some old deprecated flags.
I'll do a dedicated PR dropping all deprecations. Given it will breaking, maybe we should discuss what other breaking changes we want to include (like maybe #996 (comment)).
I'll open an issue to track those: #1073
23e8291 to
d30fa81
Compare
Uh oh!
There was an error while loading. Please reload this page.
Description
This PR adds a
semver2version scheme which is applying strictprereleaseformatting as described in SemVer 2 Item 9 and Semver 2.0.0 Item 11, meaning:As a consequence, the
1.2.3-alpha0form is not respecting those rules (1.2.3-alpha10has not proper precedence over1.2.3-alpha2), nor1.2.3-alpha.0-dev.0as its prerelease identifiers will bealpha,0-dev,0while it should bealpha,0,devand0.Note that Semver 2 is underspecified on this point (there is no formal description of what are the expected prerelease identifiers, only example) and so this PR chose to stay close to the examples (use of
alphaandbetainstead ofaandb), but this is choice, not a specification requirement.Checklist
./scripts/formatand./scripts/testlocally to ensure this change passes linter check and testExpected behavior
SemVer 2.0 versions are properly parsed and bumped, the resulting version is SemVer 2,0 compliant too.
Steps to Test This Pull Request
version_scheme = "semver2"in you commitizen configx.y.z-dev.Dx.y.z-alpha.Ax.y.z-alpha.A.dev.DAdditional context
Fixes #1025
Note
I think it's time for removing the
version-typedeprecated byvesion-scheme(in another PR)