-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix: error handling for empty yarn lock files (#158) #159
Conversation
Thanks in advance! I'm currently traveling but will do my best to get to this in a few days! |
@candrews I'm not entirely sure I get the expected result of this PR/general capability here. |
The names of the tests that I've added in this PR are:
I think those are reasonably decent names... if you have a suggestion for improving them, I'm happy to implement it #namingthingsishard |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #159 +/- ##
==========================================
+ Coverage 97.74% 97.75% +0.01%
==========================================
Files 13 13
Lines 354 356 +2
Branches 77 78 +1
==========================================
+ Hits 346 348 +2
Misses 8 8
☔ View full report in Codecov by Sentry. |
Ensure that empty npm lock files are currently and continue to be handled properly
@candrews making sure you see my above comment |
Yes, I've run similar command as you've run, and now I've even run the same one:
It is what I expected. If you pass a lock file that is invalid (like a file containing just the I'm happy to implement a different approach, though - tell me what you want and I'll do my best to make it happen :) |
Ok then, let's land this :-) |
Thank you very much! |
Thank you! |
Description
fix error handling for empty yarn lock files (#158)
Currently, running any validator against an empty lock file results in a exception with a stack trace, like this:
This PR fixes that issue by adding validation to the validators.
Types of changes
Related Issue
#158
Motivation and Context
Empty lock files are not handled appropriately - this MR fixes that issue.
How Has This Been Tested?
I've added two new unit tests (one for yarn, one for npm).
Screenshots (if appropriate):
n/a
Checklist: