-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
view: Better errors when package.json is not JSON
Previously, `npm view <noargs>` was just saying "Invalid package.json" if the package.json file was not JSON, or if it was missing. This errors out with the appropriate error in these cases. Also, no need to read the big clunky 'read-package-json' for this, we're literally just checking for a single field. We can be a bit more efficient here. PR-URL: #2051 Credit: @isaacs Close: #2051 Reviewed-by: @nlf
- Loading branch information
Showing
2 changed files
with
45 additions
and
5 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