CLI: Add "doctor" command#22236
Merged
Merged
Conversation
536a350 to
c7b88a3
Compare
Member
Author
|
This needs a bit more love! Would love if someone reviewed it thoroughly and we worked on it a little more before we merge this. |
3e2bc28 to
a92863e
Compare
e810f4a to
daf7083
Compare
yannbf
commented
Nov 22, 2023
| @@ -0,0 +1,119 @@ | |||
| import chalk from 'chalk'; | |||
Member
Author
There was a problem hiding this comment.
This file contains the content which was just moved from getMigrationSummary.ts
yannbf
commented
Nov 22, 2023
| } | ||
|
|
||
| // These packages are aliased by Storybook, so it doesn't matter if they're duplicated | ||
| const allowList = [ |
Member
Author
There was a problem hiding this comment.
This is just moved to a new file
ndelangen
approved these changes
Nov 22, 2023
36 tasks
8 tasks
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #23033
What I did
This PR adds a new command to the storybook CLI:
storybook doctor. It's heavily based on the automigrations, in fact it takes two checks from the automigrations so they can be ran at any time, detached from the automigration command.This will serve as a way to tell users to check their overall project health, such as:
Here's an example of a single report:
Another one, when versions mismatch:
Here's an example with multiple reports:
When everything is good:

Just like the automigrations, the doctor command also generates a log file (only if there are reports) so users can send to us for support.
How to test
yarn task --task sandbox --start-from auto --template react-vite/default-tscode/lib/cli/bin/index.js doctorfrom the sandbox directoryChecklist
MIGRATION.MD
Maintainers
make sure to add the
ci:mergedorci:dailyGH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]