-
Notifications
You must be signed in to change notification settings - Fork 483
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
semver regular expression does not follow Semantic Versioning standard format #32
Comments
@isaacs I've proposed the inclusion of a BNF grammar in the Semantic Version standard. See semver/semver#110 |
Please test out v2.0. Either pull the master branch, or There's still a few allowances for |
I think it is ok if 1.2.3beta is allowed if it is treated like 1.2.3-beta. Most importantly and more generally, as long as all versions that comply to the Semantic Version standard are treated properly then it is ok if node-semver has extensions to allow versions with other syntax. |
In the latest code on master, every function will have an optional Moving forward, npm will use loose mode when evaluating others' package.json files, but strict mode when evaluating yours for publishing/etc. Maybe some day, we can remove loose mode. |
Slightly better regex for 2.0.0-rc.2 |
@bfloydgsn You're commenting on a 3-year-old issue. This is historical, and not a good place to put new things. If you'd like to make an improvement or have found a bug, please open a new PR or issue. Thanks. |
The above is the foundation of parsing in this module but it does not follow the format from the Semantic Version standard http://semver.org/
The first capturing group is "major".
The second capturing group is "minor".
The third capturing group is "patch".
The forth capturing group is "prerelease" (not including the preceding dash delimiter between patch and prerelease).
The "build" is non-capturing because it is not to be used in any comparisons.
The text was updated successfully, but these errors were encountered: