From 54746bb763ebea0dc7e99d88ff4b379bcd680964 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 PR-URL: https://github.com/nodejs/node/pull/34558 Reviewed-By: Mary Marchini Reviewed-By: Zeyu Yang Reviewed-By: Gus Caplan Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum Reviewed-By: Gireesh Punathil Reviewed-By: Shelley Vohr --- 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 3e4b3e93483..899c28f6f76 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`