Fix <= and > comparisons when compared against prerelease versions#50915
Merged
Fix <= and > comparisons when compared against prerelease versions#50915
<= and > comparisons when compared against prerelease versions#50915Conversation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes an issue with semver comparisons where
<=and>comparison against a partial version (i.e.,<=4.8or<=4.8.x) accidentally include prerelease versions of the next higher patch or minor version. this is because<=4.8is simplified to<4.9.0, but should have been simplified to<4.9.0-0because prerelease versions are considered lower than their non-prerelease counterparts. In the same vein,>comparisons like>4.8were incorrectly simplified to>=4.9.0, but should have been simplified to>=4.9.0-0.Fixes #50909