Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e9c4f86
fix(csf-strict): apply csf-strict rules on stories files
cylewaitforit Jul 6, 2025
01fe23d
Merge branch 'next' into csf-strict-on-stories-files
cylewaitforit Sep 10, 2025
f34122d
Create check-sandbox task
mrginglymus Sep 12, 2025
4c198ed
Remove typescript version override
mrginglymus Sep 12, 2025
a2ac7da
Fixes
mrginglymus Sep 12, 2025
6b6e9b6
Disable skipLibCheck
mrginglymus Sep 12, 2025
730f279
Let @types/mdx know we're using React
mrginglymus Sep 12, 2025
6fa69bd
snaps
mrginglymus Sep 12, 2025
f9c3d71
Merge branch 'next' into tc-sb
ndelangen Sep 15, 2025
cabc59e
Add circle ci config
mrginglymus Sep 15, 2025
59007d8
Merge branch 'next' into tc-sb
mrginglymus Sep 16, 2025
f6763fb
Install sandbox dependencies first
mrginglymus Sep 16, 2025
d5a5789
Improve preparation of sandboxes for typechecking
mrginglymus Sep 16, 2025
4051541
Merge branch 'next' into tc-sb
ndelangen Sep 18, 2025
195d2ea
Merge branch 'next' into csf-strict-on-stories-files
cylewaitforit Sep 24, 2025
0509e56
Merge branch 'next' into tc-sb
mrginglymus Oct 27, 2025
8db83ae
Add test types
mrginglymus Oct 27, 2025
17d3f63
Merge branch 'next' into tc-sb
ndelangen Oct 28, 2025
8a7a695
Merge branch 'next' into tc-sb
ndelangen Oct 29, 2025
7c8f521
Merge branch 'next' into tc-sb
ndelangen Oct 29, 2025
ba719e6
Merge branch 'next' into tc-sb
ndelangen Nov 4, 2025
af0cfa7
chore(renderers/preact): set preact as import source
43081j Nov 5, 2025
f9a4c30
fix(middleware): prepend 'file://' to middleware import path for corr…
ndelangen Nov 5, 2025
47d8e38
Merge branch 'next' into csf-strict-on-stories-files
yannbf Nov 7, 2025
d1b4c2f
Merge pull request #31963 from cylewaitforit/csf-strict-on-stories-files
yannbf Nov 7, 2025
1e5021e
Build: Update and change the yarn-pnp example to use Vue
yannbf Nov 7, 2025
12f58d9
Merge branch 'next-release' into next
storybook-bot Nov 7, 2025
a1df575
Update CHANGELOG.md for v10.0.6 [skip ci]
storybook-bot Nov 7, 2025
110b0e5
add yarn-pnp test to CI
yannbf Nov 7, 2025
4df26a4
Discard changes to test-storybooks/yarn-pnp/yarn.lock
ndelangen Nov 7, 2025
947b947
checkin empty lockfile
ndelangen Nov 7, 2025
b4f2b67
Docs: Fix Svelte references
jonniebigodes Nov 7, 2025
c80ffb3
fix pnp issues
yannbf Nov 7, 2025
2a6e675
Merge branch 'next' into docs_adjust_svelte_references
jonniebigodes Nov 7, 2025
67db3e4
Merge pull request #32985 from storybookjs/docs_adjust_svelte_references
jonniebigodes Nov 7, 2025
cadaea0
React Native Web: Update vite-plugin-rnw for overall improvements
dannyhw Nov 8, 2025
4c99ea4
fix: update lock file
dannyhw Nov 8, 2025
571c607
fix: types
dannyhw Nov 8, 2025
07dca72
Merge pull request #32991 from dannyhw/feat/update-rnw-plugin-for-ove…
shilman Nov 9, 2025
465b020
try out without getAbsolutePath
ndelangen Nov 10, 2025
d02d660
Merge pull request #32955 from storybookjs/norbert/windows-middleware…
ndelangen Nov 10, 2025
a3dff19
Merge pull request #32979 from storybookjs/yann/update-yarn-pnp-example
ndelangen Nov 10, 2025
816d794
Merge branch 'next' into pr/mrginglymus/32447
ndelangen Nov 10, 2025
fca6e7d
Merge pull request #32447 from mrginglymus/tc-sb
ndelangen Nov 10, 2025
ec1e7a2
Merge branch 'next' into pr/43081j/32953
ndelangen Nov 10, 2025
9e8d567
fix build, avoid using JSX
ndelangen Nov 10, 2025
5aab9c0
Merge branch 'next' into preact-import-source
ndelangen Nov 10, 2025
78d459f
Next.js: Update SWC loader to support new wasm detection
yannbf Nov 11, 2025
07e8036
Merge pull request #32953 from 43081j/preact-import-source
ndelangen Nov 11, 2025
c5582fa
extra fix
yannbf Nov 11, 2025
3907cd9
Build: Enhance run-registry script to kill existing Verdaccio processes
yannbf Nov 11, 2025
d12cf1b
Merge pull request #33003 from storybookjs/yann/nextjs-wasm-changes
yannbf Nov 11, 2025
1d0c0da
Merge pull request #33005 from storybookjs/yann/kill-verdaccio-process
yannbf Nov 11, 2025
bb38f2d
Build: Fix internal docgen issue
yannbf Nov 11, 2025
83355ec
Merge pull request #33007 from storybookjs/yann/fix-react-docgen-issues
yannbf Nov 11, 2025
53dc9a4
Write changelog for 10.1.0-alpha.8 [skip ci]
storybook-bot Nov 11, 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
66 changes: 66 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,31 @@ jobs:
name: Ensure no changes pending
- report-workflow-on-failure
- cancel-workflow-on-failure
check-sandboxes:
executor:
class: medium
name: sb_node_22_classic
parallelism: << parameters.parallelism >>
parameters:
parallelism:
type: integer
steps:
- git-shallow-clone/checkout_advanced:
clone_options: --depth 1 --verbose
- attach_workspace:
at: .
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
name: Install sandbox dependencies
- run:
command: yarn task --task check-sandbox --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) --no-link --start-from=never --junit
name: Type check Sandboxes
- report-workflow-on-failure:
template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)
- store_test_results:
path: test-results
chromatic-internal-storybook:
environment:
NODE_OPTIONS: --max_old_space_size=4096
Expand Down Expand Up @@ -884,6 +909,26 @@ jobs:
template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)
- store_test_results:
path: test-results
test-yarn-pnp:
executor:
class: medium
name: sb_playwright
steps:
- git-shallow-clone/checkout_advanced:
clone_options: --depth 1 --verbose
- attach_workspace:
at: .
- run:
command: yarn install --no-immutable
environment:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
name: Install dependencies
working_directory: test-storybooks/yarn-pnp
- run:
command: yarn storybook --smoke-test
name: Run Storybook smoke test
working_directory: test-storybooks/yarn-pnp
- report-workflow-on-failure
unit-tests:
executor:
class: xlarge
Expand Down Expand Up @@ -994,6 +1039,10 @@ workflows:
parallelism: 34
requires:
- build
- check-sandboxes:
parallelism: 1
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 31
requires:
Expand Down Expand Up @@ -1024,6 +1073,9 @@ workflows:
- svelte
requires:
- build
- test-yarn-pnp:
requires:
- build
- e2e-ui:
requires:
- build
Expand Down Expand Up @@ -1109,6 +1161,10 @@ workflows:
parallelism: 7
requires:
- create-sandboxes
- check-sandboxes:
parallelism: 1
requires:
- create-sandboxes
- test-portable-stories:
matrix:
parameters:
Expand All @@ -1119,6 +1175,9 @@ workflows:
- svelte
requires:
- build
- test-yarn-pnp:
requires:
- build
- e2e-ui:
requires:
- build
Expand Down Expand Up @@ -1185,6 +1244,13 @@ workflows:
parallelism: 5
requires:
- create-sandboxes
- check-sandboxes:
parallelism: 1
requires:
- create-sandboxes
- test-yarn-pnp:
requires:
- build
- e2e-ui:
requires:
- build
Expand Down
27 changes: 27 additions & 0 deletions .circleci/src/jobs/check-sandboxes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
executor:
class: medium
name: sb_node_22_classic

