node/doc/api
Matteo Collina 2c4356cedf
domain: port to AsyncLocalStorage
Port the domain module from createHook (async_hooks) to
AsyncLocalStorage using the AsyncContextFrame-based implementation.

Key changes:
- Use AsyncLocalStorage for domain context propagation instead of
  async_hooks.createHook()
- Lazy initialization that triggers AsyncContextFrame prototype swap
  on first domain use
- Use enterWith instead of ALS.run() so domain context is NOT
  automatically restored on exception - this matches the original
  domain.run() behavior where exit() only runs on success
- Add ERR_ASYNC_RESOURCE_DOMAIN_REMOVED error for AsyncResource.domain
- Update DEP0097 to End-of-Life status
- Remove tests that relied on the removed MakeCallback domain property

The domain module now uses the AsyncContextFrame version of
AsyncLocalStorage directly for proper context propagation across
async boundaries.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/61095
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-06-21 19:42:03 +00:00
..
addons.md src: officially deprecate node::ObjectWrap 2026-06-13 23:12:14 +00:00
assert.md doc: remove unnecessary <!-- eslint- magic comments 2026-05-10 15:06:35 +00:00
async_context.md 2026-05-07, Version 26.1.0 (Current) 2026-05-07 12:01:50 +02:00
async_hooks.md
buffer.md 2026-06-01, Version 26.3.0 (Current) 2026-06-01 15:01:03 +02:00
child_process.md doc: fix inconsistencies in CJS code snippets 2026-05-10 14:16:15 +00:00
cli.md doc: fix typo in cli.md 2026-06-15 09:42:39 +00:00
cluster.md doc: fix inconsistencies in CJS code snippets 2026-05-10 14:16:15 +00:00
console.md doc: remove unnecessary <!-- eslint- magic comments 2026-05-10 15:06:35 +00:00
crypto.md crypto: move DEP0198 to End-of-Life 2026-06-21 11:18:48 +00:00
debugger.md debugger: add --max-hit option to probe mode 2026-06-13 20:50:15 +00:00
deprecations.md domain: port to AsyncLocalStorage 2026-06-21 19:42:03 +00:00
dgram.md dgram: add synchronous Socket connectSync() 2026-06-17 19:09:05 +00:00
diagnostics_channel.md 2026-05-07, Version 26.1.0 (Current) 2026-05-07 12:01:50 +02:00
dns.md doc: fix a/an article typos in module, util, and dns 2026-06-08 14:42:21 +00:00
documentation.md
domain.md
dtls.md src, lib: add stats to dtls 2026-05-21 14:13:05 -07:00
embedding.md
environment_variables.md doc: fix small environment_variables typo 2026-03-18 15:48:15 +00:00
errors.md domain: port to AsyncLocalStorage 2026-06-21 19:42:03 +00:00
esm.md loader: implement package maps 2026-06-12 16:02:01 +00:00
events.md 2026-02-24, Version 24.14.0 'Krypton' (LTS) 2026-02-24 10:20:06 -05:00
ffi.md ffi: add experimental fast FFI call API for AArch64 and x86_64 2026-06-16 09:35:02 +00:00
fs.md fs: support caller-supplied readFile() buffers 2026-06-13 10:08:05 +00:00
globals.md 2026-05-05, Version 26.0.0 (Current) 2026-05-05 11:17:12 -03:00
http.md net: support TCP_KEEPINTVL and TCP_KEEPCNT in setKeepAlive 2026-06-13 23:12:25 +00:00
http2.md 2026-06-18, Version 22.23.0 'Jod' (LTS) 2026-06-18 06:29:24 +02:00
https.md crypto,https,tls: runtime-deprecate OpenSSL engine-based APIs (DEP0183) 2026-06-19 18:03:51 +02:00
index.md vfs: add minimal node:vfs subsystem 2026-05-23 18:43:31 +00:00
inspector.md inspector: fix inspector.close() documented behavior 2026-06-20 04:04:20 +00:00
intl.md
module.md doc: fix a/an article typos in module, util, and dns 2026-06-08 14:42:21 +00:00
modules.md loader: implement package maps 2026-06-12 16:02:01 +00:00
n-api.md 2026-05-21, Version 24.16.0 'Krypton' (LTS) 2026-05-21 15:17:18 +02:00
net.md net: early TCP binding via synchronous net.BoundSocket 2026-06-20 14:40:48 -07:00
os.md doc: remove unnecessary <!-- eslint- magic comments 2026-05-10 15:06:35 +00:00
packages.md doc: fix typo in packages.md 2026-06-12 21:08:07 +00:00
path.md
perf_hooks.md doc: remove unnecessary <!-- eslint- magic comments 2026-05-10 15:06:35 +00:00
permissions.md lib,permission: add permission.drop 2026-05-26 13:40:14 +00:00
process.md 2026-06-01, Version 26.3.0 (Current) 2026-06-01 15:01:03 +02:00
punycode.md
querystring.md
quic.md quic: expose QUIC certificates as JS X509Certificate, not raw handles 2026-06-20 20:11:47 +00:00
readline.md
repl.md 2026-05-07, Version 26.1.0 (Current) 2026-05-07 12:01:50 +02:00
report.md tools: fix small inconsistencies in JSON doc output 2026-02-09 22:58:43 +00:00
single-executable-applications.md doc: clarify SEA platform support excludes darwin-x64 2026-05-10 07:38:57 +00:00
sqlite.md doc: clarify filter option of sqlite.database.applyChangeset 2026-05-26 13:41:13 +00:00
stream.md doc: add webstreams to args for pipeline from stream/promises 2026-06-04 08:41:43 +00:00
stream_iter.md stream: refine the stream/iter backpressure 2026-06-17 16:08:46 +00:00
string_decoder.md
synopsis.md tools: fix small inconsistencies in JSON doc output 2026-02-09 22:58:43 +00:00
test.md doc: fix incorrect test runner mock examples 2026-06-17 09:11:36 +00:00
timers.md
tls.md crypto,https,tls: runtime-deprecate OpenSSL engine-based APIs (DEP0183) 2026-06-19 18:03:51 +02:00
tracing.md doc: fix inconsistencies in CJS code snippets 2026-05-10 14:16:15 +00:00
tty.md doc: clarify tty raw mode applies to input processing only 2026-06-02 22:57:15 +00:00
typescript.md 2026-05-05, Version 26.0.0 (Current) 2026-05-05 11:17:12 -03:00
url.md doc: include url.resolve() in DEP0169 application deprecation 2026-03-02 23:03:53 +00:00
util.md doc: fix typo in util.md 2026-06-20 16:14:30 +09:00
v8.md lib: insert argv[0] at argv[1] in setDeserializeMainFunction 2026-06-10 11:36:03 +09:00
vfs.md vfs: add minimal node:vfs subsystem 2026-05-23 18:43:31 +00:00
vm.md doc: fix typo in vm.md 2026-06-12 21:45:48 +00:00
wasi.md doc: fix inconsistencies in CJS code snippets 2026-05-10 14:16:15 +00:00
webcrypto.md crypto: support non-byte WebCrypto lengths and cSHAKE 2026-06-20 18:42:04 +02:00
webstreams.md doc: document TransformStream transformer.cancel option 2026-04-04 20:17:43 +00:00
worker_threads.md doc: add worker_threads history entries 2026-06-02 16:40:38 +02:00
zlib.md doc: remove unnecessary <!-- eslint- magic comments 2026-05-10 15:06:35 +00:00