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

Fix #124: ^0.11.0-rc.2 should not match 0.11.0 #166

Closed
wants to merge 1 commit into from

Conversation

dhardy
Copy link

@dhardy dhardy commented Dec 11, 2017

This broke a few tests, but my reading of the rules is that these did not match spec:
https://docs.npmjs.com/misc/semver#tilde-ranges-123-12-1

On the other hand whether we want to make this change I don't know:

  • The current rules effectively mean 0.11.0-rc.2 < 0.11.0 — that test itself won't pass but the compatibility (^) rule allows people to treat it almost like it is (note though that ^0.11.0 will never match 0.11.0-rc.2 due to restriction on prerelease tags)
  • It may be valid to consider effectively x.y.z-A < x.y.z for all x/y/z/A (see my other comment)

@dhardy
Copy link
Author

dhardy commented Dec 11, 2017

Also CC @alexcrichton who commented on the semver rule (sorry to CC you so much; perhaps you shouldn't have so many talents!)

@steveklabnik
Copy link
Contributor

I believe I'm pro this change. It makes sense, and it's what npm does.

@dhardy
Copy link
Author

dhardy commented Jun 19, 2018

My apologies, but I do not believe what I did here is correct since semantically pre-release versions come before final versions (i.e. 1.2.3-beta.2 < 1.2.3). This is a confusing thing about semver which isn't stated explicitly in the spec, but I think it only makes sense that way (and some of the examples seem to confirm this). I.e. it should be valid to release 1.0.0-pre.1 and then release 1.0.0 afterwards.

@dhardy dhardy closed this Jun 19, 2018
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

Successfully merging this pull request may close these issues.

2 participants