Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2660,11 +2660,15 @@

<!-- YAML
changes:
- version:
- v24.0.0
pr-url: https://github.com/nodejs/node/pull/55017

Check warning on line 2665 in doc/api/deprecations.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
description: DEP0169 covers also `url.format()` and `url.resolve()`.
- version:
- v19.0.0
- v18.13.0
pr-url: https://github.com/nodejs/node/pull/44919
description: \`url.parse()` is deprecated again in DEP0169.
description: DEP0169 deprecates `url.parse()` again.
- version:
- v15.13.0
- v14.17.0
Expand Down Expand Up @@ -3778,7 +3782,7 @@
have security implications. Use the [WHATWG URL API][] instead. CVEs are not
issued for `url.parse()` vulnerabilities.

Passing a string argument to [`url.format()`][] invokes `url.parse()`
Calling [`url.format(urlString)`][] or [`url.resolve()`][] invokes `url.parse()`
internally, and is therefore also covered by this deprecation.

### DEP0170: Invalid port when using `url.parse()`
Expand Down Expand Up @@ -4592,6 +4596,7 @@
[`tls.createSecureContext()`]: tls.md#tlscreatesecurecontextoptions
[`tls.createServer()`]: tls.md#tlscreateserveroptions-secureconnectionlistener
[`url.format()`]: url.md#urlformaturlobject
[`url.format(urlString)`]: url.md#urlformaturlstring
[`url.parse()`]: url.md#urlparseurlstring-parsequerystring-slashesdenotehost
[`url.resolve()`]: url.md#urlresolvefrom-to
[`util._extend()`]: util.md#util_extendtarget-source
Expand Down
10 changes: 9 additions & 1 deletion doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@

`url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`.

Because it invokes the deprecated [`url.parse()`][], passing a string argument
Because it invokes the deprecated [`url.parse()`][] internally, passing a string argument
to `url.format()` is itself deprecated.

Canonicalizing a URL string can be performed using the WHATWG URL API, by
Expand Down Expand Up @@ -1956,6 +1956,10 @@
<!-- YAML
added: v0.1.25
changes:
- version:
- v24.0.0
pr-url: https://github.com/nodejs/node/pull/55017

Check warning on line 1961 in doc/api/url.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
description: Deprecated again through DEP0169.
- version:
- v15.13.0
- v14.17.0
Expand All @@ -1979,9 +1983,13 @@
contains a hostname.
-->

> Stability: 0 - Deprecated: Use the WHATWG URL API instead.

* `from` {string} The base URL to use if `to` is a relative URL.
* `to` {string} The target URL to resolve.

Because it invokes the deprecated [`url.parse()`][] internally, `url.resolve()` is itself deprecated.

Comment thread
MikeMcC399 marked this conversation as resolved.
Outdated
The `url.resolve()` method resolves a target URL relative to a base URL in a
manner similar to that of a web browser resolving an anchor tag.

Expand Down
Loading