Skip to content

Commit aa218be

Browse files
committed
module: doc-deprecate module.register() (DEP0205)
1 parent 5d900be commit aa218be

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

doc/api/deprecations.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4517,6 +4517,20 @@ Type: Documentation-only
45174517
Passing a non-extractable [`CryptoKey`][] to [`KeyObject.from()`][] is
45184518
deprecated and will throw an error in a future version.
45194519
4520+
### DEP0205: `module.register()`
4521+
4522+
<!-- YAML
4523+
changes:
4524+
- version: REPLACEME
4525+
pr-url: https://github.com/nodejs/node/pull/62395
4526+
description: Documentation-only deprecation.
4527+
-->
4528+
4529+
Type: Documentation-only
4530+
4531+
[`module.register()`][] is deprecated. Use [`module.registerHooks()`][]
4532+
instead.
4533+
45204534
[DEP0142]: #dep0142-repl_builtinlibs
45214535
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
45224536
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -4540,6 +4554,8 @@ deprecated and will throw an error in a future version.
45404554
[`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError
45414555
[`KeyObject.from()`]: crypto.md#static-method-keyobjectfromkey
45424556
[`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand
4557+
[`module.register()`]: module.md#moduleregisterspecifier-parenturl-options
4558+
[`module.registerHooks()`]: module.md#moduleregisterhooksoptions
45434559
[`ReadStream.open()`]: fs.md#class-fsreadstream
45444560
[`Server.getConnections()`]: net.md#servergetconnectionscallback
45454561
[`Server.listen({fd: <number>})`]: net.md#serverlistenhandle-backlog-callback

doc/api/module.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,12 @@ isBuiltin('wss'); // false
178178
added:
179179
- v20.6.0
180180
- v18.19.0
181+
deprecated: REPLACEME
181182
changes:
183+
- version: REPLACEME
184+
pr-url: https://github.com/nodejs/node/pull/REPLACEME
185+
description: Documentation-only deprecation (DEP0205). Use
186+
`module.registerHooks()` instead.
182187
- version:
183188
- v23.6.1
184189
- v22.13.1
@@ -193,7 +198,7 @@ changes:
193198
description: Add support for WHATWG URL instances.
194199
-->
195200
196-
> Stability: 1.1 - Active development
201+
> Stability: 0 - Deprecated: Use [`module.registerHooks()`][] instead.
197202
198203
* `specifier` {string|URL} Customization hooks to be registered; this should be
199204
the same string that would be passed to `import()`, except that if it is

0 commit comments

Comments
 (0)