-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix npm module parsing issues caused by broken spec (#11)
* Adds `omitempty` tag to PackageJSON fields * Adds comments to exported types and methods * Simplifies range expressions * Adds godoc comments * Handle JSON parsing issues due to broken spec gracefully Co-authored-by: n0ncetonic <n0ncetonic@users.noreply.github.com>
- Loading branch information
1 parent
6954d49
commit 94de6a7
Showing
4 changed files
with
53 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
package main | ||
|
||
// A PackageResolver resolves package information from a file | ||
// | ||
// ReadPackagesFromFile should take a filepath as input and parse relevant package information into a struct and then return any errors encountered while reading or unmarshalling the file. | ||
// | ||
// PackagesNotInPublic should determine whether or not a package is not available in a public package repository and return a slice of all packages not available in a public package repository. | ||
type PackageResolver interface { | ||
ReadPackagesFromFile(string) error | ||
PackagesNotInPublic() []string | ||
} | ||
} |
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
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