Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add legacy status #37784

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2172,12 +2172,15 @@ future release.
### DEP0116: Legacy URL API
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/37784
description: Deprecation revoked. Status changed to "Legacy".
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22715
description: Documentation-only deprecation.
-->

Type: Documentation-only
Type: Deprecation revoked

The [Legacy URL API][] is deprecated. This includes [`url.format()`][],
[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please
Expand Down
6 changes: 6 additions & 0 deletions doc/api/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ The stability indices are as follows:
> Stability: 2 - Stable. Compatibility with the npm ecosystem is a high
> priority.

<!-- separator -->

> Stability: 3 - Legacy. The feature is no longer recommended for use. While it
likely will not be removed, and is still covered by semantic-versioning
guarantees, use of the feature should be avoided.

Use caution when making use of Experimental features, particularly within
modules. Users may not be aware that experimental features are being used.
Bugs or behavior changes may surprise users when Experimental API
Expand Down
30 changes: 25 additions & 5 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -1075,18 +1075,29 @@ console.log(urlToHttpOptions(myUrl));

## Legacy URL API
<!-- YAML
deprecated: v11.0.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/37784
description: Deprecation revoked. Status changed to "Legacy".
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22715
description: This API is deprecated.
-->

> Stability: 3 - Legacy: Use the WHATWG URL API instead.

### Legacy `urlObject`
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/37784
description: Deprecation revoked. Status changed to "Legacy".
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22715
description: The Legacy URL API is deprecated. Use the WHATWG URL API.
-->

> Stability: 0 - Deprecated: Use the WHATWG URL API instead.
> Stability: 3 - Legacy: Use the WHATWG URL API instead.

The legacy `urlObject` (`require('url').Url`) is created and returned by the
`url.parse()` function.
Expand Down Expand Up @@ -1192,6 +1203,9 @@ forward-slash characters (`/`) are required following the colon in the
<!-- YAML
added: v0.1.25
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/37784
description: Deprecation revoked. Status changed to "Legacy".
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22715
description: The Legacy URL API is deprecated. Use the WHATWG URL API.
Expand All @@ -1203,7 +1217,7 @@ changes:
times.
-->

> Stability: 0 - Deprecated: Use the WHATWG URL API instead.
> Stability: 3 - Legacy: 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
Expand Down Expand Up @@ -1285,6 +1299,9 @@ The formatting process operates as follows:
<!-- YAML
added: v0.1.25
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/37784
description: Deprecation revoked. Status changed to "Legacy".
- version: v11.14.0
pr-url: https://github.com/nodejs/node/pull/26941
description: The `pathname` property on the returned URL object is now `/`
Expand All @@ -1299,7 +1316,7 @@ changes:
when no query string is present.
-->

> Stability: 0 - Deprecated: Use the WHATWG URL API instead.
> Stability: 3 - Legacy: Use the WHATWG URL API instead.

* `urlString` {string} The URL string to parse.
* `parseQueryString` {boolean} If `true`, the `query` property will always
Expand Down Expand Up @@ -1329,6 +1346,9 @@ incorrect handling of usernames and passwords have been identified.
<!-- YAML
added: v0.1.25
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/37784
description: Deprecation revoked. Status changed to "Legacy".
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22715
description: The Legacy URL API is deprecated. Use the WHATWG URL API.
Expand All @@ -1347,7 +1367,7 @@ changes:
contains a hostname.
-->

> Stability: 0 - Deprecated: Use the WHATWG URL API instead.
> Stability: 3 - Legacy: Use the WHATWG URL API instead.

* `from` {string} The Base URL being resolved against.
* `to` {string} The HREF URL being resolved.
Expand Down
7 changes: 6 additions & 1 deletion doc/api_assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
--black1: #090c15;
--black2: #2c3437;
--black3: #0d111d;
--blue1: #00f;
--white: #ffffff;
--white-smoke: #f2f2f2;
--grey-smoke: #e9edf0;
Expand Down Expand Up @@ -263,6 +264,10 @@ ol.version-picker li:last-child a {
background-color: var(--green2);
}

.api_stability_3 {
background-color: var(--blue1);
}

.module_stability {
vertical-align: middle;
}
Expand Down Expand Up @@ -372,7 +377,7 @@ dd + dt.pre {
#apicontent {
padding-top: 1rem;
}

#apicontent section {
content-visibility: auto;
contain-intrinsic-size: 1px 5000px;
Expand Down