-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
CLI: add automigration summary #20276
Conversation
8a53e38
to
7bdb4a0
Compare
@yannbf amazing work! I was hoping to pair with you on this. I think it's be great if we could pipe the full output (including package manager stdout) into a log file. |
A log file would be lovely :D Especially if it can declutter the CLI output a bit |
@integrayshaun I think @yannbf likely wanted to demo a bunch of things failing, and made them fail over the same reason. In normal cases, this these would all fail over different reasons. Changing this would be a pretty big change, at a too late of a stage to change IMHO. I understand where you're coming from, but getting 1 error at a time, can be just as infuriating and give the user a sensation that the errors will never stop. By having all the migration ran, and show the errors all in 1 screen, we give the user a sense of how much is broken, and how much they likely need to fix. If we 'hide' 4 errors, the user doesn't know if we're hiding 4 or 400, and might assume the worse. or assume it's only a single error, and be disappointed when it's "yet another one". |
We could do that! Can you elaborate the use case though? And where the log file would be located? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing work @yannbf! We really need Chromatic for our CLI though huh :) (just like we have for the Chromatic CLI ;))
Issue: #20222
What I did
Improved the automigration CLI command to provide a summary of what happened.
Successful migrations
No migrations applied
Migration with some success but also failures
Migration with only failures
Migration with multiple failures
In this example, the storybook version specifier is "next", which fails. That's a known bug and we'll fix it in a different PR.
Finally, an example with a full output (it's ugly, I know, but we can deal with making the package managers silent later):
How to test
You'll have to build the project, and alias the Storybook CLI binaries to then run in any project of your choosing.
If your answer is yes to any of these, please make sure to include it in your PR.