File: find-dupes.js

package info (click to toggle)
npm 9.2.0~ds1-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 318,988 kB
  • sloc: javascript: 167,820; sh: 194; makefile: 52; perl: 11
file content (26 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (2)
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
// dedupe duplicated packages, or find them in the tree
const ArboristWorkspaceCmd = require('../arborist-cmd.js')

class FindDupes extends ArboristWorkspaceCmd {
  static description = 'Find duplication in the package tree'
  static name = 'find-dupes'
  static params = [
    'install-strategy',
    'legacy-bundling',
    'global-style',
    'strict-peer-deps',
    'package-lock',
    'omit',
    'ignore-scripts',
    'audit',
    'bin-links',
    'fund',
    ...super.params,
  ]

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