zafarkhaja / jsemver

Java implementation of the SemVer Specification
MIT License
429 stars 82 forks source link

Enhancements for ExpressionParser #17

Closed shayke closed 9 years ago

shayke commented 9 years ago

This library is great! I was missing some range comparisons as described in https://github.com/npm/node-semver Here is what I've added:

I'd really appreciate if this can be merged so I could use this library the same way it behaves in JS (mostly for implementing stuff for Bower and NPM). The key for this pull request is to be able to use Version.satisfies() and simply provide it with the supported ranges from bower and npm.

zafarkhaja commented 9 years ago

Hey @shayke, thanks for the contribution.

Before I take a closer look at your code, can we make it a separate feature branch forked from zafarkhaja:release-0.9.0 and create a pull request for zafarkhaja:release-0.9.0 and not for zafarkhaja:master as it is now? Because it makes it inconvenient to review your changes in isolation from mine... Although I'm not sure if GitHub allows creating pull requests for branches other than master.

Also, I'd like to draw your attention to the fact that even if we had the caret operator and x-ranges there would still be no full compatibility between jsemver expressions and node-semver ranges. In the past I've expressed my opinion on this but I tend to be more flexible recently because it seems there won't be a standard for the SemVer ranges in the foreseeable future, so I guess it's the library users who should shape it for now. So, I'm open to discussions.

shayke commented 9 years ago

GitHub doesn't allow pull requests into a new branch on the upstream, I created a new pull request https://github.com/zafarkhaja/jsemver/pull/18 If you want to put it into a new branch maybe create one and i'll create another pull request to that branch?

zafarkhaja commented 9 years ago

It looks like the new pull request does the job, so no need for more branches and this request. I'll review the code there. Thanks.