Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
210e45c
Add documentation for Storybook with Next.js (Vite) framework and upd…
valentinpalkovic Oct 31, 2025
bfb217f
Update CLI options documentation to include new logging features: `--…
valentinpalkovic Oct 31, 2025
de89f2f
Add detailed options for Storybook installation in React Native proje…
valentinpalkovic Oct 31, 2025
b662b9d
Add integration details for the Accessibility addon with Vitest, incl…
valentinpalkovic Oct 31, 2025
42052ae
Update Vitest addon documentation to emphasize automatic setup, clari…
valentinpalkovic Oct 31, 2025
b6040df
Add interactive installation prompts to Storybook documentation, deta…
valentinpalkovic Oct 31, 2025
e433064
Doc tweaks
kylegach Nov 7, 2025
a93ac51
Add RSBuild-based sandboxes
valentinpalkovic Nov 13, 2025
ca8270b
undo this commit soon
yannbf Nov 13, 2025
62009ba
Revert "undo this commit soon"
yannbf Nov 13, 2025
f280b95
Introduce rsbuild sandboxes to CI tests
yannbf Nov 13, 2025
222d89a
Merge branch 'valentin/cli-init-rework' into valentin/add-rsbuild-san…
valentinpalkovic Nov 13, 2025
9d02deb
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs
kylegach Nov 14, 2025
5fb56c6
Normalize sidebar presentation of frameworks
kylegach Nov 14, 2025
a779f78
Merge branch 'valentin/cli-init-rework' into valentin/add-rsbuild-san…
valentinpalkovic Nov 16, 2025
9ac50d0
Apply suggestions from code review
kylegach Nov 17, 2025
0fb41f2
Apply suggestion from @kylegach
kylegach Nov 17, 2025
848bd41
Build: Use projects instead of workspaces in Vitest
yannbf Nov 18, 2025
f7a9007
Merge branch 'valentin/cli-init-rework' into valentin/add-rsbuild-san…
valentinpalkovic Nov 19, 2025
4fe74b8
Merge remote-tracking branch 'origin/valentin/cli-init-rework' into v…
valentinpalkovic Nov 19, 2025
ca8093d
Add rsbuild dependencies to base templates and update resolutions for…
valentinpalkovic Nov 19, 2025
d59aba7
Merge branch 'next' into valentin/add-rsbuild-sandboxes
valentinpalkovic Nov 19, 2025
b5e86cd
Filter out 'docs' addon stories for specific RSBUILD frameworks in sa…
valentinpalkovic Nov 19, 2025
05c1652
Refactor getFrameworkInfo to include configDir parameter and update f…
valentinpalkovic Nov 19, 2025
dc9a585
Merge branch 'next' into valentin/cli-init-docs
kylegach Nov 19, 2025
5c0ba1a
Update CLI options to replace `--write-logs` with `--logfile [path]` …
valentinpalkovic Nov 19, 2025
af5666f
Merge pull request #32903 from storybookjs/valentin/cli-init-docs
valentinpalkovic Nov 19, 2025
fbb0a7d
Make framework name optional in StorybookMetadata type
valentinpalkovic Nov 19, 2025
1e02a9e
Make framework name optional in StorybookMetadata type
valentinpalkovic Nov 19, 2025
86ee663
Revert "Make framework name optional in StorybookMetadata type"
valentinpalkovic Nov 19, 2025
edd2e2f
Fix tests
valentinpalkovic Nov 19, 2025
7b6f0fb
Angular: Add support for additional Angular dependencies and standard…
valentinpalkovic Nov 20, 2025
fcbd2c7
Remove @angular/forms as a peer-dependency
valentinpalkovic Nov 20, 2025
ab09aa6
Angular: Update extra dependencies to support devkit versioning in ge…
valentinpalkovic Nov 20, 2025
0d95f7b
Angular: Update peerDependencies to support newer versions of Angular…
valentinpalkovic Nov 20, 2025
f58366c
CLI: Change yarn package manager value to yarn1
valentinpalkovic Nov 20, 2025
2322744
Revert this commit
valentinpalkovic Nov 20, 2025
f624a4d
Merge pull request #33098 from storybookjs/valentin/fix-angular-prere…
valentinpalkovic Nov 20, 2025
fa8437c
Merge branch 'next' into valentin/fix-package-manager-yarn-value
valentinpalkovic Nov 20, 2025
984cb43
Revert "Revert this commit"
valentinpalkovic Nov 20, 2025
a82c687
Merge pull request #33099 from storybookjs/valentin/fix-package-manag…
yannbf Nov 20, 2025
e7e59a1
Merge branch 'next' into valentin/add-rsbuild-sandboxes
valentinpalkovic Nov 20, 2025
e2ff8a1
Merge branch 'next' into yann/vitest-use-projects
yannbf Nov 20, 2025
585d93f
Enhance framework info retrieval by sanitizing package paths and upda…
valentinpalkovic Nov 20, 2025
80bd74b
Fix types
valentinpalkovic Nov 20, 2025
e23169e
Merge pull request #33080 from storybookjs/yann/vitest-use-projects
yannbf Nov 20, 2025
bac0e91
Don't use csf factories for rsbuild
valentinpalkovic Nov 20, 2025
6713380
Update template names to use 'RsBuild' and add experimental test synt…
valentinpalkovic Nov 20, 2025
0dd8595
Add module mocking stories and update e2e test navigation path
valentinpalkovic Nov 20, 2025
60daa33
Merge remote-tracking branch 'origin/next' into valentin/add-rsbuild-…
valentinpalkovic Nov 20, 2025
df5b95f
Remove csf-factories from non-react rsbuild-based sandboxes
valentinpalkovic Nov 20, 2025
b366e4b
Exclude e2e-dev job for rsbuild sandboxes
valentinpalkovic Nov 20, 2025
cc42c4c
Remove console.log
valentinpalkovic Nov 20, 2025
c59a4ff
Merge pull request #33039 from storybookjs/valentin/add-rsbuild-sandb…
valentinpalkovic Nov 20, 2025
9291675
Write changelog for 10.1.0-alpha.14 [skip ci]
storybook-bot Nov 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ jobs:
mkdir features-1
cd features-1
npm set registry http://localhost:6001
npx create-storybook --yes --package-manager npm --features docs test a11y
npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug
npx vitest
environment:
IN_STORYBOOK_SANDBOX: true
Expand Down Expand Up @@ -1172,15 +1172,15 @@ workflows:
requires:
- build
- create-sandboxes:
parallelism: 34
parallelism: 38
requires:
- build
- check-sandboxes:
parallelism: 1
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 31
parallelism: 35
requires:
- create-sandboxes
- e2e-production:
Expand All @@ -1192,7 +1192,7 @@ workflows:
requires:
- create-sandboxes
- test-runner-production:
parallelism: 29
parallelism: 33
requires:
- create-sandboxes
- vitest-integration:
Expand Down Expand Up @@ -1286,11 +1286,11 @@ workflows:
requires:
- unit-tests
- create-sandboxes:
parallelism: 19
parallelism: 21
requires:
- build
- chromatic-sandboxes:
parallelism: 16
parallelism: 18
requires:
- create-sandboxes
- e2e-production:
Expand All @@ -1302,7 +1302,7 @@ workflows:
requires:
- create-sandboxes
- test-runner-production:
parallelism: 14
parallelism: 16
requires:
- create-sandboxes
- vitest-integration:
Expand Down Expand Up @@ -1381,11 +1381,11 @@ workflows:
requires:
- unit-tests
- create-sandboxes:
parallelism: 13
parallelism: 14
requires:
- build
- chromatic-sandboxes:
parallelism: 10
parallelism: 11
requires:
- create-sandboxes
- e2e-production:
Expand All @@ -1397,7 +1397,7 @@ workflows:
requires:
- create-sandboxes
- test-runner-production:
parallelism: 8
parallelism: 9
requires:
- create-sandboxes
- vitest-integration:
Expand Down
6 changes: 3 additions & 3 deletions .circleci/src/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
requires:
- build
- create-sandboxes:
parallelism: 34
parallelism: 38
requires:
- build
- check-sandboxes:
Expand All @@ -42,7 +42,7 @@ jobs:
# requires:
# - create-sandboxes
- chromatic-sandboxes:
parallelism: 31
parallelism: 35
requires:
- create-sandboxes
- e2e-production:
Expand All @@ -54,7 +54,7 @@ jobs:
requires:
- create-sandboxes
- test-runner-production:
parallelism: 29
parallelism: 33
requires:
- create-sandboxes
- vitest-integration:
Expand Down
6 changes: 3 additions & 3 deletions .circleci/src/workflows/merged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:
requires:
- unit-tests
- create-sandboxes:
parallelism: 19
parallelism: 21
requires:
- build
- chromatic-sandboxes:
parallelism: 16
parallelism: 18
requires:
- create-sandboxes
- e2e-production:
Expand All @@ -50,7 +50,7 @@ jobs:
requires:
- create-sandboxes
- test-runner-production:
parallelism: 14
parallelism: 16
requires:
- create-sandboxes
- vitest-integration:
Expand Down
6 changes: 3 additions & 3 deletions .circleci/src/workflows/normal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:
requires:
- unit-tests
- create-sandboxes:
parallelism: 13
parallelism: 14
requires:
- build
- chromatic-sandboxes:
parallelism: 10
parallelism: 11
requires:
- create-sandboxes
- e2e-production:
Expand All @@ -50,7 +50,7 @@ jobs:
requires:
- create-sandboxes
- test-runner-production:
parallelism: 8
parallelism: 9
requires:
- create-sandboxes
- vitest-integration:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 10.1.0-alpha.14

- Angular: Add support for v21 - [#33098](https://github.com/storybookjs/storybook/pull/33098), thanks @valentinpalkovic!
- Build: Add Rsbuild-based sandboxes - [#33039](https://github.com/storybookjs/storybook/pull/33039), thanks @valentinpalkovic!
- CLI: Change yarn package manager value to yarn1 - [#33099](https://github.com/storybookjs/storybook/pull/33099), thanks @valentinpalkovic!

## 10.1.0-alpha.13

- CLI: Modernize Storybook CLI with new init workflow, Clack UI, and Generator System - [#32717](https://github.com/storybookjs/storybook/pull/32717), thanks @valentinpalkovic!
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestCommonConfig } from '../../vitest.workspace';
import { vitestCommonConfig } from '../../vitest.shared';

export default mergeConfig(
vitestCommonConfig,
Expand Down
2 changes: 1 addition & 1 deletion code/addons/docs/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestCommonConfig } from '../../vitest.workspace';
import { vitestCommonConfig } from '../../vitest.shared';

export default mergeConfig(
vitestCommonConfig,
Expand Down
2 changes: 1 addition & 1 deletion code/addons/links/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestCommonConfig } from '../../vitest.workspace';
import { vitestCommonConfig } from '../../vitest.shared';

export default mergeConfig(
vitestCommonConfig,
Expand Down
2 changes: 1 addition & 1 deletion code/addons/onboarding/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestCommonConfig } from '../../vitest.workspace';
import { vitestCommonConfig } from '../../vitest.shared';

export default mergeConfig(
vitestCommonConfig,
Expand Down
2 changes: 1 addition & 1 deletion code/addons/pseudo-states/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestCommonConfig } from '../../vitest.workspace';
import { vitestCommonConfig } from '../../vitest.shared';

export default mergeConfig(
vitestCommonConfig,
Expand Down
14 changes: 8 additions & 6 deletions code/addons/themes/src/postinstall.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { PackageManagerName } from 'storybook/internal/common';

import { spawnSync } from 'child_process';

const PACKAGE_MANAGER_TO_COMMAND = {
npm: 'npx',
pnpm: 'pnpm dlx',
yarn1: 'npx',
yarn2: 'yarn dlx',
bun: 'bunx',
[PackageManagerName.NPM]: 'npx',
[PackageManagerName.PNPM]: 'pnpm dlx',
[PackageManagerName.YARN1]: 'npx',
[PackageManagerName.YARN2]: 'yarn dlx',
[PackageManagerName.BUN]: 'bunx',
};

const selectPackageManagerCommand = (packageManager: string) =>
PACKAGE_MANAGER_TO_COMMAND[packageManager as keyof typeof PACKAGE_MANAGER_TO_COMMAND];

export default async function postinstall({ packageManager = 'npm' }) {
export default async function postinstall({ packageManager = PackageManagerName.NPM }) {
const commandString = selectPackageManagerCommand(packageManager);
const [command, ...commandArgs] = commandString.split(' ');

Expand Down
2 changes: 1 addition & 1 deletion code/addons/themes/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestCommonConfig } from '../../vitest.workspace';
import { vitestCommonConfig } from '../../vitest.shared';

export default mergeConfig(
vitestCommonConfig,
Expand Down
2 changes: 1 addition & 1 deletion code/addons/vitest/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestCommonConfig } from '../../vitest.workspace';
import { vitestCommonConfig } from '../../vitest.shared';

export default mergeConfig(
vitestCommonConfig,
Expand Down
2 changes: 1 addition & 1 deletion code/builders/builder-vite/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestCommonConfig } from '../../vitest.workspace';
import { vitestCommonConfig } from '../../vitest.shared';

export default mergeConfig(
vitestCommonConfig,
Expand Down
2 changes: 1 addition & 1 deletion code/builders/builder-webpack5/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, mergeConfig } from 'vitest/config';

import { vitestCommonConfig } from '../../vitest.workspace';
import { vitestCommonConfig } from '../../vitest.shared';

export default mergeConfig(
vitestCommonConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type { InstallationMetadata } from './types';

export enum PackageManagerName {
NPM = 'npm',
YARN1 = 'yarn',
YARN1 = 'yarn1',
YARN2 = 'yarn2',
PNPM = 'pnpm',
BUN = 'bun',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ export class JsPackageManagerFactory {

/** Look up map of package manager proxies by name */
private static PROXY_MAP: Record<PackageManagerName, PackageManagerProxy> = {
npm: NPMProxy,
pnpm: PNPMProxy,
yarn: Yarn1Proxy,
yarn2: Yarn2Proxy,
bun: BUNProxy,
[PackageManagerName.NPM]: NPMProxy,
[PackageManagerName.PNPM]: PNPMProxy,
[PackageManagerName.YARN1]: Yarn1Proxy,
[PackageManagerName.YARN2]: Yarn2Proxy,
[PackageManagerName.BUN]: BUNProxy,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion code/core/src/csf-tools/ConfigFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ export const isCsfFactoryPreview = (previewConfig: ConfigFile) => {
return !!program.body.find((node) => {
return (
t.isImportDeclaration(node) &&
node.source.value.includes('@storybook') &&
node.source.value.includes('storybook') &&
node.specifiers.some((specifier) => {
return (
t.isImportSpecifier(specifier) &&
Expand Down
73 changes: 31 additions & 42 deletions code/core/src/telemetry/get-framework-info.test.ts
Original file line number Diff line number Diff line change
@@ -1,58 +1,47 @@
import { sep } from 'node:path';

import { describe, expect, it, vi } from 'vitest';
import { beforeEach, describe, expect, it, vi } from 'vitest';

import type { StorybookConfig } from 'storybook/internal/types';

import { getFrameworkInfo } from './get-framework-info';
import { getActualPackageJson } from './package-json';

vi.mock('./package-json', () => ({
getActualPackageJson: vi.fn(),
vi.mock('storybook/internal/common', () => ({
getStorybookInfo: vi.fn(),
}));

describe('getFrameworkInfo', () => {
it('should return an empty object if mainConfig.framework is undefined', async () => {
const result = await getFrameworkInfo({} as StorybookConfig);
expect(result).toEqual({});
const defaultInfo = {
frameworkPackage: '@storybook/react',
rendererPackage: '@storybook/react',
builderPackage: '@storybook/builder-vite',
};

beforeEach(async () => {
const { getStorybookInfo } = await import('storybook/internal/common');
vi.mocked(getStorybookInfo).mockResolvedValue(defaultInfo as any);
});

it('should return an empty object if mainConfig.framework name is undefined', async () => {
const result = await getFrameworkInfo({ framework: {} } as StorybookConfig);
expect(result).toEqual({});
it('returns framework/builder/renderer with empty options when no framework provided', async () => {
const result = await getFrameworkInfo({} as StorybookConfig, '/tmp/.storybook');
expect(result).toEqual({
framework: { name: defaultInfo.frameworkPackage, options: {} },
builder: defaultInfo.builderPackage,
renderer: defaultInfo.rendererPackage,
});
});

it('should call getActualPackageJson with the correct package name', async () => {
const packageName = '@storybook/react';
const framework = { name: packageName };
await getFrameworkInfo({ framework } as StorybookConfig);
expect(getActualPackageJson).toHaveBeenCalledWith(packageName);
it('passes configDir to getStorybookInfo', async () => {
const configDir = '/my/project/.storybook';
const { getStorybookInfo } = await import('storybook/internal/common');
await getFrameworkInfo({} as StorybookConfig, configDir);
expect(getStorybookInfo).toHaveBeenCalledWith(configDir);
});

it('should resolve the framework package json correctly and strip project paths in the metadata', async () => {
const packageName = `${process.cwd()}/@storybook/react`.split('/').join(sep);
const framework = { name: packageName };
const frameworkPackageJson = {
name: packageName,
dependencies: {
'@storybook/react': '7.0.0',
'@storybook/builder-vite': '7.0.0',
},
};

vi.mocked(getActualPackageJson).mockResolvedValueOnce(frameworkPackageJson);

const result = await getFrameworkInfo({ framework } as StorybookConfig);

expect(getActualPackageJson).toHaveBeenCalledWith(packageName);

expect(result).toEqual({
framework: {
name: '$SNIP/@storybook/react'.split('/').join(sep),
options: undefined,
},
builder: '@storybook/builder-vite',
renderer: '@storybook/react',
});
it('returns provided framework options when object is passed', async () => {
const options = { foo: 'bar' } as any;
const result = await getFrameworkInfo(
{ framework: { name: '@storybook/react', options } } as any,
'/tmp/.storybook'
);
expect(result.framework.options).toEqual(options);
});
});
Loading
Loading