-
Notifications
You must be signed in to change notification settings - Fork 187
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
semver pattern 1.0.x admits the version 1.1.0-prerelease #127
Comments
It's actually not easy to have syntax for this. Prereleases are sorted lexicographically, e.g., On the other hand, having a flag separate to the range means you can't have complex constraints that include some prereleases and not others. For example, you can't express "every release >= 1.2.0, up to prereleases of 1.4.0". |
Had another look at the problems we encountered using It creates a small problem with the parsing of Git tags however, as they are often prefixed with a |
I'm ok with using |
Taken care of in release |
The library used by source-controller for semver ranges includes prereleases in ranges, unconditionally. That is, the range
1.0.x
includes1.1.0-prerelease
; and worse, there's no syntax for excluding prereleases.This is not the behaviour expected or wanted -- you would expect
1.0.x
to mean "all patch releases of 1.0". Failing that particular pattern working, you would at least want some way of expressing the latter, but there is none.I suggest either 1. using Masterminds/semver (with strict parsing); or, if there are just too many problems with that, forking blang and merging the PR that fixes ranges; or failing that, filtering prereleases before comparing them to the range (with, I suppose, the option to include them). The latter really should be implicit per the pattern, but it can at least be a sensibly defaulted option.
The text was updated successfully, but these errors were encountered: