diff options
author | Guy Bedford <guybedford@gmail.com> | 2019-09-28 15:01:23 -0400 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-08 21:18:04 -0700 |
commit | c0437d2633fb523fbc97deb3f1731bbefa4a2e90 (patch) | |
tree | 853bac233e5c0b27ae7b8ccd92585c5667dfd4b7 /src | |
parent | cbd8d715b2286e5726e6988921f5c870cbf74127 (diff) | |
download | android-node-v8-c0437d2633fb523fbc97deb3f1731bbefa4a2e90.tar.gz android-node-v8-c0437d2633fb523fbc97deb3f1731bbefa4a2e90.tar.bz2 android-node-v8-c0437d2633fb523fbc97deb3f1731bbefa4a2e90.zip |
Revert "esm: remove experimental status from JSON modules"
This reverts commit ec8776da6fa77628e12718bb38cee687303d4137.
PR-URL: https://github.com/nodejs/node/pull/29754
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_options.cc | 9 | ||||
-rw-r--r-- | src/node_options.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/node_options.cc b/src/node_options.cc index ee80039e1c..c75a5f5487 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -135,6 +135,11 @@ void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors) { } } + if (experimental_json_modules && !experimental_modules) { + errors->push_back("--experimental-json-modules requires " + "--experimental-modules be enabled"); + } + if (experimental_wasm_modules && !experimental_modules) { errors->push_back("--experimental-wasm-modules requires " "--experimental-modules be enabled"); @@ -316,6 +321,10 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "experimental support for exports in package.json", &EnvironmentOptions::experimental_exports, kAllowedInEnvironment); + AddOption("--experimental-json-modules", + "experimental JSON interop support for the ES Module loader", + &EnvironmentOptions::experimental_json_modules, + kAllowedInEnvironment); AddOption("--experimental-loader", "(with --experimental-modules) use the specified file as a " "custom loader", diff --git a/src/node_options.h b/src/node_options.h index dda9b2b875..5887191877 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -102,6 +102,7 @@ class EnvironmentOptions : public Options { bool abort_on_uncaught_exception = false; bool enable_source_maps = false; bool experimental_exports = false; + bool experimental_json_modules = false; bool experimental_modules = false; std::string es_module_specifier_resolution; bool experimental_wasm_modules = false; |