Skip to content
Merged
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
16 changes: 16 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4523,6 +4523,20 @@
Passing a non-extractable [`CryptoKey`][] to [`KeyObject.from()`][] is
deprecated and will throw an error in a future version.

### DEP0205: `module.register()`

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/62395

Check warning on line 4531 in doc/api/deprecations.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
description: Documentation-only deprecation.
-->

Type: Documentation-only

[`module.register()`][] is deprecated. Use [`module.registerHooks()`][]
instead.

[DEP0142]: #dep0142-repl_builtinlibs
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
Expand Down Expand Up @@ -4627,6 +4641,8 @@
[`message.trailersDistinct`]: http.md#messagetrailersdistinct
[`message.trailers`]: http.md#messagetrailers
[`module.createRequire()`]: module.md#modulecreaterequirefilename
[`module.register()`]: module.md#moduleregisterspecifier-parenturl-options
[`module.registerHooks()`]: module.md#moduleregisterhooksoptions
[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
[`os.tmpdir()`]: os.md#ostmpdir
[`process.env`]: process.md#processenv
Expand Down
7 changes: 6 additions & 1 deletion doc/api/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@
added:
- v20.6.0
- v18.19.0
deprecated: REPLACEME
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/62395

Check warning on line 184 in doc/api/module.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
description: Documentation-only deprecation (DEP0205). Use
`module.registerHooks()` instead.
- version:
- v23.6.1
- v22.13.1
Expand All @@ -193,7 +198,7 @@
description: Add support for WHATWG URL instances.
-->

> Stability: 1.1 - Active development
> Stability: 0 - Deprecated: Use [`module.registerHooks()`][] instead.

* `specifier` {string|URL} Customization hooks to be registered; this should be
the same string that would be passed to `import()`, except that if it is
Expand Down
2 changes: 1 addition & 1 deletion doc/api/quic.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ added: v23.8.0

Sends an unreliable datagram to the remote peer, returning the datagram ID.
If the datagram payload is specified as an `ArrayBufferView`, then ownership of
that view will be transfered to the underlying stream.
that view will be transferred to the underlying stream.

### `session.stats`

Expand Down
11 changes: 9 additions & 2 deletions doc/contributing/collaborator-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ undergo deprecation. The exceptions to this rule are:
* Changes to errors thrown by dependencies of Node.js, such as V8.
* One-time exceptions granted by the TSC.

Experimental and undocumented APIs are not considered stable, therefore are
typically removed without a deprecation cycle. However, if such API has gotten
some non-trivial adoption in the ecosystem, it (or a subset of it) can undergo
deprecation – at which point, changes to that API (or at least, its deprecated
subset) should follow [semantic versioning][] rules.

For more information, see [Deprecations](#deprecations).

#### Breaking changes to internal elements
Expand Down Expand Up @@ -526,8 +532,8 @@ the three Deprecation levels. Documentation-Only Deprecations can land in a
minor release. They can not change to a Runtime Deprecation until the next major
release.

No API can change to End-of-Life without going through a Runtime Deprecation
cycle. There is no rule that deprecated code must progress to End-of-Life.
No deprecated APIs can change to End-of-Life without going through a Runtime
Deprecation cycle. There is no rule that deprecated code must progress to End-of-Life.
Documentation-Only and Runtime Deprecations can remain in place for an unlimited
duration.

Expand Down Expand Up @@ -1059,6 +1065,7 @@ need to be attached anymore, as only important bugfixes will be included.
[node-core-utils-issues]: https://github.com/nodejs/node-core-utils/issues
[ppc]: https://github.com/orgs/nodejs/teams/platform-ppc
[s390]: https://github.com/orgs/nodejs/teams/platform-s390
[semantic versioning]: https://semver.org/
[smartos]: https://github.com/orgs/nodejs/teams/platform-smartos
[unreliable tests]: https://github.com/nodejs/node/issues?q=is%3Aopen+is%3Aissue+label%3A%22CI+%2F+flaky+test%22
[windows]: https://github.com/orgs/nodejs/teams/platform-windows
Expand Down
2 changes: 1 addition & 1 deletion test/doctool/test-doc-api-json.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@ for await (const dirent of await fs.opendir(new URL('../../out/doc/api/', import
assert.partialDeepStrictEqual(allExpectedKeys, findAllKeys(json));
}

assert.strictEqual(numberOfDeprecatedSections, 44); // Increase this number every time a new API is deprecated.
assert.strictEqual(numberOfDeprecatedSections, 45); // Increase this number every time a new API is deprecated.
assert.strictEqual(numberOfRemovedAPIs, 46); // Increase this number every time a section is marked as removed.
Loading