Skip to content

schnerd/npm-check

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

121 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-satisfy

Checks to see if your node_modules satisfy the dependencies defined in package.json

This is a forked and simplified version of the awesome npm-satisfy. If you want the ability to update to the latest package, find unused packages, and much more, consider using npm-satisfy.

On the command line

This is how you should use npm-satisfy.

Install

$ npm install -g npm-satisfy

Use

$ npm-satisfy

Options

$ npm-satisfy --help

  Usage: npm-satisfy [options]

  Options:

    -h, --help         output usage information
    -V, --version      output the version number
    -p, --production   Ignore devDependencies.
-p, --production

By default npm-satisfy will look at packages listed as dependencies and devDependencies.

This option will let it ignore outdated and unused checks for packages listed as devDependencies.

API

The API is here in case you want to wrap this with your CI toolset.

var npmSatisfy = require('npm-satisfy');

npmSatisfy(options)
  .then(result);

npmSatisfy(options) returns promise

options
ignoreDev boolean
  • default is false

Ignore devDependencies.

path string
  • default is cwd

Override where npm-satisfy checks.

#####result

object of module names : data

data looks like this:

Versions

  • installed: version in node_modules.
  • packageJson: version or range in package.json.
  • devDependency: Is this a devDependency?
  • usedInScripts: Is this used in the scripts section of package.json?
  • mismatch: Is the version installed not match the range in package.json?
  • semverValidRange: Is the package.json range valid?
  • semverValid: Is the installed version valid semver?

License

Copyright (c) 2015 Dylan Greene, contributors. Modified work Copyright (c) David Schnurr

Released under the MIT license.

Screenshots are CC BY-SA (Attribution-ShareAlike).

About

Check for outdated, incorrect, and unused dependencies.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%