doc: include url.resolve() in DEP0169 application deprecation#62002
doc: include url.resolve() in DEP0169 application deprecation#62002MikeMcC399 wants to merge 3 commits intonodejs:mainfrom
Conversation
Mark url.resolve() as deprecated Update also DEP0116 with cross-reference to DEP0169
|
Review requested:
|
|
Like Because it invokes the deprecated [`url.parse()`][] internally, `url.resolve()` is itself deprecated. |
Thanks for the suggestion! I've added it in, and I added "internally" to the comment in |
AugustinMauroy
left a comment
There was a problem hiding this comment.
IMO missing explaining of what is the alternative
The alternative is already described on the existing page https://nodejs.org/docs/latest/api/url.html#urlresolvefrom-to The proposed change adds the history, deprecation banner and explanation of the deprecation.
|
No problem! There are a lot of interrelated bits, and this change is really just catching up the documentation to match reality since v24.0.0. |




Fixes: #61816
Refs: #61780 (supersedes)
Situation
DEP0169: Insecure url.parse() lists an Application deprecation (non-node_modules code only) for
url.parse()that was applied in v24.0.0.The text notes that passing a string to
url.format()also invokes the deprecation warning, sinceurl.parse()is called internally.The same reasoning also applies to
url.resolve(), although this is not documented here.Change
Builds on work from @legendecas in PR #61780.
Related to #55017 for v24.0.0:
For DEP0116: Legacy URL API:
url.resolve()to the texturl.format()link to point directly to the deprecated url.format(urlString) section instead of to url.format(urlObject)For DEP0116: Legacy URL API:
url.format()andurl.resolve()to refer to DEP0169. See url: doc deprecate url.resolve #61780 (comment) from @richardlauFor url.resolve()