node/lib/internal/modules
Joyee Cheung 8c17ceb38f
module: allow cycles in require() in the CJS handling in ESM loader
When --import is used, the ESM loader is used to handle even pure
CJS entry points, and it can run into CJS module facades in the
evaluating state when the parent CJS module is being evaluated.
In this case it should be allowed, since the ESM <-> CJS cycles
that are meant to be disallowed (for the time being) should
already be detected before evaluation and wouldn't get here,
and CJS <-> CJS cycles are fine.

PR-URL: https://github.com/nodejs/node/pull/58598
Fixes: https://github.com/nodejs/node/issues/58515
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-06-11 09:33:16 +00:00
..
cjs module: move Module._debug to end-of-life 2025-05-30 17:22:59 -07:00
esm module: allow cycles in require() in the CJS handling in ESM loader 2025-06-11 09:33:16 +00:00
customization_hooks.js module: allow omitting context in synchronous next hooks 2025-02-18 15:28:59 +00:00
helpers.js module: implement module.registerHooks() 2024-12-09 23:27:08 +00:00
package_json_reader.js src: fix internalModuleStat v8 fast path 2025-04-29 17:53:12 +00:00
run_main.js esm: support top-level Wasm without package type 2025-04-03 19:38:40 -07:00
typescript.js deps: update amaro to 0.5.1 2025-04-03 12:00:52 +00:00