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

Asterisk and pre-release versions #48

Closed
sagikazarmark opened this issue Mar 18, 2017 · 2 comments
Closed

Asterisk and pre-release versions #48

sagikazarmark opened this issue Mar 18, 2017 · 2 comments

Comments

@sagikazarmark
Copy link

I would assume that * constraint just accepts any version that is >=0.0.0, but it does not accept eg. 3.0.0-rc2.

Is this a bug or is it on purpose? (Can't recall at the moment how package managers behave in this scenario, but some of them also define a separate stability flag which modifies the behaviour of constraint checking, so in some cases the above example would work)

@mattfarina
Copy link
Member

@sagikazarmark * accepts any release version. 3.0.0-rc2 is a pre-release version. This is similar to how others treat it. For example, node-semver (which powers npm)...

± semver -r "*" 1.2.3 1.2.3-alpha.1
1.2.3

Per the spec, pre-release versions may not be compatible with their releases. * is currently designed to work on releases. Does that help?

You should be able to use >=0.0.0-1 and get everything including pre-releases. When a pre-release is included in the constraint they are then checked.

Does that help?

@sagikazarmark
Copy link
Author

Yes, it does, thanks for the detailed clarification.

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