summaryrefslogtreecommitdiff
path: root/src/node_options.cc
diff options
context:
space:
mode:
authorGeoffrey Booth <webmaster@geoffreybooth.com>2019-04-15 10:29:56 -0700
committerMyles Borins <mylesborins@google.com>2019-04-16 12:41:59 -0400
commit96e46d37c458ab3d6cf1148a471cfd1aac7aafe6 (patch)
treea037559ded34f2450af5c9a41c74463bb89cd56c /src/node_options.cc
parentf85ef977e6e9f0f655a8ff6aa4796d80ae94010e (diff)
downloadandroid-node-v8-96e46d37c458ab3d6cf1148a471cfd1aac7aafe6.tar.gz
android-node-v8-96e46d37c458ab3d6cf1148a471cfd1aac7aafe6.tar.bz2
android-node-v8-96e46d37c458ab3d6cf1148a471cfd1aac7aafe6.zip
esm: replace --entry-type with --input-type
New flag is for string input only PR-URL: https://github.com/nodejs/node/pull/27184 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'src/node_options.cc')
-rw-r--r--src/node_options.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/node_options.cc b/src/node_options.cc
index cb490dad75..d9c0d472fb 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -109,11 +109,11 @@ void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors) {
if (!module_type.empty()) {
if (!experimental_modules) {
- errors->push_back("--entry-type requires "
+ errors->push_back("--input-type requires "
"--experimental-modules to be enabled");
}
if (module_type != "commonjs" && module_type != "module") {
- errors->push_back("--entry-type must be \"module\" or \"commonjs\"");
+ errors->push_back("--input-type must be \"module\" or \"commonjs\"");
}
}
@@ -289,15 +289,15 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
"(default: llhttp).",
&EnvironmentOptions::http_parser,
kAllowedInEnvironment);
+ AddOption("--input-type",
+ "set module type for string input",
+ &EnvironmentOptions::module_type,
+ kAllowedInEnvironment);
AddOption("--loader",
"(with --experimental-modules) use the specified file as a "
"custom loader",
&EnvironmentOptions::userland_loader,
kAllowedInEnvironment);
- AddOption("--entry-type",
- "set module type name of the entry point",
- &EnvironmentOptions::module_type,
- kAllowedInEnvironment);
AddOption("--es-module-specifier-resolution",
"Select extension resolution algorithm for es modules; "
"either 'explicit' (default) or 'node'",