Skip to content

fix: backport v7 range parsing performance improvement to v5 - #927

Open
reggi wants to merge 1 commit into
release/v5from
reggi/improve-range-parsing-performance-v5
Open

reggi wants to merge 1 commit into
release/v5from
reggi/improve-range-parsing-performance-v5

Conversation

@reggi

@reggi reggi commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Backport the v7 range parsing performance fix from #918 to v5. Replace execution of COMPARATORTRIM during range parsing with a regex-free whitespace scanner while preserving the existing exported regexes.

Preserve v5-specific parsing behavior, including numeric-first prerelease matching. Add coverage confirming legacy compatibility, exported regex preservation, and parsing without executing COMPARATORTRIM.

Stack

Depends on #926, the v5 coverage backport of #917. This PR targets reggi/chore-adds-tests-v5 so its diff contains only fix commit 4a94e99. Merge #926 first, then retarget this PR to release/v5 if GitHub does not do so automatically.

Validation

The full v5 test suite passed locally on Node 20.19.5 with 100% statement, branch, function, and line coverage; one test was skipped. Additional differential checks matched the legacy regex across 30,870 cases. The full supported Node-version matrix remains unverified locally.

@reggi
reggi requested a review from a team as a code owner October 16, 2026 19:39
nishantms
nishantms previously approved these changes Oct 16, 2026
martinrrm
martinrrm previously approved these changes Oct 19, 2026
reggi added a commit that referenced this pull request Oct 20, 2026
## Summary
Backport the v7 range parsing coverage from #917 to v5. Add coverage for
comparator whitespace normalization, range parsing options, equality
boundaries, malformed loose alternatives, long identifiers, and build
metadata.

Use the same range fixture inputs and options as v7 while preserving
v5-specific expected results. Tests only; no production code or
dependency changes.

## Stack
First of two stacked v5 backport PRs, based on `release/v5`. Contains
test commit `8bbf475`. The follow-up backport of the v7 performance fix
in #918 targets this branch. Merge this PR before the v5 fix.

The follow-up v5 fix is #927.

## Validation
The full v5 test suite passed locally on Node 20.19.5 with 100%
statement, branch, function, and line coverage; one test was skipped.
The full supported Node-version matrix remains unverified locally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 03b4a44c-26a3-4d56-9b26-cd46006844c6
Base automatically changed from reggi/chore-adds-tests-v5 to release/v5 October 20, 2026 17:07
@reggi
reggi dismissed stale reviews from martinrrm and nishantms October 20, 2026 17:07

The base branch was changed.

Backport regex-free comparator whitespace scanning while preserving numeric-first prerelease matching and existing regex exports.

Include regression coverage for compatibility, exported regex preservation, and parsing without COMPARATORTRIM execution.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 03b4a44c-26a3-4d56-9b26-cd46006844c6
@reggi
reggi force-pushed the reggi/improve-range-parsing-performance-v5 branch from 4a94e99 to 8241db7 Compare October 26, 2026 19:48
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.

3 participants