fix(url): coerce URL string arguments#3473
Merged
proggeramlug merged 4 commits intoMay 31, 2026
Merged
Conversation
This was referenced May 30, 2026
added 3 commits
May 31, 2026 00:09
…d collision Tag 12037 collided with NativePodView after merging main. Reassign to next unused tag 12049.
# Conflicts: # crates/perry-codegen/src/expr/url_main.rs # crates/perry-codegen/src/runtime_decls/stdlib_ffi.rs # crates/perry-runtime/src/url/node_compat.rs
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
URLSearchParamsmethod name/value arguments with URL string coercion so numbers,null, and objects stringify like Node, while symbols throw.ERR_MISSING_ARGSfor missing requiredname/valuearguments.domainToASCII/domainToUnicodeinputs before host parsing, including numeric host normalization.Issues
Fixes #3057
Fixes #3059
Why Batched
Both issues are
node:urlstring conversion gaps and share the same runtime coercion/error semantics and parity surface.Tests
NO_COLOR=1 FORCE_COLOR=0 node --experimental-strip-types test-parity/node-suite/url/search-params/method-argument-coercion.tsNO_COLOR=1 FORCE_COLOR=0 node --experimental-strip-types test-parity/node-suite/url/module/domain-input-coercion.tsPERRY_NO_AUTO_OPTIMIZE=1 ./run_parity_tests.sh --suite node-suite --module url/search-paramsPERRY_NO_AUTO_OPTIMIZE=1 ./run_parity_tests.sh --suite node-suite --module url/modulecargo fmt --all -- --checkgit diff --check./scripts/check_file_size.shcargo check -p perry-hir -p perry-codegen -p perry-runtime -p perryKnown Limitations / Non-Goals
urlToHttpOptionsbehavior tracked separately in node:url: match urlToHttpOptions fields and validation #2976.