| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 79fb8cb commit ad97045
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2642,11 +2642,15 @@ future release. | |||
| 2642 | 2642 | ||
| 2643 | 2643 | <!-- YAML | |
| 2644 | 2644 | changes: | |
| 2645 | + - version: | ||
| 2646 | + - v24.0.0 | ||
| 2647 | + pr-url: https://github.com/nodejs/node/pull/55017 | ||
| 2648 | + description: DEP0169 covers also `url.format()` and `url.resolve()`. | ||
| 2645 | 2649 | - version: | |
| 2646 | 2650 | - v19.0.0 | |
| 2647 | 2651 | - v18.13.0 | |
| 2648 | 2652 | pr-url: https://github.com/nodejs/node/pull/44919 | |
| 2649 | - description: \`url.parse()` is deprecated again in DEP0169. | ||
| 2653 | + description: DEP0169 deprecates `url.parse()` again. | ||
| 2650 | 2654 | - version: | |
| 2651 | 2655 | - v15.13.0 | |
| 2652 | 2656 | - v14.17.0 | |
@@ -3729,7 +3733,7 @@ Type: Application (non-`node_modules` code only) | |||
| 3729 | 3733 | have security implications. Use the [WHATWG URL API][] instead. CVEs are not | |
| 3730 | 3734 | issued for `url.parse()` vulnerabilities. | |
| 3731 | 3735 | ||
| 3732 | - Passing a string argument to [`url.format()`][] invokes `url.parse()` | ||
| 3736 | + Calling [`url.format(urlString)`][] or [`url.resolve()`][] invokes `url.parse()` | ||
| 3733 | 3737 | internally, and is therefore also covered by this deprecation. | |
| 3734 | 3738 | ||
| 3735 | 3739 | ### DEP0170: Invalid port when using `url.parse()` | |
@@ -4503,6 +4507,7 @@ const server = http2.createSecureServer({ | |||
| 4503 | 4507 | [`tls.createSecureContext()`]: tls.md#tlscreatesecurecontextoptions | |
| 4504 | 4508 | [`tls.createServer()`]: tls.md#tlscreateserveroptions-secureconnectionlistener | |
| 4505 | 4509 | [`url.format()`]: url.md#urlformaturlobject | |
| 4510 | + [`url.format(urlString)`]: url.md#urlformaturlstring | ||
| 4506 | 4511 | [`url.parse()`]: url.md#urlparseurlstring-parsequerystring-slashesdenotehost | |
| 4507 | 4512 | [`url.resolve()`]: url.md#urlresolvefrom-to | |
| 4508 | 4513 | [`util._extend()`]: util.md#util_extendtarget-source | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1833,7 +1833,7 @@ changes: | |||
| 1833 | 1833 | ||
| 1834 | 1834 | `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`. | |
| 1835 | 1835 | ||
| 1836 | - Because it invokes the deprecated [`url.parse()`][], passing a string argument | ||
| 1836 | + Because it invokes the deprecated [`url.parse()`][] internally, passing a string argument | ||
| 1837 | 1837 | to `url.format()` is itself deprecated. | |
| 1838 | 1838 | ||
| 1839 | 1839 | Canonicalizing a URL string can be performed using the WHATWG URL API, by | |
@@ -1950,6 +1950,10 @@ npx codemod@latest @nodejs/node-url-to-whatwg-url | |||
| 1950 | 1950 | <!-- YAML | |
| 1951 | 1951 | added: v0.1.25 | |
| 1952 | 1952 | changes: | |
| 1953 | + - version: | ||
| 1954 | + - v24.0.0 | ||
| 1955 | + pr-url: https://github.com/nodejs/node/pull/55017 | ||
| 1956 | + description: Deprecated again through DEP0169. | ||
| 1953 | 1957 | - version: | |
| 1954 | 1958 | - v15.13.0 | |
| 1955 | 1959 | - v14.17.0 | |
@@ -1973,6 +1977,8 @@ changes: | |||
| 1973 | 1977 | contains a hostname. | |
| 1974 | 1978 | --> | |
| 1975 | 1979 | ||
| 1980 | + > Stability: 0 - Deprecated: Use the WHATWG URL API instead. | ||
| 1981 | + | ||
| 1976 | 1982 | * `from` {string} The base URL to use if `to` is a relative URL. | |
| 1977 | 1983 | * `to` {string} The target URL to resolve. | |
| 1978 | 1984 | ||
@@ -1986,6 +1992,8 @@ url.resolve('http://example.com/', '/one'); // 'http://example.com/one' | |||
| 1986 | 1992 | url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' | |
| 1987 | 1993 | ``` | |
| 1988 | 1994 | ||
| 1995 | + Because it invokes the deprecated [`url.parse()`][] internally, `url.resolve()` is itself deprecated. | ||
| 1996 | + | ||
| 1989 | 1997 | To achieve the same result using the WHATWG URL API: | |
| 1990 | 1998 | ||
| 1991 | 1999 | ```js | |
| Back | FazBrowse Home | New Git URL |
0 commit comments