-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
esm: improve error messages for ambiguous module syntax #60376
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
esm: improve error messages for ambiguous module syntax #60376
Conversation
|
Review requested:
|
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
It looks like there are some conflicts here, could you please rebase your changes on top of the latest |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #60376 +/- ##
=======================================
Coverage 88.51% 88.51%
=======================================
Files 703 703
Lines 208405 208422 +17
Branches 40190 40198 +8
=======================================
+ Hits 184468 184489 +21
+ Misses 15941 15936 -5
- Partials 7996 7997 +1
🚀 New features to boost your workflow:
|
- Refactor getUndefinedCJSGlobalLike to use ArrayPrototypeFind - Change if-else chain to switch statement - Add single quotes around global names in error messages - Revert test file to use --input-type=module flag and original order - Update test regex patterns to expect quoted global names
f65596e to
90a476c
Compare
Remove unused ArrayPrototypeSome import and fix assert usage.
90a476c to
a56707f
Compare
|
Landed in 37d9cfc |
Fixes: #60322
Improve ERR_AMBIGUOUS_MODULE_SYNTAX error messages to show the actual undefined global instead of always mentioning require().