-
Notifications
You must be signed in to change notification settings - Fork 130
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
Wrong result when comparing pre-release and normal version #6
Comments
eviweb
added a commit
to eviweb/semver-tool
that referenced
this issue
Sep 24, 2015
a pre-release version should be considered lesser than a normal version Signed-off-by: Eric Villard <dev@eviweb.fr>
Merged
eviweb
added a commit
to eviweb/semver-tool
that referenced
this issue
Sep 24, 2015
the expected comparison result for the normal version 1.0.1 was not correct and resulted in test failure Signed-off-by: Eric Villard <dev@eviweb.fr>
I think there is a regression for this. version 2.1.0 has the same behavior. When running |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi François,
as indicated in paragraph 11. of the semver specification v2.0.0:
When major, minor, and patch are equal, a pre-release version has lower precedence than a normal version, which means
1.0.0-alpha < 1.0.0
so running
$ semver compare 1.0.0 1.0.0-alpha
should result in1
when it currently returns-1
best regards
Eric
The text was updated successfully, but these errors were encountered: