Skip to content

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

Merged
nodejs-github-bot merged 2 commits intonodejs:mainfrom
joyeecheung:require-esm-cycle
Apr 8, 2024
Merged

module: disallow CJS <-> ESM edges in a cycle from require(esm)#52264
nodejs-github-bot merged 2 commits intonodejs:mainfrom
joyeecheung:require-esm-cycle

Conversation

@joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Mar 29, 2024

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: #52145

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-blocked-v20.x PRs that should land on the v20.x-staging branch but are blocked by another PR's pending backport. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disallow ESM-CJS-ESM-ESM cycles when using require(esm)

7 participants