parameters:
parallelism:
type: integer

parallelism: << parameters.parallelism >>

steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Type check Sandboxes
command: yarn task --task check-sandbox --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) --no-link --start-from=never --junit
- report-workflow-on-failure:
template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)
- store_test_results:
path: test-results
21 changes: 21 additions & 0 deletions .circleci/src/jobs/test-yarn-pnp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
executor:
name: sb_playwright
class: medium

steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Install dependencies
command: yarn install --no-immutable
working_directory: test-storybooks/yarn-pnp
environment:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- run:
name: Run Storybook smoke test
command: yarn storybook --smoke-test
working_directory: test-storybooks/yarn-pnp

- report-workflow-on-failure
7 changes: 7 additions & 0 deletions .circleci/src/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
parallelism: 34
requires:
- build
- check-sandboxes:
parallelism: 1
requires:
- create-sandboxes
# - smoke-test-sandboxes: # disabled for now
# requires:
# - create-sandboxes
Expand Down Expand Up @@ -63,6 +67,9 @@ jobs:
matrix:
parameters:
directory: ['react', 'vue3', 'nextjs', 'svelte']
- test-yarn-pnp:
requires:
- build
- e2e-ui:
requires:
- build
Expand Down
7 changes: 7 additions & 0 deletions .circleci/src/workflows/merged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,19 @@ jobs:
parallelism: 7
requires:
- create-sandboxes
- check-sandboxes:
parallelism: 1
requires:
- create-sandboxes
- test-portable-stories:
requires:
- build
matrix:
parameters:
directory: ['react', 'vue3', 'nextjs', 'svelte']
- test-yarn-pnp:
requires:
- build
- e2e-ui:
requires:
- build
Expand Down
7 changes: 7 additions & 0 deletions .circleci/src/workflows/normal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,18 @@ jobs:
parallelism: 5
requires:
- create-sandboxes
- check-sandboxes:
parallelism: 1
requires:
- create-sandboxes
# TODO: don't forget to reenable this
# - bench-sandboxes:
# parallelism: 5
# requires:
# - create-sandboxes
- test-yarn-pnp:
requires:
- build
- e2e-ui:
requires:
- build
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 10.0.6

