-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Hard fail on invalid bundle names #136
feat: Hard fail on invalid bundle names #136
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files
☔ View full report in Codecov by Sentry. |
Bundle ReportChanges will increase total bundle size by 1.04kB ⬆️
|
* | ||
* @param {NormalizedOptionsFailure} options - The normalized options that failed validation. | ||
*/ | ||
export const handleErrors = (options: NormalizedOptionsFailure) => { |
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.
so this leads to some duplicate code, but I never like process exits as a side effect to a function like this.
Instead can we return a boolean shouldExit
from this function? Then the consumer of this function calls process.exit
so it's very clear to readers when an exit happens?
this is just my opinion though, so feel free to disregard, doesn't block.
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.
Must be a big fan of throw/try/catch
then 😉
Ouu I really like this, updating now.
Description
This PR updates the plugins to hard fail when a user passes an invalid bundle name, exiting the process. This is a small change, but should really help people when setting up the bundler plugins if they're not getting any data in Codecov but still seeing checkmarks across their CI.
Closes #124
Notable Changes
handleErrors
function the plugin core