Skip to content

Conversation

joyeecheung
Copy link
Member

Clarify the names - hasAsyncGraph means either the module or its dependencies contains top-level await; hasTopLevelAwait means the module itself contains top-level await. Theoratically the former can be inferred from iterating over the dependencies but for the built-in loader it's currently not fully reliable until we eliminate async linking.

Also remove the hasTopLevelAwait method - we can simply put it on the module wrap for source text modules right after compilation.

Clarify the names - hasAsyncGraph means either the module or its
dependencies contains top-level await; hasTopLevelAwait means the
module itself contains top-level await. Theoratically the former
can be inferred from iterating over the dependencies but for the
built-in loader it's currently not fully reliable until we eliminate
async linking.

Also remove the hasTopLevelAwait method - we can simply put it
on the module wrap for source text modules right after compilation.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/vm

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Aug 29, 2025
Copy link

codecov bot commented Aug 29, 2025

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.90%. Comparing base (bcb802c) to head (a8ef8b8).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
src/module_wrap.cc 66.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59675      +/-   ##
==========================================
- Coverage   89.91%   89.90%   -0.02%     
==========================================
  Files         667      667              
  Lines      196600   196667      +67     
  Branches    38601    38613      +12     
==========================================
+ Hits       176780   176814      +34     
- Misses      12269    12295      +26     
- Partials     7551     7558       +7     
Files with missing lines Coverage Δ
lib/internal/modules/esm/loader.js 96.12% <100.00%> (ø)
lib/internal/modules/esm/module_job.js 97.50% <100.00%> (+<0.01%) ⬆️
src/module_wrap.h 52.94% <ø> (ø)
src/module_wrap.cc 74.59% <66.66%> (-0.72%) ⬇️

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

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 31, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 31, 2025
@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. 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.

4 participants