This package is not used by pnpm from v5
Checks the integrity of a package
When pnpm saves a package to the store, it creates an integrity.json
file.
integrity.json
contains a hash for each file of the package.
@pnpm/check-package
can check whether the resources of the package were modified, using integrity.json
.
Install it via npm.
npm install @pnpm/npm-resolver
'use strict'
const checkPackage = require('@pnpm/check-package').default
checkPackage('test/fixtures/good/pkg')
.then(ok => {
console.log(Boolean(ok))
//> true
})
.catch(err => console.error(err))
If the package has been touched, false
is returned. If the package has its "canonical" form, the content
of integrity.json
is returned.