-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
mertcanaltin
wants to merge
24
commits into
nodejs:main
Choose a base branch
from
mertcanaltin:mert/improve-esm-warning
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+42
−18
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
777a249
module: add dynamic file-specific ESM warnings
mertcanaltin 5541de0
Update src/node_contextify.cc
mertcanaltin 87b5e2e
Update test-typescript-commonjs.mjs
mertcanaltin 23b8955
lint
mertcanaltin 05c573f
fix: resolved import issue with assert module
mertcanaltin 17eb1d4
conversion error in UTF-8 string creation
mertcanaltin 7f2ff3f
Update node_contextify.cc
mertcanaltin da45468
lint
mertcanaltin 9cd44cf
undo irrelevant changes
mertcanaltin 1b276e4
undo irrelevant changes
mertcanaltin 72da569
lint
mertcanaltin 3929988
undo irrelevant changes
mertcanaltin de2dfaa
Update src/node_process_events.cc
mertcanaltin e30094e
using v8 NewStringType
mertcanaltin b812ebc
sort edited
mertcanaltin 476f2f4
sort edited
mertcanaltin 411b050
lint
mertcanaltin 96d6038
update messages for windows
mertcanaltin 1c133c9
Update test-typescript-commonjs.mjs
mertcanaltin 001a823
use regexp for CommonJS error
2f8aeb6
lint
0d2eda8
fix: properly escape testFilePath in regex assertion
mertcanaltin 423640a
revert regex suggestion
mertcanaltin 2351547
sync
mertcanaltin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
I think you are basically replicating
assert.match(result.stderr, /Failed to load the ES module:.*test-cts-but-module-syntax\.cts ......../)
here?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.
I edited, thanks for suggestion
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.
Hi @joyeecheung ,
Thanks for your suggestion about using assert.ok(result.stderr.includes(expectedWarning)). I tried replacing the regex-based assertion with that approach, but I'm now getting this new error:
It seems like the actual output still doesn’t match the string in expectedWarning. Do you have any idea why this might be happening or how I could fix it?
Thanks in advance for your help!
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.
I wonder if you have any suggestions @jasnell