0.1.2 • Published 3 years ago

package-json-changed v0.1.2

Weekly downloads
21
License
MIT
Repository
github
Last release
3 years ago

package-json-changed

TLDR: run npx package-json-changed 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 package-json-changed install in the root folder of the project. To remove, run npx package-json-changed 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 package-json-changed <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

  • Target Node >= 10; currently >= 14 due to null coalescing;
0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago