only-one
CLI tool for checking you have one version of a dependency in node_modules
Last updated 4 months ago by domain-group-frontend .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install only-one 
SYNC missed versions from official npm registry.

only-one

A simple CLI tool that checks you only have one version of a dependency in your node_modules folder.

only-one react

or for multiple deps

only-one react react-dom

If none or more than one version of the deps are found the process will exit with failure. The tool works by globbing your node_modules, it has nothing to do with yarn or npm lock files and therefore checks that yarn or npm is also correctly installing into node_modules.

You may wish to add it to your test suite "test": "only-one react && mocha && eslint .".

I was motivated to build this because sometimes 3rd party libraries accidentally have react as a dependency and this can break stuff.

Please be aware if you have a large node_modules it can be quite slow because it's a lot of file paths to search through.

To install

npm install only-one --save-dev
yarn add only-one --dev

Options

--warn or -w to only warn about deps than are more than 1 and dont fail

Current Tags

  • 1.2.0                                ...           latest (4 months ago)

4 Versions

  • 1.2.0                                ...           4 months ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |