Skip to content

Commit 889dbf7

Browse files
authored
Merge pull request #32734 from storybookjs/version-non-patch-from-10.0.0-beta.12
Release: Prerelease 10.0.0-beta.13
2 parents da26393 + ea560e1 commit 889dbf7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+672
-1269
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 9.1.12
2+
3+
- Maintenance: Hotfix for missing nextjs dts files, thanks @ndelangen!
4+
5+
## 9.1.11
6+
7+
- Automigration: Improve the viewport/backgrounds automigration - [#32619](https://github.com/storybookjs/storybook/pull/32619), thanks @valentinpalkovic!
8+
- Mocking: Fix `sb.mock` usage in Storybook's deployed in subpaths - [#32678](https://github.com/storybookjs/storybook/pull/32678), thanks @valentinpalkovic!
9+
- NextJS-Vite: Automatically fix bad PostCSS configuration - [#32691](https://github.com/storybookjs/storybook/pull/32691), thanks @ndelangen!
10+
- React Native Web: Fix REACT_NATIVE_AND_RNW should detect vite builder - [#32718](https://github.com/storybookjs/storybook/pull/32718), thanks @dannyhw!
11+
- Telemetry: Add metadata for react routers - [#32615](https://github.com/storybookjs/storybook/pull/32615), thanks @shilman!
12+
113
## 9.1.10
214

315
- Automigrations: Add automigration for viewport and backgrounds - [#31614](https://github.com/storybookjs/storybook/pull/31614), thanks @valentinpalkovic!

CHANGELOG.prerelease.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 10.0.0-beta.13
2+
3+
- CLI: CSF factories codemod - support annotations in npx context - [#32741](https://github.com/storybookjs/storybook/pull/32741), thanks @yannbf!
4+
- Move: Addon jest into it's own repository - [#32646](https://github.com/storybookjs/storybook/pull/32646), thanks @ndelangen!
5+
- Upgrade: Enhance ESM compatibility checks and banner generation - [#32694](https://github.com/storybookjs/storybook/pull/32694), thanks @ndelangen!
6+
17
## 10.0.0-beta.12
28

39
- CLI: Avoid mixed CSF in files with unconventional stories - [#32716](https://github.com/storybookjs/storybook/pull/32716), thanks @yannbf!

MIGRATION.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
- [From version 9.x to 10.0.0](#from-version-9x-to-1000)
44
- [Core Changes](#core-changes)
55
- [Local addons must be fully resolved](#local-addons-must-be-fully-resolved)
6-
- [The `.storybook/main.*`-file must be valid ESM](#the-storybookmain-file-must-be-valid-esm)
6+
- [The `.storybook/main.*` file and other presets must be valid ESM](#the-storybookmain-file-and-other-presets-must-be-valid-esm)
77
- [Node.js 20.19+ or 22.12+ required](#nodejs-2019-or-2212-required)
88
- [Require `tsconfig.json` `moduleResolution` set to value that supports `types` condition](#require-tsconfigjson-moduleresolution-set-to-value-that-supports-types-condition)
99
- [`core.builder` configuration must be a fully resolved path](#corebuilder-configuration-must-be-a-fully-resolved-path)
1010
- [Removed x-only builtin tags](#removed-x-only-builtin-tags)
11-
- [Extensionless imports in JS-based preset files are no longer supported](#extensionless-imports-in-js-based-preset-files-are-no-longer-supported)
1211
- [From version 8.x to 9.0.0](#from-version-8x-to-900)
1312
- [Core Changes and Removals](#core-changes-and-removals)
1413
- [Dropped support for legacy packages](#dropped-support-for-legacy-packages)
@@ -512,9 +511,9 @@ export default {
512511
};
513512
```
514513

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

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

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

532-
A `main.ts` file that's CJS is no longer supported.
531+
A `main.ts` file that's CJS is no longer supported. The same applies to any custom preset files.
532+
533+
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.
534+
535+
**Before (no longer works):**
536+
```js
537+
// .storybook/main.js
538+
import myPreset from './my-file';
539+
```
540+
541+
**After:**
542+
```js
543+
// .storybook/main.js
544+
import myPreset from './my-file.js';
545+
```
546+
547+
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.
548+
549+
**Recommended approach for all files:**
550+
- Use `.js` for JavaScript files
551+
- Use `.mjs` for ES modules
552+
- Use `.ts` for TypeScript files
553+
- Always include the extension in relative imports
533554

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

@@ -586,24 +607,6 @@ export const core = {
586607
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.
587608
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.
588609

589-
#### Extensionless imports in JS-based preset files are no longer supported
590-
591-
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.
592-
593-
**Before (no longer works):**
594-
```js
595-
// .storybook/main.js
596-
import myPreset from './my-file';
597-
```
598-
599-
**After:**
600-
```js
601-
// .storybook/main.js
602-
import myPreset from './my-file.js';
603-
```
604-
605-
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.
606-
607610
## From version 8.x to 9.0.0
608611

609612
### Core Changes and Removals

code/addons/jest/README.md

Lines changed: 0 additions & 261 deletions
This file was deleted.

code/addons/jest/build-config.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.
-644 KB
Binary file not shown.

code/addons/jest/manager.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)