@@ -27,7 +27,7 @@ The `node:url` module provides two APIs for working with URLs: a legacy API that
2727is Node.js specific, and a newer API that implements the same
2828[ WHATWG URL Standard] [ ] used by web browsers.
2929
30- A comparison between the WHATWG and Legacy APIs is provided below. Above the URL
30+ A comparison between the WHATWG and legacy APIs is provided below. Above the URL
3131` 'https://user:[email protected] :8080/p/a/t/h?query=string#hash' ` , properties
3232of an object returned by the legacy ` url.parse() ` are shown. Below it are
3333properties of a WHATWG ` URL ` object.
@@ -63,7 +63,7 @@ const myURL =
6363 new URL (
' https://user:[email protected] :8080/p/a/t/h?query=string#hash' );
6464```
6565
66- Parsing the URL string using the Legacy API:
66+ Parsing the URL string using the legacy API:
6767
6868``` mjs
6969import url from ' node:url' ;
@@ -1521,6 +1521,9 @@ The formatting process operates as follows:
15211521<!-- YAML
15221522added: v0.1.25
15231523changes:
1524+ - version: REPLACEME
1525+ pr-url: https://github.com/nodejs/node/pull/44918
1526+ description: Documentation-only deprecation.
15241527 - version:
15251528 - v15.13.0
15261529 - v14.17.0
@@ -1540,7 +1543,7 @@ changes:
15401543 when no query string is present.
15411544-->
15421545
1543- > Stability: 3 - Legacy : Use the WHATWG URL API instead.
1546+ > Stability: 0 - Deprecated : Use the WHATWG URL API instead.
15441547
15451548* `urlString` {string} The URL string to parse.
15461549* `parseQueryString` {boolean} If `true`, the `query` property will always
@@ -1562,16 +1565,8 @@ A `URIError` is thrown if the `auth` property is present but cannot be decoded.
15621565
15631566` url.parse()` uses a lenient, non- standard algorithm for parsing URL
15641567strings . It is prone to security issues such as [host name spoofing][]
1565- and incorrect handling of usernames and passwords.
1566-
1567- ` url.parse()` is an exception to most of the legacy APIs . Despite its security
1568- concerns, it is legacy and not deprecated because it is:
1569-
1570- * Faster than the alternative WHATWG ` URL` parser.
1571- * Easier to use with regards to relative URLs than the alternative WHATWG ` URL` API .
1572- * Widely relied upon within the npm ecosystem.
1573-
1574- Use with caution.
1568+ and incorrect handling of usernames and passwords . Use the [WHATWG URL ][] API
1569+ instead.
15751570
15761571### ` url.resolve(from, to)`
15771572
0 commit comments