GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: deprecate `module.register()` (DEP0205) · nodejs/node@0093863

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • deprecations.md
    • module.md
  • test/doctool
    • test-doc-api-json.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/deprecations.md‎

Copy file name to clipboardExpand all lines: doc/api/deprecations.md
+25Lines changed: 25 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -4497,6 +4497,28 @@ Type: Documentation-only
44974497
Passing a non-extractable [`CryptoKey`][] to [`KeyObject.from()`][] is
44984498
deprecated and will throw an error in a future version.
44994499
4500+
### DEP0205: `module.register()`
4501+
4502+
<!-- YAML
4503+
changes:
4504+
- version: REPLACEME
4505+
pr-url: https://github.com/nodejs/node/pull/62395
4506+
description: Documentation-only deprecation.
4507+
-->
4508+
4509+
Type: Documentation-only
4510+
4511+
[`module.register()`][] is deprecated. Use [`module.registerHooks()`][]
4512+
instead.
4513+
4514+
The `module.register()` API provides off-thread async hooks for customizing ES modules;
4515+
the `module.registerHooks()` API provides similar hooks that are synchronous, in-thread, and
4516+
work for all types of modules.
4517+
Supporting async hooks has proven to be complex, involving worker threads orchestration, and there are issues
4518+
that have proven unresolveable. See [caveats of asynchronous customization hooks][]. Please migrate to
4519+
`module.registerHooks()` as soon as possible as `module.register()` will be
4520+
removed in a future version of Node.js.
4521+
45004522
[DEP0142]: #dep0142-repl_builtinlibs
45014523
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
45024524
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -4601,6 +4623,8 @@ deprecated and will throw an error in a future version.
46014623
[`message.trailersDistinct`]: http.md#messagetrailersdistinct
46024624
[`message.trailers`]: http.md#messagetrailers
46034625
[`module.createRequire()`]: module.md#modulecreaterequirefilename
4626+
[`module.register()`]: module.md#moduleregisterspecifier-parenturl-options
4627+
[`module.registerHooks()`]: module.md#moduleregisterhooksoptions
46044628
[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
46054629
[`os.tmpdir()`]: os.md#ostmpdir
46064630
[`process.env`]: process.md#processenv
@@ -4654,6 +4678,7 @@ deprecated and will throw an error in a future version.
46544678
[`zlib.bytesWritten`]: zlib.md#zlibbyteswritten
46554679
[alloc]: buffer.md#static-method-bufferallocsize-fill-encoding
46564680
[alloc_unsafe_size]: buffer.md#static-method-bufferallocunsafesize
4681+
[caveats of asynchronous customization hooks]: module.md#caveats-of-asynchronous-customization-hooks
46574682
[from_arraybuffer]: buffer.md#static-method-bufferfromarraybuffer-byteoffset-length
46584683
[from_string_encoding]: buffer.md#static-method-bufferfromstring-encoding
46594684
[legacy URL API]: url.md#legacy-url-api
Collapse file

‎doc/api/module.md‎

Copy file name to clipboardExpand all lines: doc/api/module.md
+2-1Lines changed: 2 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ isBuiltin('wss'); // false
178178
added:
179179
- v20.6.0
180180
- v18.19.0
181+
deprecated: REPLACEME
181182
changes:
182183
- version:
183184
- v23.6.1
@@ -193,7 +194,7 @@ changes:
193194
description: Add support for WHATWG URL instances.
194195
-->
195196
196-
> Stability: 1.1 - Active development
197+
> Stability: 0 - Deprecated: Use [`module.registerHooks()`][] instead.
197198
198199
* `specifier` {string|URL} Customization hooks to be registered; this should be
199200
the same string that would be passed to `import()`, except that if it is
Collapse file

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

Copy file name to clipboardExpand all lines: test/doctool/test-doc-api-json.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,5 @@ for await (const dirent of await fs.opendir(new URL('../../out/doc/api/', import
160160
assert.partialDeepStrictEqual(allExpectedKeys, findAllKeys(json));
161161
}
162162

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

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.