-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle case of invalid package.json with no explicit config (#5198)
* fix: report syntax errors in package.json (fixes: #5141) * fix(tests): incorrect test (should use existing result) Since `readFileSync` is only stubbed `onFirstCall` we get a different answer the second time around which is probably Not What You Want. But also we *already checked that config = false*. So you could just remove this test, it does nothing useful. * fix: separate read and parse errors * fix: clarify invalid JSON Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com> * fix(test): expect only a SyntaxError nothing else --------- Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
- Loading branch information
1 parent
68803b6
commit f72bc17
Showing
2 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters