-
Notifications
You must be signed in to change notification settings - Fork 81
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
AND and OR operators differ from common semver range implementations #23
Comments
Just noticed the same thing for the and operator which both other libraries define as whitespace. Example:
|
Unfortunately it was made so intentionally. Here is the final grammar and here is my motivation behind it. However, I'm planning to cover the whole node-semver grammar in future releases as an extension to the library along with some other common grammars such as Maven's version ranges. |
There are a lot of differences currently. Would you accept a PR to add full node |
@yuchi it wasn't supposed to be fully compatible with If you still want to contribute with less radical changes we can discuss those in advance. I would also be very happy to accept your help with the |
What I’d like If I can make jsemver pass node-semver unit tests, without adding too much o it, would you review the changes? |
It's not about amount of code you'll add, it's about complexity you'll bring making the code less readable and maintainable. If you can do that without complicating the parser then sure. why not, I'll gladly review the changes. But I still believe the two grammars should be kept separate each in its own parser. |
Wasn't very hard to implement after all. Will be shipped with 0.10.0. |
Please also have a look at https://github.com/yuchi/java-npm-semver which passes the full npm’s semver test suite (as of 2017!) |
Hey Yuchi, thanks for the link! This might come useful once I start implementing the node-semver ranges syntax. |
I noticed that the OR (
|
) notation differs from other implementation like node-semver and the Haskell implementation.Example:
Is this on purpose or accidental?
For me this is quite unfortunate as I cannot parse security advisories due to notational differences.
The text was updated successfully, but these errors were encountered: