node/test/node-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
..
1_hello_world
test_async
test_async_cleanup_hook
test_async_context
test_buffer node-api: add napi_create_external_sharedarraybuffer 2026-04-17 15:10:36 +00:00
test_callback_scope node-api: use Node-API in comments 2026-01-16 16:00:54 +00:00
test_cleanup_hook
test_env_teardown_gc
test_exception
test_fatal node-api: use Node-API in comments 2026-01-16 16:00:54 +00:00
test_fatal_exception
test_general
test_init_order
test_instance_data
test_make_callback
test_make_callback_recurse domain: port to AsyncLocalStorage 2026-06-21 19:42:03 +00:00
test_null_init
test_reference_by_node_api_version
test_sea_addon test: use fixture directories for sea tests 2026-01-22 23:32:44 +01:00
test_threadsafe_function node-api: use Node-API in comments 2026-01-16 16:00:54 +00:00
test_threadsafe_function_abort node-api: execute tsfn finalizer after queue drains when aborted 2026-04-17 15:10:21 +00:00
test_threadsafe_function_shutdown
test_uv_loop
test_uv_threadpool_size
test_worker_buffer_callback node-api: use Node-API in comments 2026-01-16 16:00:54 +00:00
test_worker_terminate node-api: use Node-API in comments 2026-01-16 16:00:54 +00:00
test_worker_terminate_finalization
.gitignore
node-api.status test: aix: unflake test_threadsafe_function/test flaky on AIX 2026-01-30 16:03:55 +00:00
testcfg.py