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 cc46204

Browse filesBrowse files
MikeMcC399aduh95
authored andcommitted
doc: include url.resolve() in DEP0169 application deprecation
Mark url.resolve() as deprecated Update also DEP0116 with cross-reference to DEP0169 PR-URL: #62002 Fixes: #61816 Refs: #61780 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
1 parent f2c08c7 commit cc46204
Copy full SHA for cc46204

2 files changed

+16-3Lines changed: 16 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+7-2Lines changed: 7 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2660,11 +2660,15 @@ future release.
26602660

26612661
<!-- YAML
26622662
changes:
2663+
- version:
2664+
- v24.0.0
2665+
pr-url: https://github.com/nodejs/node/pull/55017
2666+
description: DEP0169 covers also `url.format()` and `url.resolve()`.
26632667
- version:
26642668
- v19.0.0
26652669
- v18.13.0
26662670
pr-url: https://github.com/nodejs/node/pull/44919
2667-
description: \`url.parse()` is deprecated again in DEP0169.
2671+
description: DEP0169 deprecates `url.parse()` again.
26682672
- version:
26692673
- v15.13.0
26702674
- v14.17.0
@@ -3775,7 +3779,7 @@ Type: Application (non-`node_modules` code only)
37753779
have security implications. Use the [WHATWG URL API][] instead. CVEs are not
37763780
issued for `url.parse()` vulnerabilities.
37773781

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

37813785
### DEP0170: Invalid port when using `url.parse()`
@@ -4580,6 +4584,7 @@ const server = http2.createSecureServer({
45804584
[`tls.createSecureContext()`]: tls.md#tlscreatesecurecontextoptions
45814585
[`tls.createServer()`]: tls.md#tlscreateserveroptions-secureconnectionlistener
45824586
[`url.format()`]: url.md#urlformaturlobject
4587+
[`url.format(urlString)`]: url.md#urlformaturlstring
45834588
[`url.parse()`]: url.md#urlparseurlstring-parsequerystring-slashesdenotehost
45844589
[`url.resolve()`]: url.md#urlresolvefrom-to
45854590
[`util._extend()`]: util.md#util_extendtarget-source
Collapse file

‎doc/api/url.md‎

Copy file name to clipboardExpand all lines: doc/api/url.md
+9-1Lines changed: 9 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@ changes:
18391839
18401840
`url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`.
18411841
1842-
Because it invokes the deprecated [`url.parse()`][], passing a string argument
1842+
Because it invokes the deprecated [`url.parse()`][] internally, passing a string argument
18431843
to `url.format()` is itself deprecated.
18441844
18451845
Canonicalizing a URL string can be performed using the WHATWG URL API, by
@@ -1956,6 +1956,10 @@ npx codemod@latest @nodejs/node-url-to-whatwg-url
19561956
<!-- YAML
19571957
added: v0.1.25
19581958
changes:
1959+
- version:
1960+
- v24.0.0
1961+
pr-url: https://github.com/nodejs/node/pull/55017
1962+
description: Deprecated again through DEP0169.
19591963
- version:
19601964
- v15.13.0
19611965
- v14.17.0
@@ -1979,6 +1983,8 @@ changes:
19791983
contains a hostname.
19801984
-->
19811985
1986+
> Stability: 0 - Deprecated: Use the WHATWG URL API instead.
1987+
19821988
* `from` {string} The base URL to use if `to` is a relative URL.
19831989
* `to` {string} The target URL to resolve.
19841990
@@ -1992,6 +1998,8 @@ url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
19921998
url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
19931999
```
19942000
2001+
Because it invokes the deprecated [`url.parse()`][] internally, `url.resolve()` is itself deprecated.
2002+
19952003
To achieve the same result using the WHATWG URL API:
19962004
19972005
```js

0 commit comments

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