# detect-package-changes

> Notifies whether package.json dependency versions do not match node_module contents

Latest version **0.0.1** (published 2021-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install detect-package-changes
pnpm add detect-package-changes
yarn add detect-package-changes
bun add detect-package-changes
```

Provides the command `detect-package-changes`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2021-02-19 |
| First published | 2021-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Renan Montebelo |
| Maintainers | renan.montebelo |
| Keywords | cli, package, json, lock, check, change, update, git, hooks |

## Links

- npm: https://www.npmjs.com/package/detect-package-changes
- Repository: https://github.com/renanmontebelo/detect-package-changes
- Issues: https://github.com/renanmontebelo/detect-package-changes/issues
- npm.io page: https://npm.io/package/detect-package-changes

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.1 (latest) — 2021-02-19

## README

# detect-package-changes

_TLDR: run `npx detect-package-changes install` in the root folder of the project_

---------------------------------------------------------

Requires npm, git and a bash-compatible shell, including WSL.

Checks if your `package-lock.json` dependencies versions match the actual files in you `node_module` folder after you checkout or pull (merge) branches.

For performance reasons only top-level dependencies in `package.json` are checked. Versions between `package.json` and `package-lock.json` files are also not checked as `npm install` should take care of this consistency.

## Install

Run `npx detect-package-changes install` in the root folder of the project. To remove, run `npx detect-package-changes uninstall`.

## Usage

After installation you should get a warning message when checking out branches and a version mismatch is detected. This package does not update or modify any project-related files. Note, however, that this project does modify git hooks.

## CLI reference

```
npx detect-package-changes <command> <args>

command:
  install (default): insert the checks into git hooks
  uninstall: remove the inserted checks from git hooks
  check: manually run the check (you probably don't need to use this)
  help: see this message

args:
  --verbose: enables debug messages that might help in error investigations
  --hooks=<comma-separated list of git hooks>: add the checks to these specific hooks. Default is --hooks=post-checkout,post-merge,post-rebase
  --folder=<folder>: the root folder of the project to add the checks to (this is generally auto-detected correctly but you may override it here)
  ```

## Roadmap

- Make it compatible with monorepos

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