Skip to content
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

Merged
merged 203 commits into from
Mar 5, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 5, 2025

This is an automated pull request that bumps the version from 9.0.0-alpha.1 to 9.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:

  • Add the "freeze" label to this PR, to ensure it doesn't get automatically forced pushed by new changes.
  • Add the "ci:daily" label to this PR, to trigger the full test suite to run on this PR.

And for each change below:

  1. Ensure the change is appropriate for the version bump. E.g. patch release should only contain patches, not new or de-stabilizing features. If a change is not appropriate, revert the PR.
  2. Ensure the PR is labeled correctly with one of: "BREAKING CHANGE", "feature request", "bug", "maintenance", "dependencies", "documentation", "build", "unknown".
  3. Ensure the PR title is correct, and follows the format "[Area]: [Summary]", e.g. "React: Fix hooks in CSF3 render functions". If it is not correct, change the title in the PR.
    • Areas include: React, Vue, Core, Docs, Controls, etc.
    • First word of summary indicates the type: “Add”, “Fix”, “Upgrade”, etc.
    • The entire title should fit on a line

This is a list of all the PRs merged and commits pushed directly to next, that will be part of this release:

  • 🐛 Bug: React: Export returntype of ReactMeta#story #30580
  • ❗ Breaking Change: Core: Move @storybook/instrumenter into core #30740
  • ❗ Breaking Change: Typescript: Drop Typescript < 4.9 support #30736
  • ✨ Feature Request: Vite: Include node_modules in stats file #30711 (will also be patched)
  • ✨ Feature Request: CLI: Add index command / API #30071
  • ❗ Breaking Change: Test Addon: Stabilize and remove experimental status #30727
  • 🐛 Bug: Manager: Add Content-Type to prevent reliance on content type sniffing, fixing Cloud IDEs #30606 (will also be patched)
  • 🐛 Bug: Vite: Improve handling of preview annotations #28798
  • ✨ Feature Request: AutoBlocker: Add major version upgrade blocker #30714
  • 🐛 Bug: CSF Factories: Align addon-essentials import with other addons #30716 (will also be patched)
  • 🔧 Maintenance: Maintenance: Remove deprecated packages #30690
  • 🐛 Bug: Next: Support Next 15.2 #30702 (will also be patched)
  • 🔧 Maintenance: Revert "CLI: Don't initially select Documentation and Testing features" #30694 (will also be patched)
  • 🐛 Bug: Core: Support TS3.8+ again #30700 (will also be patched)
  • 🔧 Maintenance: Maintenance: Merge @storybook/core with storybook #30168
  • ⚠️ Direct commit: Merge remote-tracking branch 'origin/next-release' into next c2a0b919a0af6df212b688c399cb1c6b0ed7edb3
  • 🏗️ Build: Build: Fix check #30752
  • 📝 Documentation: Docs: Add missing PRs to 8.6.0-beta.0 changelog entry #30655
  • ⚠️ Direct commit: Revert "Adjust requirements for svelte-vite" 743bf903693c1a54678a85024ce5b5a2a0dac222
  • ⚠️ Direct commit: Adjust requirements for svelte-vite 30f4c867c8ef474d8ef074698410d378e38d4624
  • 🏗️ Build: Build: Use storybook from node_modules to run internal Storybook #30719
  • 🏗️ Build: Build: Pin typescript to avoid version conflicts with eslint-typescript #30731 (will also be patched)
  • 🏗️ Build: Build: Make nr build storybook work again #30721
  • 📝 Documentation: Docs: Add Rsbuild Storybook builder to builders page #30693 (will also be patched)
  • ⚠️ Direct commit: Revert "Svelte: Drop Support for Svelte < 5" 4cff5b53d6ef8df9e4f62c8c5d11bdb83ec01396
  • ⚠️ Direct commit: Svelte: Drop Support for Svelte < 5 a4fd153de2ef19f41c101f45332081f18255d074
  • 🏗️ Build: Build: Fix addon essentials entry #30696
  • 🏗️ Build: Buid: Remove tailwind for now as it is failing vite postcss in experimental-nextjs-vite/default-ts #30698

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

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.

  • Merged @storybook/core into main storybook package with all core functionality accessed through storybook/internal/* paths
  • Added major version upgrade blocker to prevent skipping versions (e.g., v6 to v8) for smoother migrations
  • Added new storybook index command to generate index.json without full build
  • Moved instrumenter package into core and stabilized test addon (renamed from experimental)
  • Improved Vite builder with better preview annotation handling and node_modules stats tracking
  • Added Content-Type headers to manager responses to fix Cloud IDE issues
  • Dropped support for TypeScript versions below 4.9

The changes consolidate packages, improve developer experience, and set up a more maintainable architecture for Storybook 9.0.

JReinhold and others added 20 commits March 3, 2025 16:32
Build: Use `storybook` from `node_modules` to run internal Storybook
…-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
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
@github-actions github-actions bot added the release For PRs that trigger new releases. Automated label Mar 5, 2025
@kasperpeulen kasperpeulen added ci:daily Run the CI jobs that normally run in the daily job. freeze Freeze the Release PR with this label labels Mar 5, 2025
Copy link

nx-cloud bot commented Mar 5, 2025

View your CI Pipeline Execution ↗ for commit 54ecfe5.

Command Status Duration Result
nx affected -t check -c production --parallel=7 ✅ Succeeded <1s View ↗
nx run-many -t build -c production --parallel=3 ✅ Succeeded 4m 13s View ↗

☁️ Nx Cloud last updated this comment at 2025-03-05 13:53:19 UTC

@storybook-pr-benchmarking
Copy link

Package Benchmarks

Commit: 54ecfe5, ran on 5 March 2025 at 13:59:47 UTC

The following packages have significant changes to their size or dependencies:

@storybook/addon-a11y

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

@shilman shilman merged commit 03531ab into next-release Mar 5, 2025
99 checks passed
@shilman shilman deleted the version-non-patch-from-9.0.0-alpha.1 branch March 5, 2025 15:41
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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';
Copy link
Contributor

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) => {
Copy link
Contributor

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

Comment on lines +56 to +61
child.on('exit', (code) => {
if (code != null) {
process.exit(code);
}
process.exit(1);
});
Copy link
Contributor

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

Suggested change
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');
Copy link
Contributor

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

Suggested change
vi.mock('storybook/internal/client-logger');

Comment on lines +28 to 33
vi.mock('storybook/internal/channels', async (importOriginal) => {
return {
...(await importOriginal<typeof import('@storybook/core/channels')>()),
...(await importOriginal<typeof import('storybook/internal/channels')>()),
createBrowserChannel: () => mockChannel,
};
});
Copy link
Contributor

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

Comment on lines +52 to 57
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,
};
});
Copy link
Contributor

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

Suggested change
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')>())
};
});

Comment on lines +89 to +90
// @ts-expect-error Ignore
vi.mocked(readFileSync).mockImplementation((file: string) => {
Copy link
Contributor

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

Comment on lines +58 to +60
} catch (e) {
// Skip files that can't be read
}
Copy link
Contributor

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');
Copy link
Contributor

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

Suggested change
const storybookVersion = await packageManager.getPackageVersion('storybook');
const storybookVersion = await packageManager.getPackageVersion('storybook') ?? 'latest';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:daily Run the CI jobs that normally run in the daily job. freeze Freeze the Release PR with this label release For PRs that trigger new releases. Automated
Projects
None yet
Development

Successfully merging this pull request may close these issues.