Skip to content

Migrate off deprecated url.parse APIS to WHATWG URL API instead.#945

Open
arthurfiorette wants to merge 8 commits intomapbox:masterfrom
arthurfiorette:master
Open

Migrate off deprecated url.parse APIS to WHATWG URL API instead.#945
arthurfiorette wants to merge 8 commits intomapbox:masterfrom
arthurfiorette:master

Conversation

@arthurfiorette
Copy link

@arthurfiorette arthurfiorette commented Mar 11, 2026

This PR attempts to remove the following warnings when using this library:

(node:960561) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)

Node itself provides a codemod (npx codemod@latest @nodejs/node-url-to-whatwg-url) that mainly replaces url.parse.

url.resolve is also widely used and their docs provide an example on how to replace it using the modern WHATWG URL API.

@arthurfiorette arthurfiorette requested a review from a team as a code owner March 11, 2026 15:37
@arthurfiorette
Copy link
Author

Fixed lint issues

@arthurfiorette
Copy link
Author

Fixed test path url issues

@cclauss cclauss requested a review from benmccann March 12, 2026 16:46
@cclauss cclauss added the javascript Pull requests that update Javascript code label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants