From 796f3d0af49164314868c4778af90eca356f1fef Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Fri, 11 Oct 2019 17:57:13 -0400 Subject: esm: unflag --experimental-modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/29866 Reviewed-By: Michaƫl Zasso Reviewed-By: Myles Borins --- src/node_options.cc | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) (limited to 'src/node_options.cc') diff --git a/src/node_options.cc b/src/node_options.cc index 92ee79b583..85256a7e0a 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -113,10 +113,6 @@ void PerIsolateOptions::CheckOptions(std::vector* errors) { } void EnvironmentOptions::CheckOptions(std::vector* errors) { - if (!userland_loader.empty() && !experimental_modules) { - errors->push_back("--experimental-loader requires " - "--experimental-modules be enabled"); - } if (has_policy_integrity_string && experimental_policy.empty()) { errors->push_back("--policy-integrity requires " "--experimental-policy be enabled"); @@ -126,30 +122,12 @@ void EnvironmentOptions::CheckOptions(std::vector* errors) { } if (!module_type.empty()) { - if (!experimental_modules) { - errors->push_back("--input-type requires " - "--experimental-modules to be enabled"); - } if (module_type != "commonjs" && module_type != "module") { errors->push_back("--input-type must be \"module\" or \"commonjs\""); } } - 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"); - } - if (!es_module_specifier_resolution.empty()) { - if (!experimental_modules) { - errors->push_back("--es-module-specifier-resolution requires " - "--experimental-modules be enabled"); - } if (es_module_specifier_resolution != "node" && es_module_specifier_resolution != "explicit") { errors->push_back("invalid value for --es-module-specifier-resolution"); @@ -322,15 +300,12 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { &EnvironmentOptions::experimental_json_modules, kAllowedInEnvironment); AddOption("--experimental-loader", - "(with --experimental-modules) use the specified file as a " - "custom loader", + "use the specified module as a custom loader", &EnvironmentOptions::userland_loader, kAllowedInEnvironment); AddAlias("--loader", "--experimental-loader"); - AddOption("--experimental-modules", - "experimental ES Module support and caching modules", - &EnvironmentOptions::experimental_modules, - kAllowedInEnvironment); + AddAlias("--experimental-modules", { "--experimental-conditional-exports", + "--experimental-resolve-self" }); AddOption("--experimental-conditional-exports", "experimental support for conditional exports targets", &EnvironmentOptions::experimental_conditional_exports, -- cgit v1.2.3