Upgrade to Storybook 10

Proprietary

Chains the earlier majors: a project several majors behind needs only this recipe, which also runs the code changes of the earlier majors in order, and upgrades the dependencies once, straight to 10.x, so no intermediate version has to resolve. Upgrade storybook and the @storybook/* frameworks, builders and addons that still publish in step with it to 10.x in package.json. The addons that Storybook 9 moved into storybook itself (addon-essentials except docs, addon-interactions, addon-actions, addon-controls, addon-viewport, addon-backgrounds, addon-measure, addon-outline, addon-toolbars, @storybook/test, @storybook/blocks) have no 10.x release and are left as they are. The import moves and package removals of Storybook 9 are included, and .storybook/main is made valid ESM (module.exports becomes export default, relative local addons use import.meta.resolve(), and the CommonJS constants require, __dirname and __filename are marked). Not done by this recipe: extensionless relative imports in a .js config, core.builder paths, moduleResolution: node in tsconfig.json, and Node.js 20.19 or later; run npx storybook@10 automigrate afterwards.

org.openrewrite.nodejs.migrate.storybook.UpgradeToStorybook10
mod run . --recipe=org.openrewrite.nodejs.migrate.storybook.UpgradeToStorybook10

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.