-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
esm: ensure watch mode restarts after syntax errors #61232
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
base: main
Are you sure you want to change the base?
Conversation
Move watch dependency reporting earlier in module resolution to ensure file dependencies are tracked even when parsing fails. Fixes: nodejs#61153
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61232 +/- ##
==========================================
- Coverage 88.54% 88.53% -0.01%
==========================================
Files 704 704
Lines 208734 208743 +9
Branches 40271 40267 -4
==========================================
- Hits 184823 184814 -9
- Misses 15932 15948 +16
- Partials 7979 7981 +2
🚀 New features to boost your workflow:
|
|
Can you add a test? |
|
Just added a test, let me know if that's too broad and shouldn't be tested through cli. |
| shouldFail: true, | ||
| }); | ||
|
|
||
| try { |
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.
why wrapping in try catch? it shouldnt fail
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.
It's a try finally, not a try catch. It shouldn't fail but wether it does or doesn't, the child processed need to be killed. The same try-finally is used every time restart is used in the file, so I just reused it.
Move watch dependency reporting earlier in module resolution to ensure file dependencies are tracked even when parsing fails.
Fixes: #61153