From 0ac7d5423f34d7af56021fb338f0b55497e16572 Mon Sep 17 00:00:00 2001 From: Antoine du HAMEL Date: Wed, 26 Aug 2020 13:03:41 +0200 Subject: [PATCH] doc: add deprecated badge to legacy URL methods PR-URL: https://github.com/nodejs/node/pull/34931 Reviewed-By: James M Snell Reviewed-By: Guy Bedford --- doc/api/url.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index 762528d348a5bc..55919241b90e0b 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -1006,8 +1006,9 @@ pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) ``` ## Legacy URL API - -> Stability: 0 - Deprecated: Use the WHATWG URL API instead. + ### Legacy `urlObject` +> Stability: 0 - Deprecated: Use the WHATWG URL API instead. + The legacy `urlObject` (`require('url').Url`) is created and returned by the `url.parse()` function. @@ -1132,6 +1135,8 @@ changes: times. --> +> Stability: 0 - Deprecated: Use the WHATWG URL API instead. + * `urlObject` {Object|string} A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. @@ -1226,6 +1231,8 @@ changes: when no query string is present. --> +> Stability: 0 - Deprecated: Use the WHATWG URL API instead. + * `urlString` {string} The URL string to parse. * `parseQueryString` {boolean} If `true`, the `query` property will always be set to an object returned by the [`querystring`][] module's `parse()` @@ -1270,6 +1277,8 @@ changes: contains a hostname. --> +> Stability: 0 - Deprecated: Use the WHATWG URL API instead. + * `from` {string} The Base URL being resolved against. * `to` {string} The HREF URL being resolved.