Skip to content

fix: exit on unhandled promise rejection in build #566

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

Merged
merged 2 commits into from
Jul 29, 2021

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Jul 29, 2021

The default behavior in versions of Node < 15 is to just warn when a promise rejection is unhandled. This means that often we can't tell if the build has failed until we try to copy the built artifacts. This PR adds --unhandled-rejections=strict to NODE_OPTIONS, meaning that unhandled rejections fail the build early. This should not be a breaking change, because these builds already fail but it's just later and incorrectly appears to be a plugin error rather than a build error.

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Jul 29, 2021
@ascorbic ascorbic requested a review from lindsaylevine July 29, 2021 10:15
@ascorbic ascorbic merged commit b78c8c5 into main Jul 29, 2021
@ascorbic ascorbic deleted the fix/strict-rejections branch July 29, 2021 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants