Skip to content

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

Open
avivkeller wants to merge 1 commit into
nodejs:mainfrom
avivkeller:promises
Open

avivkeller wants to merge 1 commit 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.49%. Comparing base (c61ba86) to head (e0d5196).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66810      +/-   ##
==========================================
- Coverage   90.50%   90.49%   -0.02%     
==========================================
  Files         797      797              
  Lines      277785   277784       -1     
  Branches    53365    53357       -8     
==========================================
- Hits       251418   251384      -34     
- Misses      16753    16796      +43     
+ Partials     9614     9604      -10     
Files with missing lines Coverage Δ
lib/internal/modules/esm/module_job.js 99.59% <100.00%> (+<0.01%) ⬆️

... and 27 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.

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.

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)

2 participants