From f30baedc0139c133756c4e4b8135ab8114eeb6a6 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 29 Jul 2020 18:52:02 -0400 Subject: [PATCH] module: unflag Top-Level Await This unflags Top-Level await so it can be used by default in the module goal. This is accomplished by manually setting the --harmony-top-level-await flag. We are allowing this as a one of approval based on circumstances. It is not a precedent that future harmony features will be manually enabled. Refs: https://github.com/nodejs/node/issues/34551 --- doc/api/cli.md | 10 ---------- doc/api/esm.md | 8 +++----- doc/node.1 | 3 --- src/node.cc | 7 +++++++ src/node_options.cc | 3 ++- src/node_options.h | 2 +- test/es-module/test-esm-tla.mjs | 2 -- test/message/esm_display_syntax_error.mjs | 2 ++ test/message/esm_display_syntax_error.out | 2 +- test/message/esm_display_syntax_error_module.out | 4 ++-- test/message/esm_loader_syntax_error.out | 4 ++-- test/parallel/test-cli-node-options.js | 2 +- test/parallel/test-no-harmony-top-level-await.mjs | 11 +++++++++++ tools/code_cache/mkcodecache.cc | 1 + 14 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 test/parallel/test-no-harmony-top-level-await.mjs diff --git a/doc/api/cli.md b/doc/api/cli.md index 3e4b3e9348334f..899c28f6f76675 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -253,16 +253,6 @@ the ability to import a directory that has an index file. Please see [customizing ESM specifier resolution][] for example usage. -### `--experimental-top-level-await` - - -Enable experimental top-level `await` keyword support, available only in ES -module scripts. - -(See also `--experimental-repl-await`.) - ### `--experimental-vm-modules`