From cb4476b68e2fb6302bf53393325d637d83cdaa8a Mon Sep 17 00:00:00 2001 From: Khafra Date: Thu, 28 Sep 2023 09:01:30 -0400 Subject: [PATCH] lib: add WebSocket client fixup add test lint fixup update doc/node.1 PR-URL: https://github.com/nodejs/node/pull/49830 Reviewed-By: Matteo Collina Reviewed-By: Robert Nagy --- .eslintrc.js | 1 + doc/api/cli.md | 10 ++++++ doc/api/globals.md | 13 ++++++++ doc/node.1 | 3 ++ lib/internal/process/pre_execution.js | 48 ++++++++++++++++----------- src/node_options.cc | 5 +++ src/node_options.h | 1 + test/common/globals.js | 1 + test/common/index.js | 3 ++ test/parallel/test-websocket.js | 7 ++++ 10 files changed, 72 insertions(+), 20 deletions(-) create mode 100644 test/parallel/test-websocket.js diff --git a/.eslintrc.js b/.eslintrc.js index f46a64bcbf2acd..8b462e0777c5d4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -361,5 +361,6 @@ module.exports = { WritableStream: 'readable', WritableStreamDefaultWriter: 'readable', WritableStreamDefaultController: 'readable', + WebSocket: 'readable', }, }; diff --git a/doc/api/cli.md b/doc/api/cli.md index 1da38c1739126b..013256d776bac7 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -738,6 +738,14 @@ added: v12.3.0 Enable experimental WebAssembly module support. +### `--experimental-websocket` + + + +Enable experimental [`WebSocket`][] support. + ### `--force-context-aware` + +> Stability: 1 - Experimental. + +A browser-compatible implementation of [`WebSocket`][]. Enable this API +with the [`--experimental-websocket`][] CLI flag. + ## Class: `WritableStream`