Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bahmutov/deps-ok
Fast checking of top level dependencies based on version numbers
https://github.com/bahmutov/deps-ok
checker dependencies devdependencies npm
Last synced: 4 days ago
JSON representation
Fast checking of top level dependencies based on version numbers
- Host: GitHub
- URL: https://github.com/bahmutov/deps-ok
- Owner: bahmutov
- License: mit
- Created: 2013-09-19T02:34:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-09-27T19:13:31.000Z (4 months ago)
- Last Synced: 2024-10-03T14:14:44.985Z (4 months ago)
- Topics: checker, dependencies, devdependencies, npm
- Language: JavaScript
- Size: 604 KB
- Stars: 17
- Watchers: 1
- Forks: 8
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
README
# deps-ok
Fast checking of top level NPM and Bower dependencies based on version numbers.
[![NPM info][nodei.co]](https://npmjs.org/package/deps-ok)
[![Build status][ci-image]][ci-url]
[![dependencies][dependencies-image]][dependencies-url]
[![devdependencies][deps-ok-devdependencies-image] ][deps-ok-devdependencies-url]
[![manpm](https://img.shields.io/badge/manpm-%E2%9C%93-3399ff.svg)](https://github.com/bahmutov/manpm)
[![semantic-release][semantic-image] ][semantic-url]
[![renovate-app badge][renovate-badge]][renovate-app]See [grunt-deps-ok](https://github.com/bahmutov/grunt-deps-ok) for
integrating this task into grunt pipeline.## Install
Install as a global tool
npm install -g deps-ok
Install as a project's dependency
npm install --save-dev deps-ok
## Use as a global tool
Checks modules until the first module without valid install.
Prints first found error and exits with code 1 if one of the
top level dependencies is missing or out of date.// from the package's root folder execute
deps-okdeps-ok --verbose
// prints declared and installed version numbersdeps-ok --filename path/to/package.json
// checks give package.json (not in this folder)Checks both dependencies listed in your *package.json* and *bower.json*
If **deps-ok** finds a problem, then run `npm install` or `bower install`
## Use as 3rd party module
You can use **deps-ok** from another module
```javascript
npm install deps-ok --save
var depsOk = require('deps-ok');
var ok = depsOk(process.cwd(), false /* verbose */);
```## Use with gulp
If you prefer using [gulp](), you can quickly just add a task
```js
gulp.task('deps-ok', function () {
var gutil = require('gulp-util');
var depsOk = require('deps-ok');
var ok = depsOk(process.cwd(), false /* verbose */);
if (!ok) {
gulp.emit('error', new gutil.PluginError('deps-ok', 'Found outdated installs'));
}
});
gulp.task('default', ['deps-ok', ...]);
```## Options
* `--allow-duplicate ` allows same dependency to be declared in dev and peer dependencies (or other combinations). Useful if you are developing a plugin that requires the main tool (peer) but also uses the main tool for testing (dev).
```
$ deps-ok --allow-duplicate angular
$ deps-ok --allow-duplicate angular --allow-duplicate jquery
```* `--verbose` prints verbose console messages, but using `DEBUG=deps-ok` is a better method
* `--skip-version-check` is used to load and check versions but skip actual physical file checks. Useful in end to end testing.
## Notes
This check will reject packages without "version" property in the `package.json`
file.## Debug
See debug messages by running module with `DEBUG=deps-ok` environment variable
## Small print
Author: Gleb Bahmutov © 2013
* [@bahmutov](https://twitter.com/bahmutov)
* [glebbahmutov.com](http://glebbahmutov.com)
* [blog](http://glebbahmutov.com/blog/)License: MIT - do anything with the code, but don't blame me if it does not work.
Support: if you find any problems with this module, email / tweet / open issue on Github
[ci-image]: https://travis-ci.org/bahmutov/deps-ok.svg?branch=master
[ci-url]: https://travis-ci.org/bahmutov/deps-ok
[nodei.co]: https://nodei.co/npm/deps-ok.svg?downloads=true
[dependencies-image]: https://david-dm.org/bahmutov/deps-ok.svg
[dependencies-url]: https://david-dm.org/bahmutov/deps-ok
[deps-ok-devdependencies-image]: https://david-dm.org/bahmutov/deps-ok/dev-status.svg
[deps-ok-devdependencies-url]: https://david-dm.org/bahmutov/deps-ok#info=devDependencies
[endorse-image]: https://api.coderwall.com/bahmutov/endorsecount.svg
[endorse-url]: https://coderwall.com/bahmutov
[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-url]: https://github.com/semantic-release/semantic-release
[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg
[renovate-app]: https://renovateapp.com/