File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1932,9 +1932,8 @@ Module._extensions['.js'] = function(module, filename) {
19321932 format = 'typescript' ;
19331933 }
19341934 } else if ( path . extname ( filename ) === '' ) {
1935- // Extensionless files skip the .js suffix check above. When type is commonjs,
1936- // follow it so ESM syntax surfaces as SyntaxError instead of silently
1937- // delegating to ESM. For type: module, leave format undefined so our syntax
1935+ // Extensionless files skip the .js suffix check above. When type is commonjs, follow it so ESM
1936+ // syntax surfaces as SyntaxError. For type: module, leave format undefined so our syntax
19381937 // detection handles it (allowing CJS extensionless files in ESM packages).
19391938 pkg = packageJsonReader . getNearestParentPackageJSON ( filename ) ;
19401939 const typeFromPjson = pkg ?. data ?. type ;
You can’t perform that action at this time.
0 commit comments