1// dedupe duplicated packages, or find them in the tree
2const ArboristWorkspaceCmd = require('../arborist-cmd.js')
3
4class FindDupes extends ArboristWorkspaceCmd {
5  static description = 'Find duplication in the package tree'
6  static name = 'find-dupes'
7  static params = [
8    'install-strategy',
9    'legacy-bundling',
10    'global-style',
11    'strict-peer-deps',
12    'package-lock',
13    'omit',
14    'include',
15    'ignore-scripts',
16    'audit',
17    'bin-links',
18    'fund',
19    ...super.params,
20  ]
21
22  async exec (args) {
23    this.npm.config.set('dry-run', true)
24    return this.npm.exec('dedupe', [])
25  }
26}
27module.exports = FindDupes
28