-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure the worker processes do not crash when parsing invalid syntax
The original code **never** handled the cases where `@babel/core`'s `transform` method throws an error, it just _happened_ to be that we didn't hit this case (because babel tended not to `throw` during parsing). This updates to ensure that our worker will always resolve, sometimes with `{ code, metadata }` and other times (when an error happens) `{ error, stack }`. When we resolve with `{ error, stack }` the parent process will throw an error with that information (so that `ember build` exits non-zero, or `ember serve` shows the build failure and then rebuilds succesfully once the syntax error is fixed).
- Loading branch information
Showing
2 changed files
with
26 additions
and
7 deletions.
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