Skip to content
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

module: add dynamic file-specific ESM warnings #56628

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mertcanaltin
Copy link
Member

I improved the error message to include specific file and package.json details, trying to make it clearer and more actionable as requested in the TODO

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. vm Issues and PRs related to the vm subsystem. labels Jan 16, 2025
@mertcanaltin mertcanaltin force-pushed the mert/improve-esm-warning branch from 621136c to 777a249 Compare January 16, 2025 15:17
@mertcanaltin mertcanaltin added module Issues and PRs related to the module subsystem. esm Issues and PRs related to the ECMAScript Modules implementation. labels Jan 16, 2025
@mertcanaltin mertcanaltin changed the title feat: add dynamic file-specific ESM warnings module: add dynamic file-specific ESM warnings Jan 16, 2025
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.10%. Comparing base (3fe8027) to head (17eb1d4).
Report is 231 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56628      +/-   ##
==========================================
- Coverage   89.19%   89.10%   -0.10%     
==========================================
  Files         662      665       +3     
  Lines      191893   193204    +1311     
  Branches    36937    37218     +281     
==========================================
+ Hits       171164   172159     +995     
- Misses      13573    13762     +189     
- Partials     7156     7283     +127     
Files with missing lines Coverage Δ
src/node_contextify.cc 80.75% <100.00%> (-0.61%) ⬇️
src/node_process_events.cc 60.93% <100.00%> (+1.92%) ⬆️

... and 139 files with indirect coverage changes

@mertcanaltin
Copy link
Member Author

mertcanaltin commented Jan 17, 2025

Could this be flakky? but tests to my local is success https://github.com/nodejs/node/actions/runs/12811945783/job/35722483892?pr=56628

src/node_contextify.cc Outdated Show resolved Hide resolved
Co-authored-by: Anna Henningsen <[email protected]>
@mertcanaltin
Copy link
Member Author

mertcanaltin commented Feb 12, 2025

The issue was that v8::String::NewFromUtf8 expected a const char*, but a std::string_view was passed. Converted using .data() and explicit length (cast to int). Special thanks to @addaleax for the help!

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++. 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. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants