| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f2c08c7 commit cc46204
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2660,11 +2660,15 @@ future release. | |||
| 2660 | 2660 | ||
| 2661 | 2661 | <!-- YAML | |
| 2662 | 2662 | 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()`. | ||
| 2663 | 2667 | - version: | |
| 2664 | 2668 | - v19.0.0 | |
| 2665 | 2669 | - v18.13.0 | |
| 2666 | 2670 | 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. | ||
| 2668 | 2672 | - version: | |
| 2669 | 2673 | - v15.13.0 | |
| 2670 | 2674 | - v14.17.0 | |
@@ -3775,7 +3779,7 @@ Type: Application (non-`node_modules` code only) | |||
| 3775 | 3779 | have security implications. Use the [WHATWG URL API][] instead. CVEs are not | |
| 3776 | 3780 | issued for `url.parse()` vulnerabilities. | |
| 3777 | 3781 | ||
| 3778 | - Passing a string argument to [`url.format()`][] invokes `url.parse()` | ||
| 3782 | + Calling [`url.format(urlString)`][] or [`url.resolve()`][] invokes `url.parse()` | ||
| 3779 | 3783 | internally, and is therefore also covered by this deprecation. | |
| 3780 | 3784 | ||
| 3781 | 3785 | ### DEP0170: Invalid port when using `url.parse()` | |
@@ -4580,6 +4584,7 @@ const server = http2.createSecureServer({ | |||
| 4580 | 4584 | [`tls.createSecureContext()`]: tls.md#tlscreatesecurecontextoptions | |
| 4581 | 4585 | [`tls.createServer()`]: tls.md#tlscreateserveroptions-secureconnectionlistener | |
| 4582 | 4586 | [`url.format()`]: url.md#urlformaturlobject | |
| 4587 | + [`url.format(urlString)`]: url.md#urlformaturlstring | ||
| 4583 | 4588 | [`url.parse()`]: url.md#urlparseurlstring-parsequerystring-slashesdenotehost | |
| 4584 | 4589 | [`url.resolve()`]: url.md#urlresolvefrom-to | |
| 4585 | 4590 | [`util._extend()`]: util.md#util_extendtarget-source | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1839,7 +1839,7 @@ changes: | |||
| 1839 | 1839 | ||
| 1840 | 1840 | `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`. | |
| 1841 | 1841 | ||
| 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 | ||
| 1843 | 1843 | to `url.format()` is itself deprecated. | |
| 1844 | 1844 | ||
| 1845 | 1845 | 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 | |||
| 1956 | 1956 | <!-- YAML | |
| 1957 | 1957 | added: v0.1.25 | |
| 1958 | 1958 | changes: | |
| 1959 | + - version: | ||
| 1960 | + - v24.0.0 | ||
| 1961 | + pr-url: https://github.com/nodejs/node/pull/55017 | ||
| 1962 | + description: Deprecated again through DEP0169. | ||
| 1959 | 1963 | - version: | |
| 1960 | 1964 | - v15.13.0 | |
| 1961 | 1965 | - v14.17.0 | |
@@ -1979,6 +1983,8 @@ changes: | |||
| 1979 | 1983 | contains a hostname. | |
| 1980 | 1984 | --> | |
| 1981 | 1985 | ||
| 1986 | + > Stability: 0 - Deprecated: Use the WHATWG URL API instead. | ||
| 1987 | + | ||
| 1982 | 1988 | * `from` {string} The base URL to use if `to` is a relative URL. | |
| 1983 | 1989 | * `to` {string} The target URL to resolve. | |
| 1984 | 1990 | ||
@@ -1992,6 +1998,8 @@ url.resolve('http://example.com/', '/one'); // 'http://example.com/one' | |||
| 1992 | 1998 | url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' | |
| 1993 | 1999 | ``` | |
| 1994 | 2000 | ||
| 2001 | + Because it invokes the deprecated [`url.parse()`][] internally, `url.resolve()` is itself deprecated. | ||
| 2002 | + | ||
| 1995 | 2003 | To achieve the same result using the WHATWG URL API: | |
| 1996 | 2004 | ||
| 1997 | 2005 | ```js | |
| Back | FazBrowse Home | New Git URL |
0 commit comments