- CSF: Fix export interface declaration for NextPreview - [#32914](https://github.com/storybookjs/storybook/pull/32914), thanks @icopp!
- Controls: Add range validation in Number Control - [#32539](https://github.com/storybookjs/storybook/pull/32539), thanks @ia319!
- Fix: Export interface declaration for ReactMeta - [#32915](https://github.com/storybookjs/storybook/pull/32915), thanks @icopp!
- Vitest Addon: Add support for Preact - [#32948](https://github.com/storybookjs/storybook/pull/32948), thanks @yannbf!

## 10.0.5

- Core: Add reentry guard to focus patch - [#32655](https://github.com/storybookjs/storybook/pull/32655), thanks @ia319!
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 10.1.0-alpha.8

- ESLint: Only apply csf-strict rules on stories files - [#31963](https://github.com/storybookjs/storybook/pull/31963), thanks @cylewaitforit!
- Middleware: Prepend `file://` to middleware `import` for Windows support - [#32955](https://github.com/storybookjs/storybook/pull/32955), thanks @ndelangen!
- Next.js: Update SWC loader to support new wasm detection - [#33003](https://github.com/storybookjs/storybook/pull/33003), thanks @yannbf!
- React Native Web: Update vite-plugin-rnw for overall improvements - [#32991](https://github.com/storybookjs/storybook/pull/32991), thanks @dannyhw!

## 10.1.0-alpha.7

- CSF: Fix export interface declaration for NextPreview - [#32914](https://github.com/storybookjs/storybook/pull/32914), thanks @icopp!
Expand Down
11 changes: 11 additions & 0 deletions code/addons/docs/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type React from 'react';

import { definePreviewAddon } from 'storybook/internal/csf';

import * as addonAnnotations from './preview';
Expand All @@ -6,4 +8,13 @@ import type { DocsTypes } from './types';
export { DocsRenderer } from './DocsRenderer';
export type { DocsTypes };

declare module 'mdx/types' {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace JSX {
type Element = React.JSX.Element;
type ElementClass = React.JSX.ElementClass;
type IntrinsicElements = React.JSX.IntrinsicElements;
}
}

export default () => definePreviewAddon<DocsTypes>(addonAnnotations);
2 changes: 1 addition & 1 deletion code/core/src/core-server/utils/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const fileExists = (basename: string) =>
export async function getMiddleware(configDir: string) {
const middlewarePath = fileExists(resolve(configDir, 'middleware'));
if (middlewarePath) {
const middlewareModule = await import(middlewarePath);
const middlewareModule = await import('file://' + middlewarePath);
return middlewareModule.default ?? middlewareModule;
}
return () => {};
Expand Down
17 changes: 14 additions & 3 deletions code/frameworks/nextjs/src/swc/next-swc-loader-patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DEALINGS IN THE SOFTWARE.
import { isAbsolute, relative } from 'node:path';

import type { NextConfig } from 'next';
import { isWasm, transform } from 'next/dist/build/swc/index.js';
import * as nextSwcUtils from 'next/dist/build/swc/index.js';
import { getLoaderSWCOptions } from 'next/dist/build/swc/options.js';

export interface SWCLoaderOptions {
Expand Down Expand Up @@ -136,7 +136,7 @@ async function loaderTransform(this: any, parentTrace: any, source?: string, inp

const swcSpan = parentTrace.traceChild('next-swc-transform');
return swcSpan.traceAsyncFn(() =>
transform(source as any, programmaticOptions).then((output) => {
nextSwcUtils.transform(source as any, programmaticOptions).then((output) => {
if (output.eliminatedPackages && this.eliminatedPackages) {
for (const pkg of JSON.parse(output.eliminatedPackages)) {
this.eliminatedPackages.add(pkg);
Expand All @@ -152,14 +152,25 @@ const EXCLUDED_PATHS = /[\\/](cache[\\/][^\\/]+\.zip[\\/]node_modules|__virtual_
export function pitch(this: any) {
const callback = this.async();
(async () => {
let isWasm: boolean = false;

if (!!nextSwcUtils.isWasm) {
isWasm = await nextSwcUtils.isWasm();
// @ts-expect-error Relevant from Next.js >= 16.0.2-canary.12
} else if (!!nextSwcUtils.getBindingsSync) {
await nextSwcUtils.loadBindings();
// @ts-expect-error Relevant from Next.js >= 16.0.2-canary.12
isWasm = nextSwcUtils.getBindingsSync().isWasm;
}

if (
// TODO: Evaluate if this is correct after removing pnp compatibility code in SB11
// TODO: investigate swc file reading in PnP mode?
!process.versions.pnp &&
!EXCLUDED_PATHS.test(this.resourcePath) &&
this.loaders.length - 1 === this.loaderIndex &&
isAbsolute(this.resourcePath) &&
!(await isWasm())
!isWasm
) {
const loaderSpan = mockCurrentTraceSpan.traceChild('next-swc-loader');
this.addDependency(this.resourcePath);
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/react-native-web-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@storybook/builder-vite": "workspace:*",
"@storybook/react": "workspace:*",
"@storybook/react-vite": "workspace:*",
"vite-plugin-rnw": "^0.0.6",
"vite-plugin-rnw": "^0.0.8",
"vite-tsconfig-paths": "^5.1.4"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/react-native-web-vite/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
StorybookConfig as StorybookConfigBase,
} from '@storybook/react-vite';

import type { BabelOptions, Options as ReactOptions } from 'vite-plugin-rnw';
import type { RnwOptions } from 'vite-plugin-rnw';

export type FrameworkOptions = FrameworkOptionsBase & {
/**
Expand All @@ -16,7 +16,7 @@ export type FrameworkOptions = FrameworkOptionsBase & {
* @example {modulesToTranspile: ['my-library']}
*/
modulesToTranspile?: string[];
pluginReactOptions?: Omit<ReactOptions, 'babel'> & { babel?: BabelOptions };
pluginReactOptions?: RnwOptions;
/**
* @deprecated These options will be ignored. Use `pluginReactOptions` now for everything and
* override includes in order to transpile node_modules pluginBabelOptions will be removed in
Expand Down
Loading