fix: align caret includePrerelease lower bounds#872
Merged
owlstronaut merged 1 commit intoJun 8, 2026
Conversation
mbtools
reviewed
Jun 7, 2026
mbtools
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the fix! LGTM 👍
owlstronaut
approved these changes
Jun 8, 2026
Merged
owlstronaut
pushed a commit
that referenced
this pull request
Jun 8, 2026
🤖 I have created a release *beep* *boop* --- ## [7.8.3](v7.8.2...v7.8.3) (2026-06-08) ### Bug Fixes * [`046da7f`](046da7f) [#872](#872) align caret includePrerelease lower bounds (#872) (@wayyoungboy) ### Chores * [`3485dda`](3485dda) [#866](#866) bump @npmcli/eslint-config from 6.0.1 to 7.0.0 (#866) (@dependabot[bot]) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
includePrereleaseis enabled^0.0.3and^0.2.3prerelease versions matching the existing^1.0.0behaviorRoot Cause
For exact
0.xcaret ranges without an explicit prerelease,replaceCaretappended-0to the lower bound whenincludePrereleasewas enabled. That turned^0.0.3into>=0.0.3-0 <0.0.4-0, allowing0.0.3-alphawhile exact1.xcaret ranges kept>=1.2.3and rejected1.2.3-alpha.Test Plan
satisfies('0.0.3-alpha', '^0.0.3', { includePrerelease: true })returnedtruebefore the fix0.0.3-alpha,0.2.3-alpha, and1.2.3-alphaall returningfalsenodefixture script covering range include/exclude fixtures: 121 include and 98 exclude casesnoderange verification script: 1348 checks across range parsing, intersects, outside/gtr/ltr, min/max satisfying, and toComparatorsgit diff --check HEAD^ HEADFixes #557