node/lib/internal/modules/cjs
Gabriel Bota 34e3dd5034
loader: fix package resolution for edge case
this commit solves a regression introduced with PR-40980.
if a resolve call results in a script with .mjs extension the
is automatically set to . This avoids the case where an additional
 in the same directory as the .mjs file would declare the
 to commonjs

PR-URL: https://github.com/nodejs/node/pull/41218
Refs: https://github.com/nodejs/node/pull/40980
Refs: https://github.com/yargs/yargs/issues/2068
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-22 18:43:19 +00:00
..
helpers.js src: add option to disable loading native addons 2021-09-10 10:54:39 -05:00
loader.js loader: fix package resolution for edge case 2021-12-22 18:43:19 +00:00