Skip to content

Fix <= and > comparisons when compared against prerelease versions#50915

Merged
rbuckton merged 2 commits intomainfrom
fix-semver-range
Sep 28, 2022
Merged

Fix <= and > comparisons when compared against prerelease versions#50915
rbuckton merged 2 commits intomainfrom
fix-semver-range

Conversation

@rbuckton
Copy link
Copy Markdown
Contributor

@rbuckton rbuckton commented Sep 23, 2022

This fixes an issue with semver comparisons where <= and > comparison against a partial version (i.e., <=4.8 or <=4.8.x) accidentally include prerelease versions of the next higher patch or minor version. this is because <=4.8 is simplified to <4.9.0, but should have been simplified to <4.9.0-0 because prerelease versions are considered lower than their non-prerelease counterparts. In the same vein, > comparisons like >4.8 were incorrectly simplified to >=4.9.0, but should have been simplified to >=4.9.0-0.

Fixes #50909

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typesVersions should not have 4.9.0-beta <=4.8

6 participants