Skip to content

Commit d153a03

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

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
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
@@ -4621,6 +4635,8 @@ deprecated and will throw an error in a future version.
46214635
[`message.trailersDistinct`]: http.md#messagetrailersdistinct
46224636
[`message.trailers`]: http.md#messagetrailers
46234637
[`module.createRequire()`]: module.md#modulecreaterequirefilename
4638+
[`module.register()`]: module.md#moduleregisterspecifier-parenturl-options
4639+
[`module.registerHooks()`]: module.md#moduleregisterhooksoptions
46244640
[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
46254641
[`os.tmpdir()`]: os.md#ostmpdir
46264642
[`process.env`]: process.md#processenv

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/62395
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

test/doctool/test-doc-api-json.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,5 +159,5 @@ for await (const dirent of await fs.opendir(new URL('../../out/doc/api/', import
159159
assert.partialDeepStrictEqual(allExpectedKeys, findAllKeys(json));
160160
}
161161

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

0 commit comments

Comments
 (0)