chore(deps): bump Storybook v8 → v9 across all workspaces#111169
Open
paulopmt1 wants to merge 2 commits into
Open
chore(deps): bump Storybook v8 → v9 across all workspaces#111169paulopmt1 wants to merge 2 commits into
paulopmt1 wants to merge 2 commits into
Conversation
Jetpack Cloud Live (direct link)
Automattic for Agencies Live (direct link)
|
9 tasks
|
Looks like one of the E2E tests has failed. You can fix them following these steps:
|
1 similar comment
|
Looks like one of the E2E tests has failed. You can fix them following these steps:
|
bdf1fb9 to
af27e38
Compare
Atomic upgrade of storybook core and addons from 8.6.x to 9.x because the storybook peer dep on every consuming addon requires alignment. In v9 several packages (addon-actions/controls/toolbars/viewport) are now empty shims since the functionality moved into storybook core; the version bump is required to satisfy peer deps but the packages are no-ops. @storybook/test has no v9 release — the `fn` API is now re-exported from storybook core via `storybook/test`. Migrate imports that changed paths in v9: - @storybook/test → storybook/test - @storybook/preview-api → storybook/preview-api - @storybook/blocks → @storybook/addon-docs/blocks - @storybook/addon-actions (action) → storybook/actions - @storybook/react: Story → StoryFn (v6 alias removed) Fix Button stories: v9's StoryObj<typeof meta> intersects the component's union prop type, which can't be satisfied by stories that only set props from one branch (ButtonProps vs AnchorProps). Type Story over ButtonProps and split off LinkArgs for the Link story. PR 1 of 3 toward Storybook v10. PR 2 removes the empty-shim addon entries; PR 3 bumps v9 → v10.
af27e38 to
3ca69b4
Compare
Contributor
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Contributor
Author
Storybook 9 folded addon-controls/actions/toolbars/viewport into core, so their leftover registrations and devDependencies threw "package no longer exists" at preview load. Remove them from the shared config and package.json files. Also wire a configurable sass prelude into the shared sass-loader and pass the app's `@use 'calypso/assets/stylesheets/shared/_utils.scss'` prelude (plus the `calypso` alias) from the root Storybook, so shared mixins like long-content-fade resolve when stories pull in @automattic/search. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
1 task
Contributor
Author
|
Will deploy this Monday morning as it's EOD for me right now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Part of #106728
Proposed Changes
PR 1 of 3 toward Storybook v10. Bumps Storybook from 8.6.x to 9.x atomically across the 13 workspaces that depend on it.
storybook: ^8.6.17 → ^9.1.20(root + client + 11 packages)@storybook/react: ^8.6.14 → ^9.1.20(root +components)@storybook/react-webpack5: ^8.6.14 → ^9.1.20(calypso-storybook+grid)@storybook/addon-a11y: ^8.6.14 → ^9.1.20(domain-search,launchpad,onboarding)@storybook/addon-themes: ^8.6.14 → ^9.1.20(calypso-storybook)@storybook/addon-docs: ^8.6.14 → ^9.1.20(calypso-storybook+grid)@storybook/addon-actions/-controls/-toolbars/-viewport: ^8.6.14 → ^9.0.8— these v9 packages are now empty shims since the functionality moved into Storybook core; the version bump is required to satisfy peer deps but the packages themselves are no-ops. They'll be removed entirely in PR 2.@storybook/test(no v9 release; thefnAPI is now bundled in storybook core understorybook/test).Import migrations forced by v9 module reorganization:
@storybook/test→storybook/test@storybook/preview-api→storybook/preview-api@storybook/blocks→@storybook/addon-docs/blocks@storybook/addon-actions(action) →storybook/actions@storybook/react:Story→StoryFn(the v6 alias was removed)Fix for
packages/components/src/button/index.stories.tsx: v9'sStoryObj<typeof meta>now intersects the component's union prop type, which can't be satisfied by stories that only set props from one branch (ButtonPropsvsAnchorProps). TypedStoryoverButtonPropsdirectly and split off aLinkArgstype for the Link story.Why are these changes being made?
The Storybook 8 → 10 migration can't be done in isolation because every
@storybook/*package declares astorybook: ^X.xpeer dep that must align with the installed Storybook core. Yarn CI fails onYN0060 (Invalid peer dependency)warnings (.teamcity/_self/projects/WebApp.kt:435), so partial bumps (like #111139) can't land.This PR establishes the v9 baseline so subsequent PRs in the stack can move incrementally:
package.jsonfiles and the sharedcalypso-storybookaddonsarray — purely a cleanup.Each major-jump PR is mechanically uniform across the 13 workspaces, so review focuses on whether the
.storybook/main.{ts,js}configs and stories still work — not on file count.Supersedes #111139 (split-out a11y bump from #106728) — once PR 3 lands, that one can be closed.
Testing Instructions
yarn installshould complete with noYN0060warnings.yarn typecheck-packagesshould pass.yarn typecheck-clientshows only pre-existing@automattic/omnibarand@automattic/date-range-picker"Cannot find module" errors (already present on trunk, unrelated).yarn workspace @automattic/domain-search storybook:startshould boot Storybook 9.1.20 successfully — verified locally.Pre-merge Checklist