Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
BREAKING: Remove --extra alias, use --unused
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Jul 28, 2019
1 parent 55d282e commit 53d2c3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ const check = require('./')
const args = require('minimist')(process.argv.slice(2), {
default: {
missing: false,
extra: false,
unused: false,
dev: true,
'default-entries': true,
verbose: false
},
boolean: ['missing', 'extra', 'dev', 'version', 'ignore', 'default-entries', 'verbose'],
boolean: ['missing', 'unused', 'dev', 'version', 'ignore', 'default-entries', 'verbose'],
alias: {
extra: 'unused',
'ignore-module': 'i',
'extensions': 'e'
}
Expand All @@ -35,7 +34,7 @@ if (args.help || args._.length === 0) {

console.log('\nOptions:')
console.log('--missing (default) Check to make sure that all modules in your code are listed in your package.json')
console.log('--unused, --extra The inverse of the --missing check and will tell you which modules in your package.json *were not* used in your code')
console.log('--unused The inverse of the --missing check and will tell you which modules in your package.json *were not* used in your code')
console.log("--no-dev Won't tell you about devDependencies that are missing or unused")
console.log("--no-peer Won't tell you about peerDependencies that are missing or unused")
console.log("--ignore-module, -i Won't tell you about these module names when missing or unused. Supports globbing")
Expand Down Expand Up @@ -91,7 +90,7 @@ check({

const runAllTests = !args.extra && !args.missing

if (runAllTests || args.extra) {
if (runAllTests || args.unused) {
const extras = check.extra(pkg, deps, options)
failed += extras.length
if (extras.length) {
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ To always exit with code 0 pass `--ignore`

running `dependency-check ./package.json --missing` will only do the check to make sure that all modules in your code are listed in your package.json

### --unused, --extra
### --unused

running `dependency-check ./package.json --unused` will only do the inverse of the missing check and will tell you which modules in your package.json dependencies **were not used** in your code

Expand Down

0 comments on commit 53d2c3d

Please sign in to comment.