• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    'ignore-scripts',
15    'audit',
16    'bin-links',
17    'fund',
18    ...super.params,
19  ]
20
21  async exec (args) {
22    this.npm.config.set('dry-run', true)
23    return this.npm.exec('dedupe', [])
24  }
25}
26module.exports = FindDupes
27