Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
aef45e5
remove addon jest
ndelangen Oct 6, 2025
eab3718
Enhance ESM compatibility checks and banner generation
ndelangen Oct 10, 2025
496b4e3
Refactor faux ESM require handling and update compatibility checks
ndelangen Oct 13, 2025
be44bdf
Refactor faux ESM require handling to improve insertion logic
ndelangen Oct 13, 2025
4692b5e
Refactor faux ESM require handling to use `import.meta.url` directly
ndelangen Oct 13, 2025
3d1074e
Enhance dirname usage detection in faux ESM require handling
ndelangen Oct 13, 2025
3b464c9
Remove `hasImport` function and related tests from mainConfigFile
ndelangen Oct 13, 2025
8f6f398
Enhance faux ESM require handling by preventing duplicate declarations
ndelangen Oct 13, 2025
37ca900
Update faux ESM require handling to conditionally add imports
ndelangen Oct 13, 2025
e2746f0
Merge branch 'next' into norbert/improve-esm-compat-automigration
ndelangen Oct 13, 2025
631ea19
fix preset migration note
JReinhold Oct 15, 2025
cb041b1
Merge branch 'next' into jeppe/fix-preset-migration-note
kylegach Oct 15, 2025
4a0464b
Merge pull request #32729 from storybookjs/jeppe/fix-preset-migration…
kylegach Oct 15, 2025
337a1c0
handle more esm issue use cases
yannbf Oct 15, 2025
c09c3ac
Docs: Fix A11y preview configuration example
jonniebigodes Oct 15, 2025
be58074
Merge pull request #32694 from storybookjs/norbert/improve-esm-compat…
yannbf Oct 15, 2025
eccece2
Merge branch 'next' into docs_fix_a11y_project_config_snippet_with_csf4
jonniebigodes Oct 15, 2025
5a23e52
Merge pull request #32733 from storybookjs/docs_fix_a11y_project_conf…
jonniebigodes Oct 15, 2025
bbff0e5
Update CHANGELOG.md for v9.1.11 [skip ci]
storybook-bot Oct 16, 2025
cc844cd
CLI: CSF factories codemod - support extracting annotations in npx co…
yannbf Oct 16, 2025
57f9c36
Update CHANGELOG.md for v9.1.12 [skip ci]
storybook-bot Oct 16, 2025
e9c4b29
Merge pull request #32741 from storybookjs/yann/fix-csf-codemod-getti…
yannbf Oct 16, 2025
1b756c7
Merge branch 'next' into norbert/remove-addon-jest
ndelangen Oct 17, 2025
ebf32a7
Merge pull request #32646 from storybookjs/norbert/remove-addon-jest
ndelangen Oct 17, 2025
ea560e1
Write changelog for 10.0.0-beta.13 [skip ci]
storybook-bot Oct 17, 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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 9.1.12

- Maintenance: Hotfix for missing nextjs dts files, thanks @ndelangen!

## 9.1.11

