-
Notifications
You must be signed in to change notification settings - Fork 143
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
Rethrow functions esbuild errors #5231
base: 01-17-don_t_start_the_dev_session_if_there_are_build_errors
Are you sure you want to change the base?
Rethrow functions esbuild errors #5231
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report
Test suite run success2004 tests passing in 905 suites. Report generated by 🧪jest coverage report action from a1b5698 |
We detected some changes at packages/*/src and there are no updates in the .changeset. |
23d656e
to
a1b5698
Compare
const errors = error.errors ?? [] | ||
// If there is an `errors` array, it's an esbuild error, re-throw it directly. | ||
if (errors.length) throw error |
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.
since we never use errors
again
const errors = error.errors ?? [] | |
// If there is an `errors` array, it's an esbuild error, re-throw it directly. | |
if (errors.length) throw error | |
// If there is an `errors` array, it's an esbuild error, re-throw it directly. | |
if (error.errors?.length) throw error |
WHY are these changes introduced?
We want ESBuild errors from functions to appear in the dev logs.
WHAT is this pull request doing?
If a javascript function throws an ESBuild error, re-throw as it is and the dev-session will automatically parse and format it.
How to test your changes?
Measuring impact
Checklist