Azure / Azure/autorest

[v2] [DEP0169] DeprecationWarning: url.parse() behavior is not standardized and prone to errors

Open Beginner friendly
#5,174 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeSpec
Stars
4.8k
Forks
736
Avg merge
2d 14h
Merged PRs (30d)
1

Description

autorest v2 may fail with this error on node 24:

> [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.

Fix would be to change this code, to use the new `URL` api:

https://github.com/Azure/autorest/blob/50330797d3f0dfcd233967544b66f541a327ba74/src/autorest-core/lib/ref/uri.ts#L14

Contributor guide

Open the contributing guide

Research direction

Start at src/autorest-core/lib/ref/uri.ts around line 14, as identified in the issue. Read how the current URL parsing is used, then update it to use the WHATWG URL API instead. Done means the Node 24 deprecation warning is no longer triggered by this code.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.