forked from npm/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfind-dupes.js
36 lines (32 loc) · 889 Bytes
/
find-dupes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// dedupe duplicated packages, or find them in the tree
const ArboristWorkspaceCmd = require('./workspaces/arborist-cmd.js')
class FindDupes extends ArboristWorkspaceCmd {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get description () {
return 'Find duplication in the package tree'
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'find-dupes'
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'global-style',
'legacy-bundling',
'strict-peer-deps',
'package-lock',
'omit',
'ignore-scripts',
'audit',
'bin-links',
'fund',
...super.params,
]
}
exec (args, cb) {
this.npm.config.set('dry-run', true)
this.npm.commands.dedupe([], cb)
}
}
module.exports = FindDupes