Skip to content

Commit 519235b

Browse files
Apply suggestions from code review
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
1 parent 6e3ed67 commit 519235b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/modules/cjs/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@ Module._extensions['.js'] = function(module, filename) {
19341934
} else if (path.extname(filename) === '') {
19351935
// Extensionless files skip the .js suffix check above. When type is commonjs,
19361936
// follow it so ESM syntax surfaces as SyntaxError instead of silently
1937-
// delegating to ESM. For type: module, leave format undefined so V8's syntax
1937+
// delegating to ESM. For type: module, leave format undefined so our syntax
19381938
// detection handles it (allowing CJS extensionless files in ESM packages).
19391939
pkg = packageJsonReader.getNearestParentPackageJSON(filename);
19401940
const typeFromPjson = pkg?.data?.type;

0 commit comments

Comments
 (0)