Skip to content

Commit d6f9420

Browse files
cjihrigBridgeAR
authored andcommitted
doc,lib,src,test: rename WASI CLI flag
The WASI API has moved from preview0 to preview1. This commit updates the CLI flag accordingly. PR-URL: #30980 Reviewed-By: David Carlier <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 32805a9 commit d6f9420

10 files changed

+16
-11
lines changed

doc/api/cli.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,14 @@ added: v9.6.0
230230

231231
Enable experimental ES Module support in the `vm` module.
232232

233-
### `--experimental-wasi-unstable-preview0`
233+
### `--experimental-wasi-unstable-preview1`
234234
<!-- YAML
235235
added: v13.3.0
236+
changes:
237+
- version: REPLACEME
238+
pr-url: https://github.com/nodejs/node/pull/30980
239+
description: changed from `--experimental-wasi-unstable-preview0` to
240+
`--experimental-wasi-unstable-preview1`
236241
-->
237242

238243
Enable experimental WebAssembly System Interface (WASI) support.
@@ -1073,7 +1078,7 @@ Node.js options that are allowed are:
10731078
* `--experimental-resolve-self`
10741079
* `--experimental-specifier-resolution`
10751080
* `--experimental-vm-modules`
1076-
* `--experimental-wasi-unstable-preview0`
1081+
* `--experimental-wasi-unstable-preview1`
10771082
* `--experimental-wasm-modules`
10781083
* `--force-context-aware`
10791084
* `--force-fips`

doc/api/wasi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
2929
})();
3030
```
3131

32-
The `--experimental-wasi-unstable-preview0` and `--experimental-wasm-bigint`
32+
The `--experimental-wasi-unstable-preview1` and `--experimental-wasm-bigint`
3333
CLI arguments are needed for the previous example to run.
3434

3535
## Class: WASI

doc/node.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Enable experimental support for a package to load itself.
141141
.It Fl -experimental-vm-modules
142142
Enable experimental ES module support in VM module.
143143
.
144-
.It Fl -experimental-wasi-unstable-preview0
144+
.It Fl -experimental-wasi-unstable-preview1
145145
Enable experimental WebAssembly System Interface support.
146146
.
147147
.It Fl -experimental-wasm-modules

lib/internal/bootstrap/pre_execution.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ function initializeWASI() {
404404
const { NativeModule } = require('internal/bootstrap/loaders');
405405
const mod = NativeModule.map.get('wasi');
406406
mod.canBeRequiredByUsers =
407-
getOptionValue('--experimental-wasi-unstable-preview0');
407+
getOptionValue('--experimental-wasi-unstable-preview1');
408408
}
409409

410410
function initializeCJSLoader() {

src/node_options.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
361361
&EnvironmentOptions::experimental_report,
362362
kAllowedInEnvironment);
363363
#endif // NODE_REPORT
364-
AddOption("--experimental-wasi-unstable-preview0",
364+
AddOption("--experimental-wasi-unstable-preview1",
365365
"experimental WASI support",
366366
&EnvironmentOptions::experimental_wasi,
367367
kAllowedInEnvironment);

test/wasi/test-wasi-binding.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Flags: --experimental-wasi-unstable-preview0
1+
// Flags: --experimental-wasi-unstable-preview1
22
'use strict';
33

44
const common = require('../common');

test/wasi/test-wasi-options-validation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
// Flags: --experimental-wasi-unstable-preview0
3+
// Flags: --experimental-wasi-unstable-preview1
44

55
require('../common');
66
const assert = require('assert');

test/wasi/test-wasi-start-validation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Flags: --experimental-wasi-unstable-preview0
1+
// Flags: --experimental-wasi-unstable-preview1
22
'use strict';
33

44
const common = require('../common');

test/wasi/test-wasi-symlinks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ if (process.argv[2] === 'wasi-child') {
5959
console.log('executing', options.test);
6060
const opts = { env: { ...process.env, NODE_DEBUG_NATIVE: 'wasi' } };
6161
const child = cp.spawnSync(process.execPath, [
62-
'--experimental-wasi-unstable-preview0',
62+
'--experimental-wasi-unstable-preview1',
6363
'--experimental-wasm-bigint',
6464
__filename,
6565
'wasi-child',

test/wasi/test-wasi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ if (process.argv[2] === 'wasi-child') {
4444
opts.input = options.stdin;
4545

4646
const child = cp.spawnSync(process.execPath, [
47-
'--experimental-wasi-unstable-preview0',
47+
'--experimental-wasi-unstable-preview1',
4848
'--experimental-wasm-bigint',
4949
__filename,
5050
'wasi-child',

0 commit comments

Comments
 (0)