From 51ae57673dabe0546f796151839c632e7a8dd079 Mon Sep 17 00:00:00 2001 From: Stephen Belanger Date: Sat, 2 Nov 2024 16:14:28 +0100 Subject: [PATCH] lib: make ALS default to AsyncContextFrame MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/55552 Reviewed-By: Matteo Collina Reviewed-By: Yagiz Nizipli Reviewed-By: Paolo Insogna Reviewed-By: Chengzhong Wu Reviewed-By: Ruben Bridgewater Reviewed-By: Gerhard Stöbich Reviewed-By: Minwoo Jung Reviewed-By: Rafael Gonzaga --- doc/api/cli.md | 30 +++++++++---------- lib/internal/async_context_frame.js | 2 +- src/node_options.cc | 5 ++-- ...s => test-without-async-context-frame.mjs} | 4 +-- 4 files changed, 20 insertions(+), 21 deletions(-) rename test/parallel/{test-async-context-frame.mjs => test-without-async-context-frame.mjs} (94%) diff --git a/doc/api/cli.md b/doc/api/cli.md index eeb7f25f4f8..685de52107d 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -930,21 +930,6 @@ and `"` are usable. It is possible to run code containing inline types by passing [`--experimental-strip-types`][]. -### `--experimental-async-context-frame` - - - -> Stability: 1 - Experimental - -Enables the use of [`AsyncLocalStorage`][] backed by `AsyncContextFrame` rather -than the default implementation which relies on async\_hooks. This new model is -implemented very differently and so could have differences in how context data -flows within the application. As such, it is presently recommended to be sure -your application behaviour is unaffected by this change before using it in -production. - ### `--experimental-default-type=type` + +> Stability: 2 - Stable + +Disables the use of [`AsyncLocalStorage`][] backed by `AsyncContextFrame` and +uses the prior implementation which relied on async\_hooks. The previous model +is retained for compatibility with Electron and for cases where the context +flow may differ. However, if a difference in flow is found please report it. + ### `--no-deprecation`