Skip to content

Commit

Permalink
doc,lib,src,test: rename WASI CLI flag
Browse files Browse the repository at this point in the history
The WASI API has moved from preview0 to preview1. This commit
updates the CLI flag accordingly.

PR-URL: #30980
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
cjihrig authored and BethGriggs committed Feb 6, 2020
1 parent bf4f516 commit 3454f65
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ added: v9.6.0

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

### `--experimental-wasi-unstable-preview0`
### `--experimental-wasi-unstable-preview1`
<!-- YAML
added: REPLACEME
-->
Expand Down Expand Up @@ -1107,7 +1107,7 @@ Node.js options that are allowed are:
* `--experimental-report`
* `--experimental-specifier-resolution`
* `--experimental-vm-modules`
* `--experimental-wasi-unstable-preview0`
* `--experimental-wasi-unstable-preview1`
* `--experimental-wasm-modules`
* `--force-context-aware`
* `--force-fips`
Expand Down
2 changes: 1 addition & 1 deletion doc/api/wasi.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
})();
```

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

## Class: WASI
Expand Down
2 changes: 1 addition & 1 deletion doc/node.1
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ feature.
.It Fl -experimental-vm-modules
Enable experimental ES module support in VM module.
.
.It Fl -experimental-wasi-unstable-preview0
.It Fl -experimental-wasi-unstable-preview1
Enable experimental WebAssembly System Interface support.
.
.It Fl -experimental-wasm-modules
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ function initializeWASI() {
const { NativeModule } = require('internal/bootstrap/loaders');
const mod = NativeModule.map.get('wasi');
mod.canBeRequiredByUsers =
getOptionValue('--experimental-wasi-unstable-preview0');
getOptionValue('--experimental-wasi-unstable-preview1');
}

function initializeCJSLoader() {
Expand Down
2 changes: 1 addition & 1 deletion src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
&EnvironmentOptions::experimental_report,
kAllowedInEnvironment);
#endif // NODE_REPORT
AddOption("--experimental-wasi-unstable-preview0",
AddOption("--experimental-wasi-unstable-preview1",
"experimental WASI support",
&EnvironmentOptions::experimental_wasi,
kAllowedInEnvironment);
Expand Down
2 changes: 1 addition & 1 deletion test/wasi/test-wasi-binding.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Flags: --experimental-wasi-unstable-preview0
// Flags: --experimental-wasi-unstable-preview1
'use strict';

const common = require('../common');
Expand Down
2 changes: 1 addition & 1 deletion test/wasi/test-wasi-options-validation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

// Flags: --experimental-wasi-unstable-preview0
// Flags: --experimental-wasi-unstable-preview1

require('../common');
const assert = require('assert');
Expand Down
2 changes: 1 addition & 1 deletion test/wasi/test-wasi-start-validation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Flags: --experimental-wasi-unstable-preview0
// Flags: --experimental-wasi-unstable-preview1
'use strict';

const common = require('../common');
Expand Down
2 changes: 1 addition & 1 deletion test/wasi/test-wasi-symlinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if (process.argv[2] === 'wasi-child') {
console.log('executing', options.test);
const opts = { env: { ...process.env, NODE_DEBUG_NATIVE: 'wasi' } };
const child = cp.spawnSync(process.execPath, [
'--experimental-wasi-unstable-preview0',
'--experimental-wasi-unstable-preview1',
'--experimental-wasm-bigint',
__filename,
'wasi-child',
Expand Down
2 changes: 1 addition & 1 deletion test/wasi/test-wasi.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if (process.argv[2] === 'wasi-child') {
opts.input = options.stdin;

const child = cp.spawnSync(process.execPath, [
'--experimental-wasi-unstable-preview0',
'--experimental-wasi-unstable-preview1',
'--experimental-wasm-bigint',
__filename,
'wasi-child',
Expand Down

0 comments on commit 3454f65

Please sign in to comment.