Skip to content

fix: handle prerelease bounds in subset#867

Merged
owlstronaut merged 1 commit into
npm:mainfrom
puneetdixit200:fix/subset-prerelease-caret
May 21, 2026
Merged

fix: handle prerelease bounds in subset#867
owlstronaut merged 1 commit into
npm:mainfrom
puneetdixit200:fix/subset-prerelease-caret

Conversation

@puneetdixit200
Copy link
Copy Markdown
Contributor

Summary

  • Fix subset() so prerelease lower and upper bounds are checked against individual comparators without reapplying full range prerelease gating.
  • Add coverage for ^10.2.0-beta.2 being a subset of ^10.2.0-beta.1.

Tests

  • npx tap test/ranges/subset.js
  • npm test
  • git diff --check

Fixes #757

@puneetdixit200 puneetdixit200 requested a review from a team as a code owner May 21, 2026 13:03
@owlstronaut owlstronaut merged commit 5f3ca13 into npm:main May 21, 2026
35 checks passed
@github-actions github-actions Bot mentioned this pull request May 21, 2026
owlstronaut pushed a commit that referenced this pull request May 21, 2026
🤖 I have created a release *beep* *boop*
---


## [7.8.1](v7.8.0...v7.8.1)
(2026-05-21)
### Bug Fixes
*
[`17aa702`](17aa702)
[#869](#869) strip build metadata
before comparator trimming (#869) (@owlstronaut)
*
[`5f3ca13`](5f3ca13)
[#867](#867) handle prerelease
bounds in subset (#867) (@puneetdixit200, Puneet Dixit)

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] subset() incorrectly returns false for prerelease versions that should be subsets

2 participants