esm: fix wasm import name in error message - #64950
Merged
Merged
Conversation
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64950 +/- ##
==========================================
+ Coverage 90.28% 90.29% +0.01%
==========================================
Files 760 760
Lines 247137 247137
Branches 46617 46607 -10
==========================================
+ Hits 223122 223148 +26
+ Misses 15493 15454 -39
- Partials 8522 8535 +13
🚀 New features to boost your workflow:
|
Report the rejected import name instead of the import module when throwing for reserved Wasm import names. Signed-off-by: hyemimi <hyemi7375@gmail.com>
hyemimi
force-pushed
the
fix-wasm-import-name-error
branch
from
August 2, 2026 13:43
9f31dd8 to
ec541f0
Compare
jasnell
approved these changes
Aug 2, 2026
jsumners-nr
approved these changes
Aug 3, 2026
guybedford
approved these changes
Aug 4, 2026
Collaborator
Collaborator
Collaborator
|
Landed in 9766a67 |
aduh95
pushed a commit
that referenced
this pull request
Aug 13, 2026
Report the rejected import name instead of the import module when throwing for reserved Wasm import names. Signed-off-by: hyemimi <hyemi7375@gmail.com> PR-URL: #64950 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the error message for reserved Wasm import names.
The loader checks
impt.namewhen rejecting import names that start withwasm:orwasm-js:, but the thrown error message reportedimpt.moduleinstead.This made the message point at the wrong part of the Wasm import.
This changes the message to report the rejected import name.