◐ Shell
clean mode source ↗

module: do not invoke resolve hooks twice for imported cjs by joyeecheung · Pull Request #61529 · nodejs/node

@nodejs-github-bot added esm

Issues and PRs related to the ECMAScript Modules implementation.

module

Issues and PRs related to the module subsystem.

needs-ci

PRs that need a full CI run.

labels

Jan 26, 2026
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

@joyeecheung joyeecheung changed the title module: do not invoke resolve hooks again for imported cjs module: do not invoke resolve hooks twice for imported cjs

Jan 26, 2026

JakobJingleheimer

jsumners-nr

aduh95 pushed a commit that referenced this pull request

Feb 8, 2026
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

PR-URL: #61529
Fixes: #57125
Refs: #55808
Refs: #56241
Reviewed-By: Jacob Smith <jacob@frende.me>

aduh95 pushed a commit that referenced this pull request

Feb 10, 2026
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

PR-URL: #61529
Fixes: #57125
Refs: #55808
Refs: #56241
Reviewed-By: Jacob Smith <jacob@frende.me>

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Feb 11, 2026

aduh95 pushed a commit that referenced this pull request

Feb 14, 2026
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

PR-URL: #61529
Fixes: #57125
Refs: #55808
Refs: #56241
Reviewed-By: Jacob Smith <jacob@frende.me>

aduh95 pushed a commit that referenced this pull request

Feb 22, 2026
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

PR-URL: #61529
Fixes: #57125
Refs: #55808
Refs: #56241
Reviewed-By: Jacob Smith <jacob@frende.me>

joyeecheung added a commit to joyeecheung/node that referenced this pull request

Feb 25, 2026
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

PR-URL: nodejs#61529
Fixes: nodejs#57125
Refs: nodejs#55808
Refs: nodejs#56241
Reviewed-By: Jacob Smith <jacob@frende.me>

joyeecheung added a commit to joyeecheung/node that referenced this pull request

Feb 25, 2026
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

PR-URL: nodejs#61529
Fixes: nodejs#57125
Refs: nodejs#55808
Refs: nodejs#56241
Reviewed-By: Jacob Smith <jacob@frende.me>

joyeecheung added a commit to joyeecheung/node that referenced this pull request

Feb 27, 2026
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

PR-URL: nodejs#61529
Fixes: nodejs#57125
Refs: nodejs#55808
Refs: nodejs#56241
Reviewed-By: Jacob Smith <jacob@frende.me>

marco-ippolito pushed a commit that referenced this pull request

Apr 27, 2026
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

PR-URL: #61529
Backport-PR-URL: #62029
Fixes: #57125
Refs: #55808
Refs: #56241
Reviewed-By: Jacob Smith <jacob@frende.me>
Fixes: #61801