Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dedupe - display difference when --dry-run is enabled #7133

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

Blaumaus
Copy link
Contributor

@Blaumaus Blaumaus commented Jan 13, 2024

This PR adds functionality to show the difference in what would have been changed if the user had run the dedupe command with the --dry-run flag. At the moment the output is not really useful and doesn't give the user any information other than something like added 2 packages, removed 3 packages, and changed 12 packages in 48s.

This PR changes that:
Screenshot 2024-01-13 at 00 18 07

References

Closes #2687
Closes #4398

@wraithgar
Copy link
Member

Wow this has been on a lot of folks' wishlist for years!

@ljharb
Copy link
Contributor

ljharb commented Jan 16, 2024

Agreed, this is amazing! is it too much to ask to align the output like a table? i'm not sure if the cli has a pattern for that already

@wraithgar
Copy link
Member

doctor token org and profile all use tabular output if you want prior art.

How do we feel about displaying this if the config value long is true also? I'm sure folks would love to see this output on request on the real dedupe.

@ljharb
Copy link
Contributor

ljharb commented Jan 16, 2024

I definitely would.

I'd also love to see it on npm install, when long is set :-)

@wraithgar
Copy link
Member

Just to clarify, these suggestions can be done in separate PRs, I think having dry-run always do this is fine for a start.

@Tayvon Tayvon merged commit 6d5f9ac into npm:latest Jan 17, 2024
23 checks passed
@github-actions github-actions bot mentioned this pull request Jan 17, 2024
@Tayvon Tayvon self-assigned this Jan 17, 2024
@ritaaktay
Copy link
Contributor

Agreed, this is amazing! is it too much to ask to align the output like a table? i'm not sure if the cli has a pattern for that already

@ljharb @wraithgar

Tried out an implementation of tabular format using the examples in doctor etc.
Let me know what you think!

#7174

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants