Skip to content

[BUG] npm find-dupes and npm dedupe --dry-run doesn't print anything useful #2687

@isaacs

Description

@isaacs

Current Behavior:

$ npm find-dupes

added 24 packages, removed 1 package, and changed 1 package in 10s

59 packages are looking for funding
  run `npm fund` for details

Expected Behavior:

$ npx npm@6 find-dupes
move	source-map	0.5.7	node_modules/@babel/core/node_modules/source-map		node_modules/tap/node_modules/@babel/core/node_modules/source-map
move	@babel/helper-annotate-as-pure	7.10.4	node_modules/@babel/helper-annotate-as-pure		node_modules/tap/node_modules/@babel/helper-annotate-as-pure
move	@babel/helper-builder-react-jsx	7.10.4	node_modules/@babel/helper-builder-react-jsx		node_modules/tap/node_modules/@babel/helper-builder-react-jsx
move	@babel/helper-member-expression-to-functions	7.10.5	node_modules/@babel/helper-member-expression-to-functions		node_modules/tap/node_modules/@babel/helper-member-expression-to-functions
... etc

Steps To Reproduce:

Run npm find-dupes or npm dedupe --dry-run in npm v7.

Perhaps any call into lib/utils/reify-output.js with npm.flatOptions.dryRun === true, it should print much more details about the diff. Just saying "2 packages added, 3 packages removed, etc" is not so helpful, if it didn't actually do those things.

Environment:

All environments, npm v7.5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingGood First Issuegood issue or PR for newcomersRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions