find-dupes.js 578 B

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