Skip to content
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

Acceptance+handling of partial versions in - ranges not documented #76

Closed
cvrebert opened this issue Apr 3, 2014 · 3 comments
Closed

Comments

@cvrebert
Copy link
Contributor

cvrebert commented Apr 3, 2014

The only example of the - range operator in the README shows it being used with full versions, but some testcases have it also being used with incomplete versions, in particular with novel handling of incomplete upper-bounds: https://github.com/isaacs/node-semver/blob/v2.2.1/test/index.js#L491
This should be documented.

It's funny, the things you run into when trying to write a clean-room implementation...

@isaacs
Copy link
Contributor

isaacs commented Apr 3, 2014

So... on this one, I'm a bit torn.

I added the tests because I wanted to at least know if the behavior ever changes, just in case it would break anyone.

But, I'm tempted to say that a X.Y - A.B.C range should maybe be an error? At least, that's why it wasn't documented in the first place.

Out of curiosity, are you writing a clean-room implementation of this for? I've been meaning to document the range syntax as a proper specification eventually, maybe this could be a good justification for doing that, along with a comprehensive suite of tests etc.

@cvrebert
Copy link
Contributor Author

cvrebert commented Apr 3, 2014

But, I'm tempted to say that a X.Y - A.B.C range should maybe be an error?

Your call obviously. I basically just care about the syntax+semantics getting adequately doc'd/spec'd, regardless of what exactly the spec'd syntax+semantics are.

Out of curiosity, [what] are you writing a clean-room implementation of this for?

I'm writing a Python library that parses various ecosystems' dependency specifications (e.g. package.json, requirements.txt, pom.xml), which shall include understanding the version compatibility constraints, and I'm trying to support npm as one of the ecosystems.

isaacs added a commit that referenced this issue Sep 9, 2014
@isaacs
Copy link
Contributor

isaacs commented Sep 9, 2014

Fixed on v4, #99

isaacs added a commit that referenced this issue Sep 9, 2014
@isaacs isaacs closed this as completed in d89ba57 Sep 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants