summaryrefslogtreecommitdiff
path: root/deps/npm/lib/find-dupes.js
blob: 5061be9cc381a8ee3f1e5dff635d5845912a4241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// dedupe duplicated packages, or find them in the tree
const usageUtil = require('./utils/usage.js')

class FindDupes {
  constructor (npm) {
    this.npm = npm
  }

  /* istanbul ignore next - see test/lib/load-all-commands.js */
  get usage () {
    return usageUtil('find-dupes', 'npm find-dupes')
  }

  exec (args, cb) {
    this.npm.config.set('dry-run', true)
    this.npm.commands.dedupe([], cb)
  }
}
module.exports = FindDupes