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 was referenced Jun 9, 2026
1 task
This was referenced Jun 16, 2026
This was referenced Jun 18, 2026
felipesauer
added a commit
to felipesauer/mnema
that referenced
this pull request
Jun 19, 2026
…pat fix) (#19) Integra as 4 PRs abertas do Dependabot (#15, #16, #17, #18) numa única mudança validada — regenerando o lockfile **uma vez** e rodando o pipeline completo — para não reintroduzir a corrupção de lockfile dos merges concorrentes. ## Bumps | Pacote | De | Para | PR | |---|---|---|---| | `@types/node` | 25.9.3 | **26.0.0** (major) | #18 | | `@inquirer/prompts` | 8.4.2 | 8.5.2 | #16 | | `semver` | 7.7.4 | 7.8.4 | #16 | | `@vitest/coverage-v8` + `vitest` | 4.1.5 | 4.1.9 | #17 | | `actions/checkout` | v6 | v7 (major) | #15 | ## Fix de código necessário (PR #16 estava vermelha) A #16 quebrava o teste `version-check` — **não** por causa do `@inquirer/prompts`, mas do bump de `semver`: - `semver@7.8.3` corrigiu (PR npm/node-semver#872) os "caret includePrerelease lower bounds". - Consequência: `0.4.2-alpha.0` **deixou de satisfazer** `^0.4.2` mesmo com `includePrerelease: true` (uma prerelease sorteia *abaixo* da versão base). Bisect confirmou: muda exatamente em 7.8.3. - O `checkVersion` dependia involuntariamente do comportamento bugado antigo. Correção em [src/utils/version-check.ts](src/utils/version-check.ts): além da versão completa, testa também a **versão base coerced** (`0.4.2`) contra o range — assim um alpha da mesma linha continua compatível com projetos fixados num range estável. Sem reverter o bump. ## Validação local (pipeline completo do CI, estado limpo) - ✅ `pnpm install --frozen-lockfile` - ✅ `pnpm lint` (biome) - ✅ `pnpm build` (tsc com `@types/node@26` — sem erros de tipo) - ✅ `pnpm test` — 436/436 (inclui `version-check` 4/4) - ✅ `pnpm smoke:mcp` — 8/8 tools ## Encaminhamento Ao mergear esta PR, fecho as 4 PRs do Dependabot (#15–#18) com comentário apontando para cá.
This was referenced Jun 20, 2026
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