Repository navigation
Replace deprecated url.parse in proxy resolution - #114
Josh Mouch (joshmouch) wants to merge 1 commit into
Conversation
|
cc Christof Marti (@chrmarti) Dmitriy Vasyura (@dmitrivMS) Martin Aeschlimann (@aeschli) could you take a look when you get a chance? This fixes the The patched fetch goes through (node:2741) [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.One thing that may need a follow-up before merging: WHATWG |
|
Some extra context on why this matters for extension authors: the warning can't be suppressed on our side. The usual workaround is The in-process alternatives don't work well:
So for any extension that calls the global |
|
Josh Mouch (@joshmouch) Can you rebase this branch and resolve conflicts, so that maintainers can look at your PR? |
|
This has had conflicts since October, so I opened #129. It rebases this change onto main, keeps Josh Mouch (@joshmouch) as co-author, and keeps IPv6 hostnames without brackets so |
|
Can you fix the merge conflicts? |
Fixes the DEP0169 warnings emitted by VS Code agent-host and extension-host fetch paths.
The proxy cache already declares scheme://host:port as its key, so this replaces the legacy parser with WHATWG URL and constructs that same cache key from protocol and host.
The regression runs the resolver under --pending-deprecation in an isolated child and fails if DEP0169 is emitted. It fails against current main at src/index.ts:307 and passes with this change.
Verification: