diff --git a/MIGRATION.md b/MIGRATION.md index 6e3041af5ba1..846c89718b3c 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -446,7 +446,7 @@ In Storybook 8.0 we are introducing a new icon library available with `@storyboo #### React-docgen component analysis by default -In Storybook 7, we used `react-docgen-typescript` to analyze React component props and auto-generated control. In Storybook 8, we have moved to `react-docgen` as the new default. `react-docgen` is dramatically more efficient, shaving seconds off of dev startup times. However, it only analyzes basic TypeScript constructs. +In Storybook 7, we used `react-docgen-typescript` to analyze React component props and auto-generate controls. In Storybook 8, we have moved to `react-docgen` as the new default. `react-docgen` is dramatically more efficient, shaving seconds off of dev startup times. However, it only analyzes basic TypeScript constructs. We feel `react-docgen` is the right tradeoff for most React projects. However, if you need the full fidelity of `react-docgen-typescript`, you can opt-in using the following setting in `.storybook/main.js`: diff --git a/code/lib/cli/src/automigrate/fixes/react-docgen.ts b/code/lib/cli/src/automigrate/fixes/react-docgen.ts index 5b6df8726b7e..279c6d455a04 100644 --- a/code/lib/cli/src/automigrate/fixes/react-docgen.ts +++ b/code/lib/cli/src/automigrate/fixes/react-docgen.ts @@ -30,7 +30,7 @@ export const reactDocgen: Fix = { but doesn't handle all TypeScript constructs. We can update your config to continue to use "react-docgen-typescript", - though we recommend giving "react-docgen" or a much faster dev experience. + though we recommend giving "react-docgen" for a much faster dev experience. https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-docgen-component-analysis-by-default `; @@ -38,7 +38,7 @@ export const reactDocgen: Fix = { async run({ dryRun, mainConfigPath }) { if (!dryRun) { - await updateMainConfig({ mainConfigPath, dryRun }, async (main) => { + await updateMainConfig({ mainConfigPath, dryRun: !!dryRun }, async (main) => { logger.info(`✅ Setting typescript.reactDocgen`); if (!dryRun) { main.setFieldValue(['typescript', 'reactDocgen'], 'react-docgen-typescript');