Relax x range checks with prerelease ID

Description

npm semver will ONLY match a pre release id if the major minor and patch versions are all the same between the version and the incoming range.

i.e.

  • The version 1.2.3-rc.2 satisfies the range >1.2.3-rc.1

  • But the version 1.2.4-rc.2 DOES NOT satisfy the range >1.2.3-rc.1

  • Also the version 1.2.3-rc.2 DOES NOT satisfy the range >1.x.x-rc.1 (or more simply, 1-rc.1)

I'm fine with bullets 1 and 2, but I'd really like to relax bullet three, so if you don't explicitly provide a minor or patch in your range, we don't make it match. This will allow you to do this

instead of being forced to do this

i.e., just grab the latest snapshot build from ANY version starting with 5.

Activity

Show:

Brad WoodMarch 8, 2022 at 6:23 PM

See new tests added to the semantic vesrion library’s test suite

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created March 8, 2022 at 6:22 PM
Updated March 8, 2022 at 6:23 PM
Resolved March 8, 2022 at 6:23 PM