This repository was archived by the owner on Apr 16, 2020. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -699,7 +699,7 @@ inline Maybe<URL> ResolveIndex(const URL& search) {
699699Maybe<URL> FinalizeResolution (Environment* env,
700700                              const  URL& resolved,
701701                              const  URL& base) {
702-   if  (env->options ()->legacy_resolution ) {
702+   if  (env->options ()->esm_extension_resolution  ==  " cjs "  ) {
703703    Maybe<URL> file = ResolveExtensions<TRY_EXACT_NAME>(resolved);
704704    if  (!file.IsNothing ()) {
705705      return  file;
Original file line number Diff line number Diff line change @@ -236,9 +236,9 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
236236            " (default: llhttp)."  ,
237237            &EnvironmentOptions::http_parser,
238238            kAllowedInEnvironment );
239-   AddOption (" --legacy -resolution"  ,
240-             " legacy  extension and folder  resolution for ES Modules "  ,
241-             &EnvironmentOptions::legacy_resolution ,
239+   AddOption (" --esm-extension -resolution"  ,
240+             " Select  extension resolution algorithm  for esm; either 'none' or 'cjs' "  ,
241+             &EnvironmentOptions::esm_extension_resolution ,
242242            kAllowedInEnvironment );
243243  AddOption (" --no-deprecation"  ,
244244            " silence deprecation warnings"  ,
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ class EnvironmentOptions : public Options {
8686 public: 
8787  bool  abort_on_uncaught_exception = false ;
8888  bool  experimental_modules = false ;
89-   bool  legacy_resolution  = false ;
89+   std::string esm_extension_resolution  = " none "  ;
9090  std::string module_type;
9191  std::string experimental_policy;
9292  bool  experimental_repl_await = false ;
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments