Skip to content

Commit c002b09

Browse files
RaisinTendanielleadams
authored andcommitted
doc: clarify the meaning of legacy status
Fixes: #42230 Fixes: #42232 Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42269 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 1e9c7e6 commit c002b09

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

doc/api/documentation.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ The stability indices are as follows:
4040
4141
<!-- separator -->
4242

43-
> Stability: 3 - Legacy. The feature is no longer recommended for use. While it
44-
> likely will not be removed, and is still covered by semantic-versioning
45-
> guarantees, use of the feature should be avoided.
43+
> Stability 3 - Legacy. Although this feature is unlikely to be removed and is
44+
> still covered by semantic-versioning guarantees, it is no longer actively
45+
> maintained, and other alternatives are available.
46+
47+
Features are marked as legacy rather than being deprecated if their use does no
48+
harm, and they are widely relied upon within the npm ecosystem. Bugs found in
49+
legacy features are unlikely to be fixed.
4650

4751
Use caution when making use of Experimental features, particularly within
4852
modules. Users may not be aware that experimental features are being used.

doc/api/url.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -1535,11 +1535,18 @@ A `TypeError` is thrown if `urlString` is not a string.
15351535

15361536
A `URIError` is thrown if the `auth` property is present but cannot be decoded.
15371537

1538-
Use of the legacy `url.parse()` method is discouraged. Users should
1539-
use the WHATWG `URL` API. Because the `url.parse()` method uses a
1540-
lenient, non-standard algorithm for parsing URL strings, security
1541-
issues can be introduced. Specifically, issues with [host name spoofing][] and
1542-
incorrect handling of usernames and passwords have been identified.
1538+
`url.parse()` uses a lenient, non-standard algorithm for parsing URL
1539+
strings. It is prone to security issues such as [host name spoofing][]
1540+
and incorrect handling of usernames and passwords.
1541+
1542+
`url.parse()` is an exception to most of the legacy APIs. Despite its security
1543+
concerns, it is legacy and not deprecated because it is:
1544+
1545+
* Faster than the alternative WHATWG `URL` parser.
1546+
* Easier to use with regards to relative URLs than the alternative WHATWG `URL` API.
1547+
* Widely relied upon within the npm ecosystem.
1548+
1549+
Use with caution.
15431550

15441551
### `url.resolve(from, to)`
15451552

0 commit comments

Comments
 (0)