This repository was archived by the owner on Apr 16, 2020. It is now read-only.
File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,26 @@ void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors) {
107
107
errors->push_back (" --loader requires --experimental-modules be enabled" );
108
108
}
109
109
110
+ if (!module_type.empty () && !experimental_modules) {
111
+ errors->push_back (" --type requires --experimental-modules be enabled" );
112
+ }
113
+
114
+ if (experimental_json_modules && !experimental_modules) {
115
+ errors->push_back (" --experimental-json-modules requires "
116
+ " --experimental-modules be enabled" );
117
+ }
118
+
119
+ if (!es_module_specifier_resolution.empty ()) {
120
+ if (!experimental_modules) {
121
+ errors->push_back (" --es-module-specifier-resolution requires "
122
+ " --experimental-modules be enabled" );
123
+ }
124
+ if (es_module_specifier_resolution != " node" &&
125
+ es_module_specifier_resolution != " explicit" ) {
126
+ errors->push_back (" invalid value for --es-module-specifier-resolution" );
127
+ }
128
+ }
129
+
110
130
if (syntax_check_only && has_eval_string) {
111
131
errors->push_back (" either --check or --eval can be used, not both" );
112
132
}
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ class EnvironmentOptions : public Options {
87
87
bool abort_on_uncaught_exception = false ;
88
88
bool experimental_json_modules = false ;
89
89
bool experimental_modules = false ;
90
- std::string es_module_specifier_resolution = " explicit " ;
90
+ std::string es_module_specifier_resolution;
91
91
std::string module_type;
92
92
std::string experimental_policy;
93
93
bool experimental_repl_await = false ;
You can’t perform that action at this time.
0 commit comments