Files
pnpm/lockfile/audit/example.js
2024-07-28 01:15:20 +02:00

8 lines
327 B
JavaScript

const audit = require('./lib').default
const { readWantedLockfile } = require('@pnpm/lockfile.fs')
readWantedLockfile('../..', {})
.then((lockfile) => audit(lockfile, { registry: 'https://registry.npmjs.org' }))
.then((auditResult) => console.log(JSON.stringify(auditResult, null, 2)))
.catch(console.log.bind(console))