Skip to content

module: await the cycle roots capability promise, if needed - #66810

Open
avivkeller wants to merge 2 commits into
nodejs:mainfrom
avivkeller:promises
Open

avivkeller wants to merge 2 commits into
nodejs:mainfrom
avivkeller:promises

Conversation

@avivkeller

Copy link
Copy Markdown
Member

Fixes #66806 by waiting for a module, if status === kEvaluated && this.module.hasAsyncGraph resolves to true.

Signed-off-by: avivkeller <me@aviv.sh>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Oct 17, 2026
@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.53%. Comparing base (c61ba86) to head (0a067f6).
⚠️ Report is 464 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66810      +/-   ##
==========================================
+ Coverage   90.50%   90.53%   +0.02%     
==========================================
  Files         797      800       +3     
  Lines      277785   280493    +2708     
  Branches    53365    54143     +778     
==========================================
+ Hits       251418   253945    +2527     
+ Misses      16753    16666      -87     
- Partials     9614     9882     +268     
Files with missing lines Coverage Δ
lib/internal/modules/esm/module_job.js 99.32% <ø> (-0.27%) ⬇️

... and 231 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread lib/internal/modules/esm/module_job.js Resolved
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jasnell jasnell added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v26: top-level await import() of an evaluating-async module resolves before the module runs (TDZ ReferenceError)

6 participants