Skip to content

Commit 0443f80

Browse files
committed
lib,src: remove --no-experimental-websocket CLI flag
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 9e23066 commit 0443f80

6 files changed

Lines changed: 12 additions & 41 deletions

File tree

doc/api/cli.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,14 +2139,6 @@ changes:
21392139

21402140
Disable the experimental [`node:sqlite`][] module.
21412141

2142-
### `--no-experimental-websocket`
2143-
2144-
<!-- YAML
2145-
added: v22.0.0
2146-
-->
2147-
2148-
Disable exposition of {WebSocket} on the global scope.
2149-
21502142
### `--no-experimental-webstorage`
21512143

21522144
<!-- YAML
@@ -3889,6 +3881,7 @@ one is included in the list below.
38893881
* `--experimental-vfs`
38903882
* `--experimental-vm-modules`
38913883
* `--experimental-wasi-unstable-preview1`
3884+
* `--experimental-websocket`
38923885
* `--force-context-aware`
38933886
* `--force-fips`
38943887
* `--force-node-api-uncaught-exceptions-policy`
@@ -3919,7 +3912,6 @@ one is included in the list below.
39193912
* `--no-experimental-global-navigator`
39203913
* `--no-experimental-sqlite`
39213914
* `--no-experimental-strip-types`
3922-
* `--no-experimental-websocket`
39233915
* `--no-experimental-webstorage`
39243916
* `--no-extra-info-on-fatal-exception`
39253917
* `--no-force-async-hooks-checks`

doc/api/globals.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,12 @@ added: v0.0.1
334334

335335
<!-- YAML
336336
added: v23.0.0
337+
- version: REPLACEME
338+
pr-url: TODO
339+
description: No longer be disabled with `--no-experimental-websocket` CLI flag.
337340
-->
338341

339-
A browser-compatible implementation of {CloseEvent}. Disable this API
340-
with the [`--no-experimental-websocket`][] CLI flag.
342+
A browser-compatible implementation of {CloseEvent}.
341343

342344
## Class: `CompressionStream`
343345

@@ -1299,6 +1301,9 @@ added:
12991301
- v21.0.0
13001302
- v20.10.0
13011303
changes:
1304+
- version: REPLACEME
1305+
pr-url: TODO
1306+
description: No longer be disabled with `--no-experimental-websocket` CLI flag.
13021307
- version: v22.4.0
13031308
pr-url: https://github.com/nodejs/node/pull/53352
13041309
description: No longer experimental.
@@ -1307,8 +1312,7 @@ changes:
13071312
description: No longer behind `--experimental-websocket` CLI flag.
13081313
-->
13091314

1310-
A browser-compatible implementation of {WebSocket}. Disable this API
1311-
with the [`--no-experimental-websocket`][] CLI flag.
1315+
A browser-compatible implementation of {WebSocket}.
13121316

13131317
## Class: `WritableStream`
13141318

@@ -1361,7 +1365,6 @@ A browser-compatible implementation of [`WritableStreamDefaultWriter`][].
13611365
[`--experimental-eventsource`]: cli.md#--experimental-eventsource
13621366
[`--localstorage-file`]: cli.md#--localstorage-filefile
13631367
[`--no-experimental-global-navigator`]: cli.md#--no-experimental-global-navigator
1364-
[`--no-experimental-websocket`]: cli.md#--no-experimental-websocket
13651368
[`--no-experimental-webstorage`]: cli.md#--no-experimental-webstorage
13661369
[`ByteLengthQueuingStrategy`]: webstreams.md#class-bytelengthqueuingstrategy
13671370
[`CompressionStream`]: webstreams.md#class-compressionstream

doc/node.1

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,9 +1107,6 @@ Legacy alias for \fB--no-require-module\fR.
11071107
.It Fl -no-experimental-sqlite
11081108
Disable the experimental \fBnode:sqlite\fR module.
11091109
.
1110-
.It Fl -no-experimental-websocket
1111-
Disable exposition of \fB<WebSocket>\fR on the global scope.
1112-
.
11131110
.It Fl -no-experimental-webstorage
11141111
Disable \fBWeb Storage\fR support.
11151112
.
@@ -2022,6 +2019,8 @@ one is included in the list below.
20222019
.It
20232020
\fB--experimental-wasi-unstable-preview1\fR
20242021
.It
2022+
\fB--experimental-websocket\fR
2023+
.It
20252024
\fB--force-context-aware\fR
20262025
.It
20272026
\fB--force-fips\fR
@@ -2082,8 +2081,6 @@ one is included in the list below.
20822081
.It
20832082
\fB--no-experimental-strip-types\fR
20842083
.It
2085-
\fB--no-experimental-websocket\fR
2086-
.It
20872084
\fB--no-experimental-webstorage\fR
20882085
.It
20892086
\fB--no-extra-info-on-fatal-exception\fR

lib/internal/process/pre_execution.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ function prepareExecution(options) {
121121
setupVfs();
122122
setupQuic();
123123
setupWebStorage();
124-
setupWebsocket();
125124
setupEventsource();
126125
setupCodeCoverage();
127126
setupDebugEnv();
@@ -352,14 +351,6 @@ function setupWarningHandler() {
352351
}
353352
}
354353

355-
// https://websockets.spec.whatwg.org/
356-
function setupWebsocket() {
357-
if (getOptionValue('--no-experimental-websocket')) {
358-
delete globalThis.WebSocket;
359-
delete globalThis.CloseEvent;
360-
}
361-
}
362-
363354
// https://html.spec.whatwg.org/multipage/server-sent-events.html
364355
function setupEventsource() {
365356
if (!getOptionValue('--experimental-eventsource')) {

src/node_options.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -595,11 +595,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
595595
kAllowedInEnvvar,
596596
false);
597597
#endif // HAVE_FFI
598-
AddOption("--experimental-websocket",
599-
"experimental WebSocket API",
600-
BOOL_FIELD(experimental_websocket),
601-
kAllowedInEnvvar,
602-
true);
598+
AddOption("--experimental-websocket", "", NoOp{}, kAllowedInEnvvar);
603599
AddOption("--experimental-global-customevent", "", NoOp{}, kAllowedInEnvvar);
604600
AddOption("--experimental-sqlite",
605601
"experimental node:sqlite module",

test/parallel/test-websocket-disabled.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)