Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 72dd500

Browse filesBrowse files
RaisinTenbengl
authored andcommitted
doc: clarify the meaning of legacy status
Fixes: #42230 Fixes: #42232 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #42269 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 8b99099 commit 72dd500
Copy full SHA for 72dd500

File tree

Expand file treeCollapse file tree

2 files changed

+19
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+19
-8
lines changed
Open diff view settings
Collapse file

‎doc/api/documentation.md‎

Copy file name to clipboardExpand all lines: doc/api/documentation.md
+7-3Lines changed: 7 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
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.
Collapse file

‎doc/api/url.md‎

Copy file name to clipboardExpand all lines: doc/api/url.md
+12-5Lines changed: 12 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1550,11 +1550,18 @@ A `TypeError` is thrown if `urlString` is not a string.
15501550

15511551
A `URIError` is thrown if the `auth` property is present but cannot be decoded.
15521552

1553-
Use of the legacy `url.parse()` method is discouraged. Users should
1554-
use the WHATWG `URL` API. Because the `url.parse()` method uses a
1555-
lenient, non-standard algorithm for parsing URL strings, security
1556-
issues can be introduced. Specifically, issues with [host name spoofing][] and
1557-
incorrect handling of usernames and passwords have been identified.
1553+
`url.parse()` uses a lenient, non-standard algorithm for parsing URL
1554+
strings. It is prone to security issues such as [host name spoofing][]
1555+
and incorrect handling of usernames and passwords.
1556+
1557+
`url.parse()` is an exception to most of the legacy APIs. Despite its security
1558+
concerns, it is legacy and not deprecated because it is:
1559+
1560+
* Faster than the alternative WHATWG `URL` parser.
1561+
* Easier to use with regards to relative URLs than the alternative WHATWG `URL` API.
1562+
* Widely relied upon within the npm ecosystem.
1563+
1564+
Use with caution.
15581565

15591566
### `url.resolve(from, to)`
15601567

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.