Skip to content

url: use ArrayPrototypePush in URLSearchParams methods#61195

Open
Ayoub-Mabrouk wants to merge 1 commit into
nodejs:mainfrom
Ayoub-Mabrouk:url-use-arrayprototypepush
Open

url: use ArrayPrototypePush in URLSearchParams methods#61195
Ayoub-Mabrouk wants to merge 1 commit into
nodejs:mainfrom
Ayoub-Mabrouk:url-use-arrayprototypepush

Conversation

@Ayoub-Mabrouk
Copy link
Copy Markdown
Contributor

Replace native array.push() with ArrayPrototypePush in URLSearchParams.getAll() and parseParams() for consistency with the primordials pattern.
This improves security against prototype pollution and aligns with existing patterns in the file.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/url

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Dec 29, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.54%. Comparing base (05d6b9b) to head (51a3c66).
⚠️ Report is 1102 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61195      +/-   ##
==========================================
+ Coverage   88.53%   88.54%   +0.01%     
==========================================
  Files         703      703              
  Lines      208599   208613      +14     
  Branches    40229    40250      +21     
==========================================
+ Hits       184685   184726      +41     
+ Misses      15939    15901      -38     
- Partials     7975     7986      +11     
Files with missing lines Coverage Δ
lib/internal/url.js 94.07% <100.00%> (ø)

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

@avivkeller avivkeller added the needs-benchmark-ci PR that need a benchmark CI run. label Dec 29, 2025
@avivkeller
Copy link
Copy Markdown
Member

avivkeller commented Dec 29, 2025

Please amend your commit to abide by the guidelines

@Ayoub-Mabrouk Ayoub-Mabrouk force-pushed the url-use-arrayprototypepush branch from 574e617 to 343c6b8 Compare December 29, 2025 17:33
Replace native methods with primordials.
@Ayoub-Mabrouk Ayoub-Mabrouk force-pushed the url-use-arrayprototypepush branch from 343c6b8 to 51a3c66 Compare December 29, 2025 17:47
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Feb 17, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 18, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label May 19, 2026
@github-actions github-actions Bot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Failed to start CI
- Validating Jenkins credentials
✔  Jenkins credentials valid
- Querying data for job/node-test-pull-request/71533/
[SyntaxError: Unexpected token '<', ..."    
  https://github.com/nodejs/node/actions/runs/26100654712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants