FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

esm: fix wasm import name in error message by hyemimi · Pull Request #64950 · nodejs/node · GitHub

/ node Public

esm: fix wasm import name in error message - #64950

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
hyemimi:fix-wasm-import-name-error
Aug 5, 2026
Merged

esm: fix wasm import name in error message#64950
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
hyemimi:fix-wasm-import-name-error

Conversation

hyemimi commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Fix the error message for reserved Wasm import names.

The loader checks impt.name when rejecting import names that start with wasm: or wasm-js:, but the thrown error message reported impt.module instead.
This made the message point at the wrong part of the Wasm import.

This changes the message to report the rejected import name.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Aug 2, 2026

codecov Bot commented Aug 2, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.29%. Comparing base (bb76938) to head (ec541f0).
⚠️ Report is 92 commits behind head on main.

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     
Files with missing lines Coverage Δ
lib/internal/modules/esm/translators.js 97.55% <100.00%> (ø)

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

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 9f31dd8 to ec541f0 Compare August 2, 2026 13:43
guybedford added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Aug 4, 2026
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

guybedford added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. and removed needs-ci PRs that need a full CI run. labels Aug 5, 2026
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 5, 2026
nodejs-github-bot merged commit 9766a67 into nodejs:main Aug 5, 2026
78 checks passed

Copy link
Copy Markdown
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>
aduh95 pushed a commit that referenced this pull request Aug 25, 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

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. esm Issues and PRs related to the ECMAScript Modules implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL