Skip to content

url: handle unparsable serialized URLs in setters#64651

Open
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:url-handle-unparsable-href-updates
Open

url: handle unparsable serialized URLs in setters#64651
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:url-handle-unparsable-href-updates

Conversation

@mcollina

@mcollina mcollina commented Jul 21, 2026

Copy link
Copy Markdown
Member

URL updates reparse the stored serialized URL. Return failure when that parse does not succeed so property setters leave the URL unchanged.

Add coverage for URL values that are accepted initially but whose serialized form cannot be parsed again.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/url

@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 21, 2026
Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina
mcollina force-pushed the url-handle-unparsable-href-updates branch from 0fee8e8 to 985563f Compare July 21, 2026 13:19
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.15%. Comparing base (4bec191) to head (985563f).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64651      +/-   ##
==========================================
+ Coverage   90.13%   90.15%   +0.02%     
==========================================
  Files         741      741              
  Lines      242106   242107       +1     
  Branches    45551    45552       +1     
==========================================
+ Hits       218211   218278      +67     
+ Misses      15430    15355      -75     
- Partials     8465     8474       +9     
Files with missing lines Coverage Δ
src/node_url.cc 79.61% <100.00%> (+0.32%) ⬆️

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

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.

2 participants