diff --git a/doc/api/cli.md b/doc/api/cli.md index 514af04c02cd..7bfeaa5dc277 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1563,14 +1563,6 @@ changes: Enable experimental WebAssembly System Interface (WASI) support. -### `--experimental-web-worker` - - - -Enable experimental support for the Web Worker API. - ### `--experimental-worker-inspection` + +> Stability: 1.1 - Active Development + +Disable support for the Web Worker API. + ### `--no-experimental-websocket` > Stability: 1 - Experimental. Enable this API with the diff --git a/doc/node.1 b/doc/node.1 index dd541051de28..15296ceb93f0 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -836,9 +836,6 @@ Enable experimental ES Module support in the \fBnode:vm\fR module. .It Fl -experimental-wasi-unstable-preview1 Enable experimental WebAssembly System Interface (WASI) support. . -.It Fl -experimental-web-worker -Enable experimental support for the Web Worker API. -. .It Fl -experimental-worker-inspection Enable experimental support for the worker inspection with Chrome DevTools. . @@ -1110,6 +1107,9 @@ Legacy alias for \fB--no-require-module\fR. .It Fl -no-experimental-sqlite Disable the experimental \fBnode:sqlite\fR module. . +.It Fl -no-experimental-web-worker +Disable support for the Web Worker API. +. .It Fl -no-experimental-websocket Disable exposition of \fB\fR on the global scope. . @@ -2027,8 +2027,6 @@ one is included in the list below. .It \fB--experimental-wasi-unstable-preview1\fR .It -\fB--experimental-web-worker\fR -.It \fB--force-context-aware\fR .It \fB--force-fips\fR @@ -2089,6 +2087,8 @@ one is included in the list below. .It \fB--no-experimental-strip-types\fR .It +\fB--no-experimental-web-worker\fR +.It \fB--no-experimental-websocket\fR .It \fB--no-experimental-webstorage\fR diff --git a/src/node_options.cc b/src/node_options.cc index c743a20c31bf..e3afcabe9474 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -599,7 +599,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "experimental Web Worker API", BOOL_FIELD(experimental_web_worker), kAllowedInEnvvar, - false); + true); AddOption("--experimental-websocket", "experimental WebSocket API", BOOL_FIELD(experimental_websocket), diff --git a/src/node_options.h b/src/node_options.h index 142963dc44a2..49381f2f29cc 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -202,7 +202,7 @@ class EnvironmentOptions : public Options { DEFINE_BOOL_FIELD(experimental_addon_modules) = true; DEFINE_BOOL_FIELD(experimental_eventsource) = EXPERIMENTALS_DEFAULT_VALUE; DEFINE_BOOL_FIELD(experimental_ffi) = EXPERIMENTALS_DEFAULT_VALUE; - DEFINE_BOOL_FIELD(experimental_web_worker) = EXPERIMENTALS_DEFAULT_VALUE; + DEFINE_BOOL_FIELD(experimental_web_worker) = true; DEFINE_BOOL_FIELD(experimental_websocket) = true; DEFINE_BOOL_FIELD(experimental_sqlite) = HAVE_SQLITE; DEFINE_BOOL_FIELD(experimental_stream_iter) = EXPERIMENTALS_DEFAULT_VALUE; diff --git a/test/common/wpt.js b/test/common/wpt.js index 82b0777de5d5..b69ceb431bcf 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -836,11 +836,7 @@ class WPTRunner { this.resource = new ResourceLoader(path); this.concurrency = concurrency; - // Since we need to prepare the Web Worker APIs - // in the harness that runs on all WPT workers, - // we enable the API globally. This has no practical - // effect on the non-web-worker tests, however. - this.flags = ['--experimental-web-worker']; + this.flags = []; this.globalThisInitScripts = []; this.initScript = null; diff --git a/test/parallel/test-common-wpt-backends.js b/test/parallel/test-common-wpt-backends.js index f201adde64e1..1f88dd1277e6 100644 --- a/test/parallel/test-common-wpt-backends.js +++ b/test/parallel/test-common-wpt-backends.js @@ -16,7 +16,7 @@ const queueProbe = process.env.NODE_TEST_WPT_QUEUE_PROBE === '1'; const harnessPath = fixtures.path('wpt', 'resources', 'testharness.js'); const specPath = fixtures.path('wpt-backends-spec.js'); -const execArgv = ['--experimental-web-worker']; +const execArgv = []; function payload(throws) { return { diff --git a/test/parallel/test-common-wpt-webworker-error.js b/test/parallel/test-common-wpt-webworker-error.js index 76738303cdf2..685832a640b6 100644 --- a/test/parallel/test-common-wpt-webworker-error.js +++ b/test/parallel/test-common-wpt-webworker-error.js @@ -10,7 +10,7 @@ const { Worker } = require('worker_threads'); const workerPath = path.join(__dirname, '../common/wpt/worker.js'); const harnessPath = fixtures.path('wpt', 'resources', 'testharness.js'); -const execArgv = ['--experimental-web-worker']; +const execArgv = []; const workerData = { testRelativePath: 'workers/error-after-result.any.js', wptRunner: path.join(__dirname, '../common/wpt.js'), diff --git a/test/parallel/test-worker-spec-differences.js b/test/parallel/test-worker-spec-differences.js index 871745b99e04..7f67db5c43a0 100644 --- a/test/parallel/test-worker-spec-differences.js +++ b/test/parallel/test-worker-spec-differences.js @@ -1,4 +1,3 @@ -// Flags: --experimental-web-worker 'use strict'; const common = require('../common');