From a61b8d791c89d1f2de998298d662b6e208b4bd98 Mon Sep 17 00:00:00 2001 From: Stephen Belanger Date: Sat, 26 Oct 2024 13:05:35 +0200 Subject: [PATCH] lib: make ALS default to AsyncContextFrame --- 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 cd2f4c27f322ba..feb20c89a65080 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`