npm-verify
v1.2.2
Published
Validates the content of a published npm package against its source git repo
Readme
npm-verify
npm-verify validates the content of a published npm package against its source git repository to ensure integrity.
What it does
npm-verify performs a comprehensive verification process:
- Downloads the specified package from npm
- Extracts the repository URL from package metadata
- Clones the source repository
- Identifies the git commit corresponding to the published version
- Builds the package from source using standard npm commands
- Compares the built package content with the published version
- Reports any discrepancies found
Installation
npm install -g npm-verifyOr just run npx npm-verify [..].
Usage
Basic usage
# Verify latest version of a package
npm-verify lodash
# Verify specific version
npm-verify [email protected]
# Verify with custom repository URL
npm-verify [email protected] -r https://github.com/chevett/wabbitzzzCommand line options
<package>- Package to verify in formatpackage@versionor justpackage(uses latest version)-r, --repo <url>- Repository URL (optional, if not specified in package.json)--no-color- Disable colored output
License
MIT
Repository
https://github.com/nbr23/npm-verify
