Skip to content

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.

  • 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.
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).

Breaking51
Removes the warnings API from the a11y addon.
Renames the Vitest plugin entrypoint.
Core removes more .stories.mdx handling.
.stories.mdx
CSF renames preview.js globals to initialGlobals.
preview.jsglobalsinitialGlobals
Drops the unneeded UPDATE_STORY_ARGS event that was for SSv6.
UPDATE_STORY_ARGS
Removes the React requirement in non-React projects.
Removes the 'left' property from TooltipLinkList and Link components.
TooltipLinkListLink
Renames the --webpack-stats-json CLI flag to --stats-json since it works in Vite.
--webpack-stats-json--stats-json
CLI removes the argTypesRegex automigration.
argTypesRegex
CLI removes the logging to file feature from autoblockers.
Svelte removes deprecated SvelteComponentTyped in favor of SvelteComponent.
SvelteComponentTypedSvelteComponent
Removes defaultProps from the Link component in the UI.
LinkdefaultProps
Supports subcomponents in ArgTypes and Controls, and removes the ArgsTable block.
subcomponentsArgTypesControlsArgsTable
Removes the passArgsFirst parameter flag.
passArgsFirst
Removes the deprecated config preset.
Removes deprecated APIs from the manager and preview APIs.
Removes the unused hideNoControlsWarning type from Addon Controls.
hideNoControlsWarning
Removes the deprecated Story type from Angular.
Story
Removes deprecated properties from manager-api.
manager-api
Removes the deprecated standalone webpackConfig option.
webpackConfig
Removes the storyStoreV7 feature flag from Core.
storyStoreV7
Removes deprecated createChannel APIs from Core.
createChannel
Removes the babel and SWC compiler from the Webpack5 builder.
Webpack5
Removes LinkTo from direct import in Addon Links.
LinkTo
Removes deprecated parameters from Addon docs.
Removes StorybookViteConfig type in favor of StorybookConfig in Builder Vite.
StorybookViteConfigStorybookConfig
Removes collapseAll and expandAll methods from Core.
collapseAllexpandAll
Removes storyIndexers in favor of experimental_indexers.
storyIndexersexperimental_indexers
Removes unused staticDir type from Core.
staticDir
Removes deprecated props from the Description doc block.
DescriptionPrimarySourceStory
Removes deprecated navigateToSettingsPage method from Manager API.
navigateToSettingsPage
Removes deprecated setGlobalConfig portable stories API from React.
setGlobalConfig
Removes deprecated addons module types from TypeScript.
Removes DecoratorFn, Story, ComponentStory, ComponentStoryObj, ComponentStoryFn and ComponentMeta types.
DecoratorFnStoryComponentStoryComponentStoryObjComponentStoryFnComponentMeta
Removes Framework type in favor of Renderer types.
FrameworkRenderer
Removes deprecated WithTooltip props from UI.
WithTooltip
CLI removes the --use-npm flag.
--use-npm
Core removes the unused warnOnLegacyHierarchySeparator type.
warnOnLegacyHierarchySeparator
Core removes Vite plugins and drops Vite 3 support.
Removes the -s flag from the build and dev commands.
-s
Removes stories.json support from the API.
stories.json
Removes the react peer dependency from Addon Docs.
react
Vue: Removes deprecated vue packages from next.
Vue: Removes unused preset-vue-webpack.
preset-vue-webpack
Removes unused and deprecated packages.
Removes the sb extract CLI command.
sb extract
Removes the storiesOf API.
storiesOf
Requires 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.Element
Replaces Form.Button with the new Button component.
Form.ButtonButton
Security15
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.
MCP
Contains 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.
ip
Bumps webpack-dev-middleware to patch a high severity security issue.
webpack-dev-middleware
Core updates the ip dependency to fix CVE-2023-42282.
ip
Platform6
Adds @storybook/test as an optional peer dependency for ReactVite.
@storybook/test
Relaxes 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.
engines
Deprecated3
Addon Themes deprecates useThemeParameters.
useThemeParameters
Emits deprecated TESTING_MODULE_RUN_ALL_REQUEST for backward compatibility.
TESTING_MODULE_RUN_ALL_REQUEST
Refactors preview and deprecates the story store.
story store