# lock-verify

> Report if your package.json is out of sync with your package-lock.json.

Latest version **2.2.2** (published 2022-11-16) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install lock-verify
pnpm add lock-verify
yarn add lock-verify
bun add lock-verify
```

Provides the command `lock-verify`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.2.2 |
| Published | 2022-11-16 |
| First published | 2017-08-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 39 |
| Author | Rebecca Turner |
| Maintainers | fritzy, darcyclarke, nlf, gar, lukekarrys |

## Links

- npm: https://www.npmjs.com/package/lock-verify
- Repository: https://github.com/npm/lock-verify
- Homepage: https://github.com/npm/lock-verify#readme
- Issues: https://github.com/npm/lock-verify/issues
- npm.io page: https://npm.io/package/lock-verify

## Dependencies (3)

- [semver](https://npm.io/package/semver.md) ^5.4.1
- [@iarna/cli](https://npm.io/package/@iarna/cli.md) ^2.1.0
- [npm-package-arg](https://npm.io/package/npm-package-arg.md) ^6.1.0

## Recent versions

- 2.2.2 (latest) — 2022-11-16
- 2.2.1 — 2020-07-23
- 2.2.0 — 2020-01-30
- 2.1.0 — 2019-02-13
- 2.0.2 — 2018-05-02
- 2.0.1 — 2018-03-06
- 2.0.0 — 2018-02-15
- 1.1.0 — 2017-09-02
- 1.0.1 — 2017-09-01
- 1.0.0 — 2017-08-10

## README

# Note: pending imminent deprecation

**This module will be deprecated once npm v7 is released.  Please do not rely
on it more than absolutely necessary (ie, only if you are depending on
it for use with npm v6 internal dependencies).**

----

# lock-verify

Report if your package.json is out of sync with your package-lock.json.

## USAGE

```
const lockVerify = require('lock-verify')
lockVerify(moduleDir).then(result => {
  result.warnings.forEach(w => console.error('Warning:', w))
  if (!result.status) {
    result.errors.forEach(e => console.error(e))
    process.exit(1)
  }
})
```

As a library it's a function that takes the path to a module and returns a
promise that resolves to an object with `.status`, `.warnings` and `.errors`
properties.  The first will be true if everything was ok (though warnings
may exist). If there's no `package.json` or no lockfile in `moduleDir` or they're
unreadable then the promise will be rejected.

---
_Source: https://npm.io/package/lock-verify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