- Automigration: Improve the viewport/backgrounds automigration - [#32619](https://github.com/storybookjs/storybook/pull/32619), thanks @valentinpalkovic!
- Mocking: Fix `sb.mock` usage in Storybook's deployed in subpaths - [#32678](https://github.com/storybookjs/storybook/pull/32678), thanks @valentinpalkovic!
- NextJS-Vite: Automatically fix bad PostCSS configuration - [#32691](https://github.com/storybookjs/storybook/pull/32691), thanks @ndelangen!
- React Native Web: Fix REACT_NATIVE_AND_RNW should detect vite builder - [#32718](https://github.com/storybookjs/storybook/pull/32718), thanks @dannyhw!
- Telemetry: Add metadata for react routers - [#32615](https://github.com/storybookjs/storybook/pull/32615), thanks @shilman!

## 9.1.10

- Automigrations: Add automigration for viewport and backgrounds - [#31614](https://github.com/storybookjs/storybook/pull/31614), thanks @valentinpalkovic!
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.0.0-beta.13

- CLI: CSF factories codemod - support annotations in npx context - [#32741](https://github.com/storybookjs/storybook/pull/32741), thanks @yannbf!
- Move: Addon jest into it's own repository - [#32646](https://github.com/storybookjs/storybook/pull/32646), thanks @ndelangen!
- Upgrade: Enhance ESM compatibility checks and banner generation - [#32694](https://github.com/storybookjs/storybook/pull/32694), thanks @ndelangen!

## 10.0.0-beta.12

- CLI: Avoid mixed CSF in files with unconventional stories - [#32716](https://github.com/storybookjs/storybook/pull/32716), thanks @yannbf!
Expand Down
49 changes: 26 additions & 23 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
- [From version 9.x to 10.0.0](#from-version-9x-to-1000)
- [Core Changes](#core-changes)
- [Local addons must be fully resolved](#local-addons-must-be-fully-resolved)
- [The `.storybook/main.*`-file must be valid ESM](#the-storybookmain-file-must-be-valid-esm)
- [The `.storybook/main.*` file and other presets must be valid ESM](#the-storybookmain-file-and-other-presets-must-be-valid-esm)
- [Node.js 20.19+ or 22.12+ required](#nodejs-2019-or-2212-required)
- [Require `tsconfig.json` `moduleResolution` set to value that supports `types` condition](#require-tsconfigjson-moduleresolution-set-to-value-that-supports-types-condition)
- [`core.builder` configuration must be a fully resolved path](#corebuilder-configuration-must-be-a-fully-resolved-path)
- [Removed x-only builtin tags](#removed-x-only-builtin-tags)
- [Extensionless imports in JS-based preset files are no longer supported](#extensionless-imports-in-js-based-preset-files-are-no-longer-supported)
- [From version 8.x to 9.0.0](#from-version-8x-to-900)
- [Core Changes and Removals](#core-changes-and-removals)
- [Dropped support for legacy packages](#dropped-support-for-legacy-packages)
Expand Down Expand Up @@ -512,9 +511,9 @@ export default {
};
```

#### The `.storybook/main.*`-file must be valid ESM
#### The `.storybook/main.*` file and other presets must be valid ESM

Storybook will load the `.storybook/main.*` file as an ESM file.
Storybook will load the `.storybook/main.*` file and any custom preset files as ESM files.
Thus CJS constants (`require`, `__dirname`, `__filename`) will not be defined.

You can define these constants yourself, like so:
Expand All @@ -529,7 +528,29 @@ const __dirname = dirname(__filename);
const require = createRequire(import.meta.url);
```

A `main.ts` file that's CJS is no longer supported.
A `main.ts` file that's CJS is no longer supported. The same applies to any custom preset files.

Additionally, **extensionless relative imports are no longer supported** in JavaScript-based configuration files (`.storybook/main.js`) and custom presets. All relative imports must now include explicit file extensions.

**Before (no longer works):**
```js
// .storybook/main.js
import myPreset from './my-file';
```

**After:**
```js
// .storybook/main.js
import myPreset from './my-file.js';
```

This change aligns with Node.js ESM requirements, where relative imports must specify the full file extension. This applies to `.storybook/main.js` and any custom preset files. While TypeScript-based files (`.storybook/main.ts`) will continue to work with extensionless imports for now through automatic resolution, we recommend migrating to explicit extensions for consistency and better compatibility.

**Recommended approach for all files:**
- Use `.js` for JavaScript files
- Use `.mjs` for ES modules
- Use `.ts` for TypeScript files
- Always include the extension in relative imports

#### Node.js 20.19+ or 22.12+ required

Expand Down Expand Up @@ -586,24 +607,6 @@ export const core = {
During development of Storybook [Tags](https://storybook.js.org/docs/writing-stories/tags), we created `dev-only`, `docs-only`, and `test-only` built-in tags. These tags were never documented and superseded by the currently-documented `dev`, `autodocs`, and `test` tags which provide more precise control. The outdated `x-only` tags are removed in 10.0.
During development of Storybook [Tags](https://storybook.js.org/docs/writing-stories/tags), we created `dev-only`, `docs-only`, and `test-only` built-in tags. These tags were never documented and superceded by the currently-documented `dev`, `autodocs`, and `test` tags which provide more precise control. The outdated `x-only` tags are removed in 10.0.

#### Extensionless imports in JS-based preset files are no longer supported

Storybook 10 no longer supports extensionless relative imports in JavaScript-based preset and configuration files (e.g., `.storybook/main.js`). All relative imports must now include explicit file extensions.

**Before (no longer works):**
```js
// .storybook/main.js
import myPreset from './my-file';
```

**After:**
```js
// .storybook/main.js
import myPreset from './my-file.js';
```

This change aligns with Node.js ESM requirements, where relative imports must specify the full file extension. While TypeScript-based files (`.storybook/main.ts`) will continue to work with extensionless imports for now through automatic resolution, we recommend migrating to explicit extensions for consistency and better compatibility.

## From version 8.x to 9.0.0

### Core Changes and Removals
Expand Down
261 changes: 0 additions & 261 deletions code/addons/jest/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions code/addons/jest/build-config.ts

This file was deleted.

Binary file removed code/addons/jest/docs/storybook-addon-jest.gif
Binary file not shown.
1 change: 0 additions & 1 deletion code/addons/jest/manager.js

This file was deleted.

Loading
Loading