From 34310f21969d0dbb980190820bc8ea4fcd595f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnlaugur=20=C3=9E=C3=B3r=20Briem?= Date: Sat, 12 Mar 2022 11:02:45 +0000 Subject: [PATCH] module: unflag WASM modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WebAssembly has been unflagged in V8 for years, and is presented on equal footing with Javascript in [how V8 describes itself][v8.dev] for years now ("Google’s open source high-performance JavaScript and WebAssembly engine"). I can't find any specified reasons to keep it flagged and called experimental in Node (though maybe this PR will draw those out?). Following https://github.com/nodejs/node/pull/41736 as a model, this PR leaves the flag present as a no-op and removes it from documentation, but keeps the "Stability: 1 - Experimental" in esm.md and the runtime warning message. I want to remove those too (or else draw out some specified reasons not to :) ) but there appears to be a convention of decoupling unflagging from stabilizing: https://github.com/nodejs/node/pull/41736#discussion_r794963854, so, like JSON modules, maybe drop the warning in 18.0.0? [v8.dev]: https://v8.dev/ --- doc/api/cli.md | 14 ++------------ doc/api/esm.md | 11 ++--------- doc/node.1 | 3 --- lib/internal/modules/esm/formats.js | 12 +++--------- src/node_options.cc | 5 +---- src/node_options.h | 1 - test/es-module/test-esm-wasm.mjs | 2 -- 7 files changed, 8 insertions(+), 40 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 8bfb1e9792ace5..9533c7f0d9cd4e 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -44,9 +44,8 @@ Otherwise, the file is loaded using the CommonJS module loader. See ### ECMAScript modules loader entry point caveat When loading [ECMAScript module loader][] loads the program entry point, the `node` -command will only accept as input only files with `.js`, `.mjs`, or `.cjs` -extensions; and with `.wasm` extensions when -[`--experimental-wasm-modules`][] is enabled. +command will only accept as input only files with `.js`, `.mjs`, `.cjs`, or +`.wasm` extensions. ## Options @@ -381,14 +380,6 @@ changes: Enable experimental WebAssembly System Interface (WASI) support. -### `--experimental-wasm-modules` - - - -Enable experimental WebAssembly module support. - ### `--force-context-aware`