Upgrading @storybook/addon-essentials 7 to 8
Breaking7.6.24 โ 8.6.19Breaking54Security15Platform6Deprecated3New140Changed272Fixed379Other62
BreakingUpgrade verdict
51 breaking changes and 6 platform requirement changes and 15 security fixes.
In plain terms
- Removes the warnings API from the a11y addon.
- Renames the Vitest plugin entrypoint.
- Support for .stories.mdx story files is further removed.
- In preview.js, the globals setting is now called initialGlobals.
Must act Top 5 of 75 that need code or config changes
@storybook/addon-essentials publishes an official migration guide for version 8. It covers more than the release notes do.
Migration Guide โDrops @storybook/core-common, @storybook/manager-api, @storybook/node-logger, @storybook/preview-api.
Installs 31 packages in all (was 435).
What you must change
Breaking51
Removes the warnings API from the a11y addon.
Renames the Vitest plugin entrypoint.
Core removes more .stories.mdx handling.
.stories.mdxCSF renames preview.js globals to initialGlobals.
preview.jsglobalsinitialGlobalsDrops the unneeded
UPDATE_STORY_ARGS event that was for SSv6.UPDATE_STORY_ARGSRemoves the React requirement in non-React projects.
Removes the 'left' property from TooltipLinkList and Link components.
TooltipLinkListLinkRenames the
--webpack-stats-json CLI flag to --stats-json since it works in Vite.--webpack-stats-json--stats-jsonCLI removes the argTypesRegex automigration.
argTypesRegexCLI removes the logging to file feature from autoblockers.
Svelte removes deprecated SvelteComponentTyped in favor of SvelteComponent.
SvelteComponentTypedSvelteComponentRemoves defaultProps from the Link component in the UI.
LinkdefaultPropsSupports
subcomponents in ArgTypes and Controls, and removes the ArgsTable block.subcomponentsArgTypesControlsArgsTableRemoves the passArgsFirst parameter flag.
passArgsFirstRemoves the deprecated config preset.
Removes deprecated APIs from the manager and preview APIs.
Removes the unused hideNoControlsWarning type from Addon Controls.
hideNoControlsWarningRemoves the deprecated Story type from Angular.
StoryRemoves deprecated properties from manager-api.
manager-apiRemoves the deprecated standalone webpackConfig option.
webpackConfigRemoves the storyStoreV7 feature flag from Core.
storyStoreV7Removes deprecated createChannel APIs from Core.
createChannelRemoves the babel and SWC compiler from the Webpack5 builder.
Webpack5Removes LinkTo from direct import in Addon Links.
LinkToRemoves deprecated parameters from Addon docs.
Removes StorybookViteConfig type in favor of StorybookConfig in Builder Vite.
StorybookViteConfigStorybookConfigRemoves collapseAll and expandAll methods from Core.
collapseAllexpandAllRemoves storyIndexers in favor of experimental_indexers.
storyIndexersexperimental_indexersRemoves unused staticDir type from Core.
staticDirRemoves deprecated props from the Description doc block.
DescriptionPrimarySourceStoryRemoves deprecated navigateToSettingsPage method from Manager API.
navigateToSettingsPageRemoves deprecated setGlobalConfig portable stories API from React.
setGlobalConfigRemoves deprecated addons module types from TypeScript.
Removes DecoratorFn, Story, ComponentStory, ComponentStoryObj, ComponentStoryFn and ComponentMeta types.
DecoratorFnStoryComponentStoryComponentStoryObjComponentStoryFnComponentMetaRemoves Framework type in favor of Renderer types.
FrameworkRendererRemoves deprecated WithTooltip props from UI.
WithTooltipCLI removes the --use-npm flag.
--use-npmCore removes the unused warnOnLegacyHierarchySeparator type.
warnOnLegacyHierarchySeparatorCore removes Vite plugins and drops Vite 3 support.
Removes the
-s flag from the build and dev commands.-sRemoves stories.json support from the API.
stories.jsonRemoves the
react peer dependency from Addon Docs.reactVue: Removes deprecated vue packages from next.
Vue: Removes unused preset-vue-webpack.
preset-vue-webpackRemoves unused and deprecated packages.
Removes the
sb extract CLI command.sb extractRemoves the
storiesOf API.storiesOfRequires a modifier key to trigger the
F, A, D, S, T and / shortcuts.FADST/Errors on explicit actions while rendering or playing.
Changes StoryFnReactReturnType to JSX.Element.
StoryFnReactReturnTypeJSX.ElementReplaces
Form.Button with the new Button component.Form.ButtonButtonSecurity15
Prevents Highlight menu items from emitting arbitrary channel events.
Restricts preview postMessage to known manager origins.
Separates manager and preview roles on the dev server channel.
Blocks iframe embedding of the dev server from non-localhost origins.
Rejects component search queries outside the project.
Validates component export name when creating a story.
Adds host validation warning and origin validation for MCP.
MCPContains save story path to the project root.
Validates save story name and arg keys as identifiers.
Disables browser file writes and command execution in Addon Vitest.
Adds request validation.
Hardens the websocket connection.
Core replaces the ip function with a small helper function to address security concerns.
ipBumps webpack-dev-middleware to patch a high severity security issue.
webpack-dev-middlewareCore updates the ip dependency to fix CVE-2023-42282.
ipPlatform6
Adds
@storybook/test as an optional peer dependency for ReactVite.@storybook/testRelaxes the peer dependency constraint of shim packages.
React: Supports v19 betas in peer dependencies.
CLI updates the minimum Node.js version requirement.
Updates the Node.js version requirement to >= 18.0.0.
Sets the engines field to Node.js >= 18 for packages.
enginesDeprecations to plan for
Deprecated3
Addon Themes deprecates useThemeParameters.
useThemeParametersEmits deprecated TESTING_MODULE_RUN_ALL_REQUEST for backward compatibility.
TESTING_MODULE_RUN_ALL_REQUESTRefactors preview and deprecates the story store.
story store