| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0b96ece commit 0093863
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4497,6 +4497,28 @@ Type: Documentation-only | |||
| 4497 | 4497 | Passing a non-extractable [`CryptoKey`][] to [`KeyObject.from()`][] is | |
| 4498 | 4498 | deprecated and will throw an error in a future version. | |
| 4499 | 4499 | ||
| 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 | + | ||
| 4500 | 4522 | [DEP0142]: #dep0142-repl_builtinlibs | |
| 4501 | 4523 | [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf | |
| 4502 | 4524 | [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 | |
@@ -4601,6 +4623,8 @@ deprecated and will throw an error in a future version. | |||
| 4601 | 4623 | [`message.trailersDistinct`]: http.md#messagetrailersdistinct | |
| 4602 | 4624 | [`message.trailers`]: http.md#messagetrailers | |
| 4603 | 4625 | [`module.createRequire()`]: module.md#modulecreaterequirefilename | |
| 4626 | + [`module.register()`]: module.md#moduleregisterspecifier-parenturl-options | ||
| 4627 | + [`module.registerHooks()`]: module.md#moduleregisterhooksoptions | ||
| 4604 | 4628 | [`os.networkInterfaces()`]: os.md#osnetworkinterfaces | |
| 4605 | 4629 | [`os.tmpdir()`]: os.md#ostmpdir | |
| 4606 | 4630 | [`process.env`]: process.md#processenv | |
@@ -4654,6 +4678,7 @@ deprecated and will throw an error in a future version. | |||
| 4654 | 4678 | [`zlib.bytesWritten`]: zlib.md#zlibbyteswritten | |
| 4655 | 4679 | [alloc]: buffer.md#static-method-bufferallocsize-fill-encoding | |
| 4656 | 4680 | [alloc_unsafe_size]: buffer.md#static-method-bufferallocunsafesize | |
| 4681 | + [caveats of asynchronous customization hooks]: module.md#caveats-of-asynchronous-customization-hooks | ||
| 4657 | 4682 | [from_arraybuffer]: buffer.md#static-method-bufferfromarraybuffer-byteoffset-length | |
| 4658 | 4683 | [from_string_encoding]: buffer.md#static-method-bufferfromstring-encoding | |
| 4659 | 4684 | [legacy URL API]: url.md#legacy-url-api | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -178,6 +178,7 @@ isBuiltin('wss'); // false | |||
| 178 | 178 | added: | |
| 179 | 179 | - v20.6.0 | |
| 180 | 180 | - v18.19.0 | |
| 181 | + deprecated: REPLACEME | ||
| 181 | 182 | changes: | |
| 182 | 183 | - version: | |
| 183 | 184 | - v23.6.1 | |
@@ -193,7 +194,7 @@ changes: | |||
| 193 | 194 | description: Add support for WHATWG URL instances. | |
| 194 | 195 | --> | |
| 195 | 196 | ||
| 196 | - > Stability: 1.1 - Active development | ||
| 197 | + > Stability: 0 - Deprecated: Use [`module.registerHooks()`][] instead. | ||
| 197 | 198 | ||
| 198 | 199 | * `specifier` {string|URL} Customization hooks to be registered; this should be | |
| 199 | 200 | the same string that would be passed to `import()`, except that if it is | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -160,5 +160,5 @@ for await (const dirent of await fs.opendir(new URL('../../out/doc/api/', import | |||
| 160 | 160 | assert.partialDeepStrictEqual(allExpectedKeys, findAllKeys(json)); | |
| 161 | 161 | } | |
| 162 | 162 | ||
| 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. | ||
| 164 | 164 | assert.strictEqual(numberOfRemovedAPIs, 46); // Increase this number every time a section is marked as removed. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments