sanitycheck

ensure that all deps are present and accounted for CI / CD

sanitycheck

ensure that all deps are present and accounted for CI / CD

add it as a dev dependency to your project

$ npm install --save-dev sanitycheck

and add it to your test command by editing your package.json:

{
  "scripts": {
    "test": "sanitycheck && <test runner>"
  }
}

Now you can run it using $ npm test and add it to your favorite testing or CI scripts.

If there are any errors, it exits with an error code of 1. As of 2.0.0, dependencies found in package.json but not used in code count as errors.

Checking for unused or missing dependencies in package.json...
Validating all require statements...
···
OK
Checking for unused or missing dependencies in package.json...
Dependencies missing in package.json: cool-ascii-faces
Checking for unused or missing dependencies in package.json...
Validating all require statements...
·☹ ·
1 Errors:
Error: Inside "c:\dev\sanitycheck\index.js"
Cannot resolve "./SUB" because:
"c:\dev\sanitycheck\SUB.js" doesn't exactly match the actual file path
"c:\dev\sanitycheck\sub.js"

makes use of excellent work from @thlorenz in valiquire and @jutaz in depscan

ISC. (c) MMXIV jden jason@denizac.org. See LICENSE.md