-
Notifications
You must be signed in to change notification settings - Fork 47
Compare version number with rc is incorrect #38
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
Comments
I didn't check, but I think we compare the "rc3" and "rc11" using a string comparison. We don't compare the numbers themselves :( |
yeah.. I just checked in the code and that's the reason why rc3 is greater than rc11. May I create a PR fix that issue..? (If that is consider as an issue) |
Yeah definitely! Maybe just check the behavior on the original semver library (the npm one) to make sure they’re doing it too? |
Interesting thing... I checked the behavior on the npm semver and here is the result...
Above means rc11 is smaller than rc3. I think the npm also probably using the string comparison, but anyway I created a PR for that. Please let me know what you are thinking. |
Hi @vdurmont, any ideas about the comparison issue? |
@shuyingz if you are still interesting, I've made copy of this lib and fix bug reported by you. Look for version 2.0.1 |
Hi,
Hope you are doing well!
I am wondering if semver supports version with rc without a dot (.) - exp:
1.0.0-rc1
I have two version numbers -
1.0.0-rc3
and1.0.0-rc11
, and for the current lib, when I am trying to compare these two versions, it shown me that1.0.0-rc3
>1.0.0-rc11
but which is not making any sense to me.Can anybody please help?
Thanks!
The text was updated successfully, but these errors were encountered: