-
Notifications
You must be signed in to change notification settings - Fork 509
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
^ should not allow prerelease versions #64
Comments
This is tricky, because the code just replaces caret ranges with Maybe the way to do this is to add another kind of operator that says "don't allow pre-releases within a given range", but that just feels awful and hacky, even for SemVer. |
Would it be easier to test for the presence of a Perhaps a fixed suffix (that could apply to all operators?) would signify that prerelease versions are acceptable. |
If somebody wants prerelease they should be opting into that chain explicitly. i.e. under what scenarios would you want to automatically go from stable to prerelease? |
@timoxley I agree with you, pre-releases are described under semver point 9 are unstable and should not be automatically updated (Unless an opt-in operator existed, and used). I am all for a comprehensive fix to match |
@tomgco Well, the default of
Both |
What about simply splitting the version and pre-release into two separate ranges? This would be a little more tricky to implement and less efficient but It does give back a lot more flexibility. People wouldn't want alpha-versions in production, but they might want release candidates. An example could be a range defined like this:
|
We are heavily using prerelease versions and private registry to handle all our test processes. Will it be another major version of semver, i.e. |
and reject pre-release versions. The exception is 'accept' if a bound has the same prefix as a given version. See also: npm/node-semver#64
Fixed by #99 |
Expected:
^x.y.z-pre
should match>=
prereleases onx.y.z
, but not on any other version.^x.y.z
should not match any prerelease versions, period.The text was updated successfully, but these errors were encountered: