Skip to content

module: disallow CJS <-> ESM edges in a cycle from require(esm)

This patch disallows CJS <-> ESM cycle edges when they come from require(esm) requested in ESM evalaution.

Drive-by: don't reuse the cache for imported CJS modules to stash source code of required ESM because the former is also used for cycle detection.

Fixes: https://github.com/nodejs/node/issues/52145

Merge request reports

Loading