-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release: Prerelease 9.0.0-alpha.2 #30756
Conversation
…into previewAnno
Build: Use `storybook` from `node_modules` to run internal Storybook
This reverts commit 30f4c86.
…-in-stats-json Vite: Include `node_modules` in stats file
Docs: Add missing PRs to 8.6.0-beta.0 changelog entry
….8-support Typescript: Drop Typescript < 4.9 support
…-into-core Core: Move @storybook/instrumenter into core
Build: Fix check
React: Export returntype of ReactMeta#story
# Conflicts: # code/addons/test/package.json # code/core/package.json # code/core/src/common/versions.ts # code/deprecated/builder-manager/package.json # code/deprecated/channels/package.json # code/deprecated/client-logger/package.json # code/deprecated/components/package.json # code/deprecated/core-common/package.json # code/deprecated/core-events/package.json # code/deprecated/core-server/package.json # code/deprecated/csf-tools/package.json # code/deprecated/docs-tools/package.json # code/deprecated/manager-api/package.json # code/deprecated/manager/package.json # code/deprecated/node-logger/package.json # code/deprecated/preview-api/package.json # code/deprecated/preview/package.json # code/deprecated/router/package.json # code/deprecated/telemetry/package.json # code/deprecated/theming/package.json # code/deprecated/types/package.json # code/lib/cli/package.json # code/lib/instrumenter/package.json
View your CI Pipeline Execution ↗ for commit 54ecfe5.
☁️ Nx Cloud last updated this comment at |
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
Before | After | Difference | |
---|---|---|---|
Dependency count | 54 | 51 | 🎉 -3 🎉 |
Self size | 445 KB | 445 KB | 🎉 -16 B 🎉 |
Dependency size | 12.47 MB | 12.04 MB | 🎉 -425 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-controls
Before | After | Difference | |
---|---|---|---|
Dependency count | 3 | 3 | 0 |
Self size | 257 KB | 268 KB | 🚨 +11 KB 🚨 |
Dependency size | 47 KB | 47 KB | 0 B |
Bundle Size Analyzer | Link | Link |
@storybook/addon-docs
Before | After | Difference | |
---|---|---|---|
Dependency count | 13 | 13 | 0 |
Self size | 2.76 MB | 2.27 MB | 🎉 -494 KB 🎉 |
Dependency size | 9.44 MB | 9.43 MB | 🎉 -12 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-essentials
Before | After | Difference | |
---|---|---|---|
Dependency count | 32 | 32 | 0 |
Self size | 18 KB | 18 KB | 0 B |
Dependency size | 16.04 MB | 15.54 MB | 🎉 -494 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-interactions
Before | After | Difference | |
---|---|---|---|
Dependency count | 54 | 51 | 🎉 -3 🎉 |
Self size | 129 KB | 129 KB | 🎉 -8 B 🎉 |
Dependency size | 12.49 MB | 12.07 MB | 🎉 -425 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-test
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 55 | 🚨 +55 🚨 |
Self size | 0 B | 844 KB | 🚨 +844 KB 🚨 |
Dependency size | 0 B | 13.52 MB | 🚨 +13.52 MB 🚨 |
Bundle Size Analyzer | Link | Link |
storybook
Before | After | Difference | |
---|---|---|---|
Dependency count | 53 | 51 | 🎉 -2 🎉 |
Self size | 23 KB | 19.64 MB | 🚨 +19.62 MB 🚨 |
Dependency size | 33.70 MB | 14.26 MB | 🎉 -19.44 MB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/angular
Before | After | Difference | |
---|---|---|---|
Dependency count | 262 | 258 | 🎉 -4 🎉 |
Self size | 370 KB | 370 KB | 🎉 -201 B 🎉 |
Dependency size | 32.67 MB | 32.66 MB | 🎉 -7 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/experimental-nextjs-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 184 | 177 | 🎉 -7 🎉 |
Self size | 236 KB | 215 KB | 🎉 -21 KB 🎉 |
Dependency size | 49.15 MB | 48.71 MB | 🎉 -436 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/html-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 15 | 11 | 🎉 -4 🎉 |
Self size | 6 KB | 6 KB | 0 B |
Dependency size | 1.92 MB | 1.90 MB | 🎉 -12 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/html-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 251 | 247 | 🎉 -4 🎉 |
Self size | 8 KB | 8 KB | 0 B |
Dependency size | 33.01 MB | 32.99 MB | 🎉 -16 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/nextjs
Before | After | Difference | |
---|---|---|---|
Dependency count | 588 | 581 | 🎉 -7 🎉 |
Self size | 475 KB | 454 KB | 🎉 -21 KB 🎉 |
Dependency size | 83.40 MB | 82.96 MB | 🎉 -441 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/preact-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 13 | 9 | 🎉 -4 🎉 |
Self size | 5 KB | 5 KB | 0 B |
Dependency size | 1.31 MB | 1.31 MB | 🎉 -3 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/preact-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 249 | 245 | 🎉 -4 🎉 |
Self size | 8 KB | 8 KB | 0 B |
Dependency size | 32.58 MB | 32.57 MB | 🎉 -7 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/react-native-web-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 176 | 172 | 🎉 -4 🎉 |
Self size | 45 KB | 35 KB | 🎉 -10 KB 🎉 |
Dependency size | 24.31 MB | 24.30 MB | 🎉 -11 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/react-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 128 | 124 | 🎉 -4 🎉 |
Self size | 15 KB | 15 KB | 0 B |
Dependency size | 20.49 MB | 20.48 MB | 🎉 -11 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/react-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 327 | 323 | 🎉 -4 🎉 |
Self size | 8 KB | 8 KB | 0 B |
Dependency size | 44.63 MB | 44.61 MB | 🎉 -16 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/server-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 257 | 253 | 🎉 -4 🎉 |
Self size | 15 KB | 15 KB | 0 B |
Dependency size | 33.73 MB | 33.73 MB | 🎉 -7 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/svelte-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 135 | 131 | 🎉 -4 🎉 |
Self size | 23 KB | 23 KB | 0 B |
Dependency size | 36.56 MB | 36.55 MB | 🎉 -10 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/svelte-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 315 | 311 | 🎉 -4 🎉 |
Self size | 7 KB | 7 KB | 0 B |
Dependency size | 40.62 MB | 40.61 MB | 🎉 -15 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/sveltekit
Before | After | Difference | |
---|---|---|---|
Dependency count | 143 | 139 | 🎉 -4 🎉 |
Self size | 48 KB | 48 KB | 0 B |
Dependency size | 39.87 MB | 39.86 MB | 🎉 -10 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/vue3-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 108 | 104 | 🎉 -4 🎉 |
Self size | 17 KB | 17 KB | 0 B |
Dependency size | 42.74 MB | 42.73 MB | 🎉 -11 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/vue3-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 499 | 495 | 🎉 -4 🎉 |
Self size | 7 KB | 7 KB | 0 B |
Dependency size | 57.02 MB | 57.01 MB | 🎉 -16 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/web-components-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 16 | 12 | 🎉 -4 🎉 |
Self size | 6 KB | 6 KB | 0 B |
Dependency size | 1.95 MB | 1.94 MB | 🎉 -10 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/web-components-webpack5
Before | After | Difference | |
---|---|---|---|
Dependency count | 249 | 245 | 🎉 -4 🎉 |
Self size | 7 KB | 7 KB | 0 B |
Dependency size | 32.63 MB | 32.62 MB | 🎉 -15 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/blocks
Before | After | Difference | |
---|---|---|---|
Dependency count | 2 | 2 | 0 |
Self size | 639 KB | 626 KB | 🎉 -13 KB 🎉 |
Dependency size | 1.28 MB | 1.28 MB | 0 B |
Bundle Size Analyzer | Link | Link |
sb
Before | After | Difference | |
---|---|---|---|
Dependency count | 54 | 52 | 🎉 -2 🎉 |
Self size | 1 KB | 1 KB | 0 B |
Dependency size | 33.73 MB | 33.90 MB | 🚨 +176 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/cli
Before | After | Difference | |
---|---|---|---|
Dependency count | 358 | 356 | 🎉 -2 🎉 |
Self size | 278 KB | 284 KB | 🚨 +6 KB 🚨 |
Dependency size | 84.23 MB | 84.40 MB | 🚨 +168 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/codemod
Before | After | Difference | |
---|---|---|---|
Dependency count | 275 | 274 | 🎉 -1 🎉 |
Self size | 622 KB | 617 KB | 🎉 -5 KB 🎉 |
Dependency size | 65.79 MB | 65.99 MB | 🚨 +199 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/test
Before | After | Difference | |
---|---|---|---|
Dependency count | 51 | 48 | 🎉 -3 🎉 |
Self size | 1.82 MB | 1.82 MB | 🚨 +136 B 🚨 |
Dependency size | 7.85 MB | 7.42 MB | 🎉 -425 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/preset-react-webpack
Before | After | Difference | |
---|---|---|---|
Dependency count | 182 | 178 | 🎉 -4 🎉 |
Self size | 24 KB | 24 KB | 0 B |
Dependency size | 31.74 MB | 31.72 MB | 🎉 -16 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/preset-server-webpack
Before | After | Difference | |
---|---|---|---|
Dependency count | 16 | 12 | 🎉 -4 🎉 |
Self size | 10 KB | 10 KB | 0 B |
Dependency size | 1.23 MB | 1.22 MB | 🎉 -8 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/html
Before | After | Difference | |
---|---|---|---|
Dependency count | 6 | 2 | 🎉 -4 🎉 |
Self size | 47 KB | 38 KB | 🎉 -9 KB 🎉 |
Dependency size | 40 KB | 32 KB | 🎉 -8 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/preact
Before | After | Difference | |
---|---|---|---|
Dependency count | 6 | 2 | 🎉 -4 🎉 |
Self size | 23 KB | 23 KB | 🎉 -183 B 🎉 |
Dependency size | 40 KB | 32 KB | 🎉 -8 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/react
Before | After | Difference | |
---|---|---|---|
Dependency count | 6 | 2 | 🎉 -4 🎉 |
Self size | 1.74 MB | 1.73 MB | 🎉 -8 KB 🎉 |
Dependency size | 24 KB | 16 KB | 🎉 -8 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/server
Before | After | Difference | |
---|---|---|---|
Dependency count | 7 | 3 | 🎉 -4 🎉 |
Self size | 13 KB | 13 KB | 🎉 -183 B 🎉 |
Dependency size | 722 KB | 714 KB | 🎉 -8 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/svelte
Before | After | Difference | |
---|---|---|---|
Dependency count | 107 | 103 | 🎉 -4 🎉 |
Self size | 96 KB | 88 KB | 🎉 -7 KB 🎉 |
Dependency size | 10.64 MB | 10.63 MB | 🎉 -7 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/vue3
Before | After | Difference | |
---|---|---|---|
Dependency count | 17 | 13 | 🎉 -4 🎉 |
Self size | 87 KB | 78 KB | 🎉 -9 KB 🎉 |
Dependency size | 6.14 MB | 6.13 MB | 🎉 -8 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/web-components
Before | After | Difference | |
---|---|---|---|
Dependency count | 7 | 3 | 🎉 -4 🎉 |
Self size | 62 KB | 55 KB | 🎉 -7 KB 🎉 |
Dependency size | 55 KB | 47 KB | 🎉 -8 KB 🎉 |
Bundle Size Analyzer | Link | Link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
949 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings | Greptile
setup(); | ||
|
||
import { composeConfigs, PreviewWeb } from 'storybook/internal/preview-api'; | ||
import { isPreview } from 'storybook/internal/csf'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: isPreview is imported but never used in the generated code
window.__STORYBOOK_PREVIEW__.onStoriesChanged({ importFn: newModule.importFn }); | ||
}); | ||
|
||
import.meta.hot.accept(["/user/.storybook/preview"], (previewAnnotationModules) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: HMR accept path list should include both annotations like in non-CSF4 case
child.on('exit', (code) => { | ||
if (code != null) { | ||
process.exit(code); | ||
} | ||
process.exit(1); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Exit code 1 is used even when child process exits normally with null code
child.on('exit', (code) => { | |
if (code != null) { | |
process.exit(code); | |
} | |
process.exit(1); | |
}); | |
child.on('exit', (code) => { | |
if (code != null) { | |
process.exit(code); | |
} | |
process.exit(0); | |
}); |
@@ -25,7 +25,7 @@ vi.mock('@storybook/global', () => ({ | |||
}, | |||
})); | |||
|
|||
vi.mock('@storybook/core/client-logger'); | |||
vi.mock('storybook/internal/client-logger'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Duplicate mock declaration removed on line 49
vi.mock('storybook/internal/client-logger'); |
vi.mock('storybook/internal/channels', async (importOriginal) => { | ||
return { | ||
...(await importOriginal<typeof import('@storybook/core/channels')>()), | ||
...(await importOriginal<typeof import('storybook/internal/channels')>()), | ||
createBrowserChannel: () => mockChannel, | ||
}; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Duplicate mock definition - this mock is defined again on lines 46-51
vi.mock('storybook/internal/client-logger', async (importOriginal) => { | ||
return { | ||
...(await importOriginal<typeof import('@storybook/core/client-logger')>()), | ||
...(await importOriginal<typeof import('storybook/internal/client-logger')>()), | ||
createBrowserChannel: () => mockChannel, | ||
}; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Mock returns createBrowserChannel but this isn't exported by client-logger
vi.mock('storybook/internal/client-logger', async (importOriginal) => { | |
return { | |
...(await importOriginal<typeof import('@storybook/core/client-logger')>()), | |
...(await importOriginal<typeof import('storybook/internal/client-logger')>()), | |
createBrowserChannel: () => mockChannel, | |
}; | |
}); | |
vi.mock('storybook/internal/client-logger', async (importOriginal) => { | |
return { | |
...(await importOriginal<typeof import('storybook/internal/client-logger')>()) | |
}; | |
}); |
// @ts-expect-error Ignore | ||
vi.mocked(readFileSync).mockImplementation((file: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider using as jest.MockedFunction<typeof readFileSync>
instead of @ts-expect-error
} catch (e) { | ||
// Skip files that can't be read | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Error should be logged to help debug file access issues
if (!dryRun) { | ||
const packageJson = await packageManager.retrievePackageJson(); | ||
const devDependencies = packageJson.devDependencies ?? {}; | ||
const storybookVersion = await packageManager.getPackageVersion('storybook'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Ensure storybookVersion exists before using it in dependency string
const storybookVersion = await packageManager.getPackageVersion('storybook'); | |
const storybookVersion = await packageManager.getPackageVersion('storybook') ?? 'latest'; |
This is an automated pull request that bumps the version from
9.0.0-alpha.1
to9.0.0-alpha.2
.Once this pull request is merged, it will trigger a new release of version
9.0.0-alpha.2
.If you're not a core maintainer with permissions to release you can ignore this pull request.
To do
Before merging the PR, there are a few QA steps to go through:
And for each change below:
This is a list of all the PRs merged and commits pushed directly to
next
, that will be part of this release:node_modules
in stats file #30711 (will also be patched)@storybook/core
withstorybook
#30168c2a0b919a0af6df212b688c399cb1c6b0ed7edb3
svelte-vite
"743bf903693c1a54678a85024ce5b5a2a0dac222
svelte-vite
30f4c867c8ef474d8ef074698410d378e38d4624
storybook
fromnode_modules
to run internal Storybook #30719nr build storybook
work again #307214cff5b53d6ef8df9e4f62c8c5d11bdb83ec01396
a4fd153de2ef19f41c101f45332081f18255d074
If you've made any changes doing the above QA (change PR titles, revert PRs), manually trigger a re-generation of this PR with this workflow and wait for it to finish. It will wipe your progress in this to do, which is expected.
Feel free to manually commit any changes necessary to this branch after you've done the last re-generation, following the Make Manual Changes section in the docs, especially if you're making changes to the changelog.
When everything above is done:
Generated changelog
9.0.0-alpha.2
@storybook/core
withstorybook
- #30168, thanks @ndelangen!node_modules
in stats file - #30711, thanks @JReinhold!Greptile Summary
Based on the provided information, I'll create a concise summary of this major version release PR:
This PR prepares Storybook 9.0.0-alpha.2 with significant architectural changes, new features, and breaking changes across the codebase.
@storybook/core
into mainstorybook
package with all core functionality accessed throughstorybook/internal/*
pathsstorybook index
command to generate index.json without full buildThe changes consolidate packages, improve developer experience, and set up a more maintainable architecture for Storybook 9.0.