Skip to content

src,lib: obtain sourceURL in magic comments from V8 #58389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

legendecas
Copy link
Member

@legendecas legendecas commented May 19, 2025

Obtain sourceURL magic comments via V8 API to avoid a second round of
extraction of magic comments.

Updates source map snapshot normalization to allow testing full path
names inside the test outputs as in test source-map/output/source_map_eval.snapshot.

This is extracted from #52153.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/vm

@nodejs-github-bot nodejs-github-bot added 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 May 19, 2025
@legendecas legendecas force-pushed the source-maps/source-url branch from a0acfc2 to 5c92777 Compare May 19, 2025 11:03
@legendecas legendecas added the source maps Issues and PRs related to source map support. label May 19, 2025
Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 70.37037% with 8 lines in your changes missing coverage. Please review.

Project coverage is 90.23%. Comparing base (38757c9) to head (5c92777).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/node_contextify.cc 71.42% 2 Missing and 2 partials ⚠️
src/module_wrap.cc 60.00% 1 Missing and 1 partial ⚠️
lib/internal/main/embedding.js 50.00% 1 Missing ⚠️
lib/internal/modules/cjs/loader.js 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58389      +/-   ##
==========================================
- Coverage   90.24%   90.23%   -0.01%     
==========================================
  Files         633      633              
  Lines      186902   186922      +20     
  Branches    36696    36702       +6     
==========================================
+ Hits       168672   168673       +1     
- Misses      11026    11043      +17     
- Partials     7204     7206       +2     
Files with missing lines Coverage Δ
lib/internal/modules/esm/translators.js 91.57% <100.00%> (ø)
lib/internal/modules/esm/utils.js 98.91% <100.00%> (ø)
lib/internal/main/embedding.js 88.98% <50.00%> (+0.09%) ⬆️
lib/internal/modules/cjs/loader.js 98.26% <66.66%> (ø)
src/module_wrap.cc 72.05% <60.00%> (-0.08%) ⬇️
src/node_contextify.cc 81.09% <71.42%> (-0.12%) ⬇️

... and 33 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 force-pushed the source-maps/source-url branch from 5c92777 to 0b3cedc Compare May 19, 2025 13:59
@legendecas legendecas force-pushed the source-maps/source-url branch from 0b3cedc to c5c54bc Compare May 19, 2025 14:28
Obtain sourceURL magic comments via V8 API to avoid a second round of
extraction of magic comments.

Updates source map snapshot normalization to allow testing full path
names inside the test outputs.
@legendecas legendecas force-pushed the source-maps/source-url branch from c5c54bc to d25811d Compare May 19, 2025 14:32
@legendecas
Copy link
Member Author

@aduh95 thanks for suggestions, updated and remove unnecessary replacements.

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label May 19, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 19, 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
lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. source maps Issues and PRs related to source map support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants