nodejs/deps/npm/lib/commands/find-dupes.js
npm CLI robot c923ce7414
deps: upgrade npm to 10.7.0
PR-URL: https://github.com/nodejs/node/pull/52767
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2024-05-01 06:53:22 +00:00

29 lines
634 B
JavaScript

const ArboristWorkspaceCmd = require('../arborist-cmd.js')
// dedupe duplicated packages, or find them in the tree
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',
'include',
'ignore-scripts',
'audit',
'bin-links',
'fund',
...super.params,
]
async exec () {
this.npm.config.set('dry-run', true)
return this.npm.exec('dedupe', [])
}
}
module.exports = FindDupes