Skip to content

url: preserve property order in URLPattern results - #64735

Open
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:url3
Open

url: preserve property order in URLPattern results #64735
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:url3

Conversation

@Archkon

@Archkon Archkon commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Fixes: #64734

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Jul 25, 2026
@Archkon
Archkon marked this pull request as draft July 25, 2026 10:38
@Archkon Archkon changed the title Url3 url: preserve property order in URLPattern results Jul 25, 2026
Comment thread src/node_url_pattern.cc Outdated
Use each compiled component's group name list when materializing
URLPattern capture groups instead of iterating an unordered map.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
@Archkon
Archkon marked this pull request as ready for review July 28, 2026 11:54
@Archkon

Archkon commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@anonrig Could you review this again?

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.13%. Comparing base (b4bbb12) to head (5816458).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/node_url_pattern.cc 88.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64735      +/-   ##
==========================================
- Coverage   90.14%   90.13%   -0.01%     
==========================================
  Files         744      744              
  Lines      242542   242555      +13     
  Branches    45694    45690       -4     
==========================================
+ Hits       218637   218638       +1     
+ Misses      15393    15387       -6     
- Partials     8512     8530      +18     
Files with missing lines Coverage Δ
src/node_url_pattern.h 0.00% <ø> (ø)
src/node_url_pattern.cc 83.74% <88.00%> (+0.02%) ⬆️

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anonrig anonrig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a test.

@Archkon

Archkon commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@anonrig A regression test for capture group declaration order is already included in test/parallel/test-urlpattern.js. Could you clarify which additional case you would like covered?

@Archkon
Archkon requested a review from anonrig August 3, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

url: URLPattern.exec() does not preserve capture group declaration order

4 participants