Skip to content

[BUG] install/etc with --dry-run outputs misleading info (since it didn't actually do stuff) #1999

@isaacs

Description

@isaacs

Current Behavior:

Installing (or other commands that call Arborist.reify(), like prune, dedupe, update, audit fix, etc.) using --dry-run produces output like this:

added 2 packages, removed 4 packages, and changed 2 packages in 12s

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

However, since the package tree was not actually reified, this output is misleading and not useful.

Expected Behavior:

Output a human-readable (or JSON in the case of --json) report of the changes that would have been made to the package tree, had it not been a --dry-run install.

Steps To Reproduce:

Run any reification command with --dry-run

Environment:

npm v7, all environments

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingPriority 2secondary priority issueRelease 7.xwork is associated with a specific npm 7 releasecmd:updaterelated to `npm update`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions