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

Commit 53d2c3d

Browse files
committedJul 28, 2019
BREAKING: Remove --extra alias, use --unused
1 parent 55d282e commit 53d2c3d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed
 

‎cli.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ const check = require('./')
1212
const args = require('minimist')(process.argv.slice(2), {
1313
default: {
1414
missing: false,
15-
extra: false,
15+
unused: false,
1616
dev: true,
1717
'default-entries': true,
1818
verbose: false
1919
},
20-
boolean: ['missing', 'extra', 'dev', 'version', 'ignore', 'default-entries', 'verbose'],
20+
boolean: ['missing', 'unused', 'dev', 'version', 'ignore', 'default-entries', 'verbose'],
2121
alias: {
22-
extra: 'unused',
2322
'ignore-module': 'i',
2423
'extensions': 'e'
2524
}
@@ -35,7 +34,7 @@ if (args.help || args._.length === 0) {
3534

3635
console.log('\nOptions:')
3736
console.log('--missing (default) Check to make sure that all modules in your code are listed in your package.json')
38-
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')
37+
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')
3938
console.log("--no-dev Won't tell you about devDependencies that are missing or unused")
4039
console.log("--no-peer Won't tell you about peerDependencies that are missing or unused")
4140
console.log("--ignore-module, -i Won't tell you about these module names when missing or unused. Supports globbing")
@@ -91,7 +90,7 @@ check({
9190

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

94-
if (runAllTests || args.extra) {
93+
if (runAllTests || args.unused) {
9594
const extras = check.extra(pkg, deps, options)
9695
failed += extras.length
9796
if (extras.length) {

‎readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ To always exit with code 0 pass `--ignore`
5757

5858
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
5959

60-
### --unused, --extra
60+
### --unused
6161

6262
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
6363

0 commit comments

Comments
 (0)
This repository has been archived.