-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
syntax errors in package-scripts.js should not be swallowed. #22
Comments
Oh that's great! Yes, let's do that 👍 Thanks! |
* Fixes sezna#22 * If the package-scripts.js file fails to load due to syntax error, don't swallow the error.
* fix(bin-utils): Don't swallow syntax errors When trying to require the package-scripts.js if it failed due to a syntax error it would say it could not find the file which was misleading. * test(bin-utils): Add tests for not swallowing syntax errors * docs(contributors): Added myself as a contributor Closes #22
I think this is a problem again... |
Indeed, my errors are getting eaten. UPDATE: |
I feel like the problem here is a lack of distinction between a missing config file, and one which is simply invalid. |
A missing config file will report a warning, but any exception that the config file itself throws will be reported to the user. "Empty" configs are now also considered invalid; e.g. a 0-byte .js file or one exporting an plain empty object. #22
Already merged, closing :) |
p-s
version: 1.0.1node
version: 6.2.1npm
version: 3.9.3Problem description:
If there is a syntax error in the
package-scripts.js
(in my case for example a missing comma) then it will fail to load. However your error message swallows the syntax error and just says that it cannot find thepackage-scripts.js
file which was confusing for me.Suggested solution:
Basically when capturing the error here
Just add a check for syntax error:
I'll gladly make the change and submit a PR.
The text was updated successfully, but these errors were encountered: