Skip to content

Commit 922a1b0

Browse files
committedSep 7, 2018
url: docs deprecate legacy url API
PR-URL: #22715 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent c1483ba commit 922a1b0

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed
 

‎doc/api/deprecations.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,16 @@ deprecated along with the undocumented aliases `crypto.prng()` and
10501050
`crypto.rng()` in favor of [`crypto.randomBytes()`][] and will be removed in a
10511051
future release.
10521052
1053+
<a id="DEP0116"></a>
1054+
### DEP0116: Legacy URL API
1055+
1056+
Type: Documentation
1057+
1058+
The [Legacy URL API][] is deprecated. This includes [`url.format()`][],
1059+
[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please
1060+
use the [WHATWG URL API][] instead.
1061+
1062+
10531063
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
10541064
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
10551065
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
@@ -1098,6 +1108,7 @@ future release.
10981108
[`os.tmpdir()`]: os.html#os_os_tmpdir
10991109
[`process.env`]: process.html#process_process_env
11001110
[`punycode`]: punycode.html
1111+
[`REPLServer.clearBufferedCommand()`]: repl.html#repl_replserver_clearbufferedcommand
11011112
[`require.extensions`]: modules.html#modules_require_extensions
11021113
[`script.createCachedData()`]: vm.html#vm_script_createcacheddata
11031114
[`setInterval()`]: timers.html#timers_setinterval_callback_delay_args
@@ -1108,6 +1119,9 @@ future release.
11081119
[`tls.TLSSocket`]: tls.html#tls_class_tls_tlssocket
11091120
[`tls.checkServerIdentity()`]: tls.html#tls_tls_checkserveridentity_hostname_cert
11101121
[`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options
1122+
[`url.format()`]: url.html#url_url_format_urlobject
1123+
[`url.parse()`]: url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost
1124+
[`url.resolve()`]: url.html#url_url_resolve_from_to
11111125
[`util._extend()`]: util.html#util_util_extend_target_source
11121126
[`util.debug()`]: util.html#util_util_debug_string
11131127
[`util.error()`]: util.html#util_util_error_strings
@@ -1139,5 +1153,7 @@ future release.
11391153
[alloc_unsafe_size]: buffer.html#buffer_class_method_buffer_allocunsafe_size
11401154
[from_arraybuffer]: buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length
11411155
[from_string_encoding]: buffer.html#buffer_class_method_buffer_from_string_encoding
1156+
[Legacy URL API]: url.html#url_legacy_url_api
1157+
[legacy `urlObject`]: url.html#url_legacy_urlobject
11421158
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
1143-
[`REPLServer.clearBufferedCommand()`]: repl.html#repl_replserver_clearbufferedcommand
1159+
[WHATWG URL API]: url.html#url_the_whatwg_url_api

‎doc/api/url.md

+17
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,15 @@ pathToFileURL('/some/path%.js'); // Correct: file:///some/path%25 (POSIX)
964964

965965
## Legacy URL API
966966

967+
> Stability: 0 - Deprecated: Use the WHATWG URL API instead.
968+
967969
### Legacy `urlObject`
970+
<!-- YAML
971+
changes:
972+
- version: REPLACEME
973+
pr-url: https://github.com/nodejs/node/pull/22715
974+
description: The Legacy URL API is deprecated. Use the WHATWG URL API.
975+
-->
968976

969977
The legacy `urlObject` (`require('url').Url`) is created and returned by the
970978
`url.parse()` function.
@@ -1070,6 +1078,9 @@ forward-slash characters (`/`) are required following the colon in the
10701078
<!-- YAML
10711079
added: v0.1.25
10721080
changes:
1081+
- version: REPLACEME
1082+
pr-url: https://github.com/nodejs/node/pull/22715
1083+
description: The Legacy URL API is deprecated. Use the WHATWG URL API.
10731084
- version: v7.0.0
10741085
pr-url: https://github.com/nodejs/node/pull/7234
10751086
description: URLs with a `file:` scheme will now always use the correct
@@ -1158,6 +1169,9 @@ The formatting process operates as follows:
11581169
<!-- YAML
11591170
added: v0.1.25
11601171
changes:
1172+
- version: REPLACEME
1173+
pr-url: https://github.com/nodejs/node/pull/22715
1174+
description: The Legacy URL API is deprecated. Use the WHATWG URL API.
11611175
- version: v9.0.0
11621176
pr-url: https://github.com/nodejs/node/pull/13606
11631177
description: The `search` property on the returned URL object is now `null`
@@ -1186,6 +1200,9 @@ A `URIError` is thrown if the `auth` property is present but cannot be decoded.
11861200
<!-- YAML
11871201
added: v0.1.25
11881202
changes:
1203+
- version: REPLACEME
1204+
pr-url: https://github.com/nodejs/node/pull/22715
1205+
description: The Legacy URL API is deprecated. Use the WHATWG URL API.
11891206
- version: v6.6.0
11901207
pr-url: https://github.com/nodejs/node/pull/8215
11911208
description: The `auth` fields are now kept intact when `from` and `to`

0 commit comments

Comments
 (0)