FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

url: align default argument handling for URLPattern with webidl by nodejs-github-bot · Pull Request #62708 · nodejs/node · GitHub

/ node Public

url: align default argument handling for URLPattern with webidl - #62708

Closed
nodejs-github-bot wants to merge 1 commit into
mainfrom
actions/update-urlpattern-wpt
Closed

url: align default argument handling for URLPattern with webidl#62708
nodejs-github-bot wants to merge 1 commit into
mainfrom
actions/update-urlpattern-wpt

Conversation

nodejs-github-bot commented Apr 12, 2026
edited by panva
Loading

Copy link
Copy Markdown
Collaborator

Aligns URLPattern's argument handling with WebIDL semantics (to some extent at least), matching browser behavior (verified against Chrome):

Constructor:

  • undefined/null for URLPatternInput (arg0) uses default empty init per WebIDL union-with-dictionary rules.
  • 2-arg calls: overload resolution picks overload 2 (input, options) when arg1 is not a string, so null/undefined resolve to default options rather than being treated as baseURL.
  • 3-arg calls: null/undefined for baseURL (USVString) are stringified to "null"/"undefined" per WebIDL, which ada rejects as invalid URLs.
  • null/undefined for options dictionary uses defaults.

test() / exec():

  • null/undefined for input uses default empty init.
  • null for baseURL is stringified to "null" per WebIDL USVString conversion, letting the underlying library handle the error semantics (dict input + baseURL throws; string input + invalid baseURL returns no match).

ignoreCase:

  • Changed from strict IsBoolean() type check to BooleanValue() coercion per WebIDL dictionary boolean member rules.

Tests:

  • Updated WPT fixtures to f07c03cbed.
  • Added tests for all undefined/null/coercion cases in test/parallel/test-urlpattern-types.js.

nodejs-github-bot added the test Issues and PRs related to the tests. label Apr 12, 2026

Copy link
Copy Markdown
Collaborator Author

Review requested:

  • @nodejs/web-standards

nodejs-github-bot added the needs-ci PRs that need a full CI run. label Apr 12, 2026
panva previously approved these changes Apr 12, 2026
panva added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no outstanding review comments, and a CI started. labels Apr 12, 2026
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 12, 2026

Copy link
Copy Markdown
Collaborator Author

codecov Bot commented Apr 12, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.02326% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.79%. Comparing base (dfe438d) to head (da14246).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/node_url_pattern.cc 93.02% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62708      +/-   ##
==========================================
- Coverage   89.81%   89.79%   -0.03%     
==========================================
  Files         699      699              
  Lines      216379   216396      +17     
  Branches    41366    41382      +16     
==========================================
- Hits       194340   194302      -38     
- Misses      14139    14183      +44     
- Partials     7900     7911      +11     
Files with missing lines Coverage Δ
src/node_url_pattern.cc 83.75% <93.02%> (-1.03%) ⬇️

... and 33 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.

panva removed the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Apr 12, 2026

panva commented Apr 12, 2026
edited
Loading

Copy link
Copy Markdown
Member

cc @nodejs/url

  "urlpattern-constructor.any.js": {
    "fail": {
      "unexpected": [
        "Test constructor with undefined"
      ]
    }
  },

panva added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. whatwg-url Issues and PRs related to the WHATWG URL implementation. web-standards Issues and PRs related to Web APIs and removed commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Apr 12, 2026
panva force-pushed the actions/update-urlpattern-wpt branch 2 times, most recently from 4d0d15f to fc6ba8d Compare April 12, 2026 17:35
panva changed the title test: update WPT for urlpattern to f07c03cbed url: align default argument handling for URLPattern with webidl Apr 12, 2026
panva force-pushed the actions/update-urlpattern-wpt branch from fc6ba8d to d01f20c Compare April 12, 2026 18:36
panva added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no outstanding review comments, and a CI started. labels Apr 12, 2026
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 12, 2026

Copy link
Copy Markdown
Collaborator Author

panva added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. labels Apr 13, 2026
panva removed author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Apr 13, 2026
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
panva force-pushed the actions/update-urlpattern-wpt branch from d01f20c to da14246 Compare April 13, 2026 08:02
panva requested review from KhafraDev, anonrig and lpinca April 13, 2026 08:02
panva dismissed their stale review April 13, 2026 08:02

🤷

panva commented Apr 13, 2026
edited
Loading

Copy link
Copy Markdown
Member

I'll reopen this as my own PR. -> #62719

panva closed this Apr 13, 2026
panva deleted the actions/update-urlpattern-wpt branch April 13, 2026 08:05
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

Labels

commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. web-standards Issues and PRs related to Web APIs whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL