From ca64771257d23ceee97e882965269702c359f6aa Mon Sep 17 00:00:00 2001 From: Julien Cayzac Date: Fri, 8 Dec 2023 22:24:49 +0900 Subject: fix(unstable): Honor granular unstable flags in js runtime (#21466) This fixes #21434 for `BroadcastChannel` and `WebSocketStream`. `--unstable` still enable both, but granular unstable flags now also work: * `--unstable-net` now enables `WebSocketStream`. * `--unstable-broadcast-channel` now enables `BroadcastChannel`. * Additionally, there are now tests for all granular unstable flags. Since `unsafe-proto` already had tests, so I didn't add any for this one. It also introduces a map to keep track of granular unstable ids without having to sync multiple places. --- cli/tests/testdata/run/unstable_http.enabled.out | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cli/tests/testdata/run/unstable_http.enabled.out (limited to 'cli/tests/testdata/run/unstable_http.enabled.out') diff --git a/cli/tests/testdata/run/unstable_http.enabled.out b/cli/tests/testdata/run/unstable_http.enabled.out new file mode 100644 index 000000000..558f1f542 --- /dev/null +++ b/cli/tests/testdata/run/unstable_http.enabled.out @@ -0,0 +1,16 @@ +main [class HttpClient] +main [Function: createHttpClient] +main [class HttpConn] +main Symbol("[[associated_ws]]") +main [Function: serve] +main [Function: upgradeHttp] +main [Function: upgradeWebSocket] +main [Function: upgradeHttp] +worker [class HttpClient] +worker [Function: createHttpClient] +worker [class HttpConn] +worker Symbol("[[associated_ws]]") +worker [Function: serve] +worker [Function: upgradeHttp] +worker [Function: upgradeWebSocket] +worker [Function: upgradeHttp] -- cgit v1.2.3