Skip to content

url: preserve property order in URLPattern results #64735

Draft
Archkon wants to merge 2 commits into
nodejs:mainfrom
Archkon:url3
Draft

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

Conversation

@Archkon

@Archkon Archkon commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Fixes: #64734

Reorder the URLPatternResult and URLPatternComponentResult dictionary
templates, together with their value arrays, to follow the
lexicographical member order required by WebIDL.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
@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
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>
Comment thread src/node_url_pattern.cc
auto isolate = env->isolate();
auto context = env->context();
LocalVector<Name> group_names(isolate);
LocalVector<Name> js_group_names(isolate);

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 keep the change at minimum and avoid unnecessary changes.

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

3 participants