-
Notifications
You must be signed in to change notification settings - Fork 47
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
Issue with hyphen sign when used in build and pre release section #16
Comments
I confirm, the issue happens also in the subversion. ie: http://ant.apache.org/ivy/history/2.1.0/settings/version-matchers.html |
We have the same issue with the NPM Requirement that see tests |
I am seeing an issue here as well when parsing NPM Requirements. I'm using version 3.1.0 Example When this is parsed, the first item on the list is a HYPHEN type token, so it goes down the 'upper and lower' path. On lines 336 and 337 of Requirement.java, you are trying to get two more parts, expecting that it's the left and right side of the range, but since there's a caret, you are getting the caret in In the Semver class constructor, calling 'trim()' on the value is causing an NPE. When you use a non number i.e. So the root cause for my issue is because it is interpreting the Requirement as the wrong type of range i.e. not a caret range, but a hyphen range. |
@KristianShishoev if you are still interesting, I've made copy of this lib and fix bug reported by you. Look for version 2.0.1 |
According to specification versions with hyphen sign in build section should be valid versions.
In our project when we try to parse such versions we recieve exception.
Example version: 1.2.3+123-abc
Also when there are more than one hyphen sign in pre release section version is not parsed correctly.
For example if we have following version: 1.2.3-alpha-abc+123 when parsed it gets cut to 1.2.3-alpha-abc+123
The text was updated successfully, but these errors were encountered: