| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 011fe1d commit 22b5ec1
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1185,6 +1185,7 @@ Node.js options that are allowed are: | |||
| 1185 | 1185 | * `--experimental-policy` | |
| 1186 | 1186 | * `--experimental-repl-await` | |
| 1187 | 1187 | * `--experimental-specifier-resolution` | |
| 1188 | + * `--experimental-top-level-await` | ||
| 1188 | 1189 | * `--experimental-vm-modules` | |
| 1189 | 1190 | * `--experimental-wasi-unstable-preview1` | |
| 1190 | 1191 | * `--experimental-wasm-modules` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -599,7 +599,8 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( | |||
| 599 | 599 | ||
| 600 | 600 | AddOption("--experimental-top-level-await", | |
| 601 | 601 | "enable experimental support for ECMAScript Top-Level Await", | |
| 602 | - &PerIsolateOptions::experimental_top_level_await); | ||
| 602 | + &PerIsolateOptions::experimental_top_level_await, | ||
| 603 | + kAllowedInEnvironment); | ||
| 603 | 604 | AddOption("--harmony-top-level-await", "", V8Option{}); | |
| 604 | 605 | Implies("--experimental-top-level-await", "--harmony-top-level-await"); | |
| 605 | 606 | Implies("--harmony-top-level-await", "--experimental-top-level-await"); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,6 +78,10 @@ expect('--stack-trace-limit=100', | |||
| 78 | 78 | if (!['arm', 'arm64', 's390x'].includes(process.arch)) | |
| 79 | 79 | expect('--interpreted-frames-native-stack', 'B\n'); | |
| 80 | 80 | ||
| 81 | + // Workers can't eval as ES Modules. https://github.com/nodejs/node/issues/30682 | ||
| 82 | + expectNoWorker('--experimental-top-level-await --input-type=module', | ||
| 83 | + 'B\n', 'console.log(await "B")'); | ||
| 84 | + | ||
| 81 | 85 | function expectNoWorker(opt, want, command, wantsError) { | |
| 82 | 86 | expect(opt, want, command, wantsError, false); | |
| 83 | 87 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments