From aa218bef0ee6dd103c84ab017beec51f53da4701 Mon Sep 17 00:00:00 2001 From: Geoffrey Booth Date: Sun, 22 Mar 2026 10:46:49 -0700 Subject: [PATCH] module: doc-deprecate module.register() (DEP0205) --- doc/api/deprecations.md | 16 ++++++++++++++++ doc/api/module.md | 7 ++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index baeabb78505c1b..5980baeed1dd16 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -4517,6 +4517,20 @@ Type: Documentation-only Passing a non-extractable [`CryptoKey`][] to [`KeyObject.from()`][] is deprecated and will throw an error in a future version. +### DEP0205: `module.register()` + + + +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 @@ -4540,6 +4554,8 @@ deprecated and will throw an error in a future version. [`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError [`KeyObject.from()`]: crypto.md#static-method-keyobjectfromkey [`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand +[`module.register()`]: module.md#moduleregisterspecifier-parenturl-options +[`module.registerHooks()`]: module.md#moduleregisterhooksoptions [`ReadStream.open()`]: fs.md#class-fsreadstream [`Server.getConnections()`]: net.md#servergetconnectionscallback [`Server.listen({fd: })`]: net.md#serverlistenhandle-backlog-callback diff --git a/doc/api/module.md b/doc/api/module.md index 58092ab1c62a02..59541027602918 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -178,7 +178,12 @@ isBuiltin('wss'); // false added: - v20.6.0 - v18.19.0 +deprecated: REPLACEME changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/REPLACEME + description: Documentation-only deprecation (DEP0205). Use + `module.registerHooks()` instead. - version: - v23.6.1 - v22.13.1 @@ -193,7 +198,7 @@ changes: 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