diff --git a/src/workerd/api/node/async-hooks.h b/src/workerd/api/node/async-hooks.h index 4419004ef7d..b13244fffdd 100644 --- a/src/workerd/api/node/async-hooks.h +++ b/src/workerd/api/node/async-hooks.h @@ -61,7 +61,7 @@ class AsyncLocalStorage final: public jsg::Object { JSG_METHOD(enterWith); JSG_METHOD(disable); - if (flags.getNodeJs18CompatExperimental()) { + if (flags.getNodeJsCompat()) { JSG_TS_OVERRIDE(AsyncLocalStorage { getStore(): T | undefined; run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; @@ -171,7 +171,7 @@ class AsyncResource final: public jsg::Object { JSG_METHOD(bind); JSG_METHOD(runInAsyncScope); - if (flags.getNodeJs18CompatExperimental()) { + if (flags.getNodeJsCompat()) { JSG_TS_OVERRIDE(interface AsyncResourceOptions { triggerAsyncId?: number; }); @@ -208,7 +208,7 @@ class AsyncHooksModule final: public jsg::Object { JSG_NESTED_TYPE(AsyncLocalStorage); JSG_NESTED_TYPE(AsyncResource); - if (flags.getNodeJs18CompatExperimental()) { + if (flags.getNodeJsCompat()) { JSG_TS_ROOT(); JSG_TS_OVERRIDE(AsyncHooksModule {}); } else { diff --git a/src/workerd/io/worker.c++ b/src/workerd/io/worker.c++ index c5cc89e9f65..777facbd024 100644 --- a/src/workerd/io/worker.c++ +++ b/src/workerd/io/worker.c++ @@ -985,7 +985,7 @@ Worker::Isolate::Isolate(kj::Own apiIsolateParam, lock->setCaptureThrowsAsRejections(features.getCaptureThrowsAsRejections()); lock->setCommonJsExportDefault(features.getExportCommonJsDefaultNamespace()); - if (features.getNodeJs18CompatExperimental()) { + if (features.getNodeJsCompat()) { // Enabling async context tracking installs a relatively expensive callback on the v8 isolate // that attaches additional metadata to every promise created. The additional metadata is used // to implement support for the Node.js AsyncLocalStorage API. Since that is the only current diff --git a/src/workerd/server/workerd-api.c++ b/src/workerd/server/workerd-api.c++ index b299ebb427e..98bc08ac95c 100644 --- a/src/workerd/server/workerd-api.c++ +++ b/src/workerd/server/workerd-api.c++ @@ -314,7 +314,7 @@ kj::Own WorkerdApiIsolate::compileModules( } } - if (getFeatureFlags().getNodeJs18CompatExperimental()) { + if (getFeatureFlags().getNodeJsCompat()) { api::node::registerNodeJsCompatModules(*modules, getFeatureFlags()); }