-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 "doctor" command #22236
CLI: Add "doctor" command #22236
Conversation
536a350
to
c7b88a3
Compare
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
@@ -0,0 +1,119 @@ | |||
import chalk from 'chalk'; |
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 file contains the content which was just moved from getMigrationSummary.ts
@@ -102,93 +100,3 @@ export function getMigrationSummary({ | |||
borderColor: hasFailures ? 'red' : 'green', | |||
}); | |||
} | |||
|
|||
// These packages are aliased by Storybook, so it doesn't matter if they're duplicated | |||
const allowList = [ |
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 just moved to a new file
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-ts
code/lib/cli/bin/index.js doctor
from the sandbox directoryChecklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]