Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
016f27b
add docs codemod command for scripts directory
yannbf Jan 20, 2025
5459bc7
Update CSF Factories snippets codemod
kylegach Aug 29, 2025
75fbe79
Run docs script for CSF Factories stories codemod
kylegach Aug 29, 2025
b456d7f
Run docs script for CSF Factories config codemod
kylegach Sep 17, 2025
f0bfd9f
Manual snippet updates
kylegach Sep 17, 2025
bfc216b
Fix already-tabbed snippets
kylegach Sep 18, 2025
6860988
CSF: Enhance config-to-csf-factory to support type wrappers
yannbf Sep 24, 2025
27e5be5
Merge branch 'next' into docs-csf-next-snippets
kylegach Sep 24, 2025
074c32d
Run pretty-docs
kylegach Sep 24, 2025
c9cc145
Clean up unnecessary empty lines
kylegach Sep 25, 2025
f0d2a71
Merge branch 'next' into docs-csf-next-snippets
kylegach Sep 25, 2025
bc4185b
Merge branch 'next' into yann/csf-factories-codemod-more-ts-support
yannbf Oct 1, 2025
2fcd2be
Automigration: Added support for transforming `defaultOrientation` an…
valentinpalkovic Oct 2, 2025
c4057f6
Automigration: Enhance viewport story transformation to support membe…
valentinpalkovic Oct 2, 2025
1071349
Merge branch 'next' into docs-csf-next-snippets
kylegach Oct 3, 2025
2634f23
Address feedback
kylegach Oct 6, 2025
9503508
add extensions to extensionless relative imports when loading ts presets
JReinhold Oct 6, 2025
c0224d3
improve copilot instructions about testing, linting and logging
JReinhold Oct 6, 2025
522d5f1
add migration note
JReinhold Oct 6, 2025
6047b63
simplify warnings
JReinhold Oct 6, 2025
1b74b96
Merge branch 'next' into jeppe/support-extensionless-imports
JReinhold Oct 6, 2025
6865915
test multi-line imports
JReinhold Oct 6, 2025
cf66625
Merge branch 'jeppe/support-extensionless-imports' of github.com:stor…
JReinhold Oct 6, 2025
21e0bcd
add support for more dynamic paths
JReinhold Oct 6, 2025
67c6093
Merge branch 'next' into docs-csf-next-snippets
kylegach Oct 6, 2025
7e6a516
Update new snippets
kylegach Oct 6, 2025
f5e412b
Ensure valid QR code URL
ghengeveld Oct 7, 2025
d405672
change qrcode text in prod
yannbf Oct 7, 2025
4bf26dc
fix story
yannbf Oct 7, 2025
b7753dc
Customize text for production mode
ghengeveld Oct 7, 2025
03ecabb
Docs: Add experimental test syntax to main config features page
jonniebigodes Oct 7, 2025
07c583c
Merge branch 'next' into docs_main_config_features_add_experimentalte…
jonniebigodes Oct 7, 2025
bef844b
Updates from review
kylegach Oct 7, 2025
331177b
Merge pull request #32664 from storybookjs/docs_main_config_features_…
jonniebigodes Oct 7, 2025
5fe89f8
Merge branch 'next' into docs-csf-next-snippets
kylegach Oct 7, 2025
9663fad
Fix typo
kylegach Oct 7, 2025
3614922
fix story test
yannbf Oct 8, 2025
6cdbfff
Merge branch 'next-release' into next
storybook-bot Oct 8, 2025
e9c3bf8
Merge branch 'next' into valentin/improve-viewport-background-automig…
valentinpalkovic Oct 8, 2025
e85e68a
Automigration: Implement transformations for backgrounds parameters a…
valentinpalkovic Oct 2, 2025
e679e44
Merge pull request #32661 from storybookjs/fix-qr-url
yannbf Oct 8, 2025
c56a9aa
Refactor addon-globals-api tests and migration logic to utilize print…
valentinpalkovic Oct 8, 2025
f740d75
Fix test for Windows
valentinpalkovic Oct 8, 2025
7a4ae9e
Merge branch 'next' into valentin/improve-viewport-background-automig…
valentinpalkovic Oct 8, 2025
b44deb9
Update PR template to correct canary release workflow link
valentinpalkovic Oct 8, 2025
9828217
Merge pull request #32675 from storybookjs/valentin/update-pull-reque…
valentinpalkovic Oct 8, 2025
265c76c
Address feedback
kylegach Oct 8, 2025
df6444c
Merge branch 'next' into docs-csf-next-snippets
kylegach Oct 8, 2025
bda76dc
Mocking: Fix sb.mock usage in Storybook's deployed in subpaths
valentinpalkovic Oct 9, 2025
039c333
Fix: Adjust fileName slicing in viteInjectMockerRuntime for correct p…
valentinpalkovic Oct 9, 2025
029c938
Merge branch 'next' into jeppe/support-extensionless-imports
JReinhold Oct 9, 2025
206a686
Mocking: Fix sb.mock usage in Storybook's deployed in subpaths
valentinpalkovic Oct 9, 2025
25af7cd
Merge pull request #32678 from storybookjs/valentin/fix-sb-mock-on-su…
valentinpalkovic Oct 9, 2025
a47e297
Merge pull request #32619 from storybookjs/valentin/improve-viewport-…
valentinpalkovic Oct 9, 2025
0a4b5af
Merge pull request #32357 from storybookjs/docs-csf-next-snippets
kylegach Oct 9, 2025
6f3f65f
fix loader tests for Windows paths
JReinhold Oct 10, 2025
1cafff7
Enhance PostCSS configuration handling
ndelangen Oct 10, 2025
0dc191c
replace the incorrect postcss config file syntax with the correct one
ndelangen Oct 10, 2025
d86e68a
Update PostCSS configuration handling and add YAML dependency
ndelangen Oct 10, 2025
4ad2494
Merge branch 'next' into norbert/postcss-config-modification
ndelangen Oct 10, 2025
c874228
Refactor PostCSS config loader by removing YAML support
ndelangen Oct 10, 2025
857bfc4
Remove YAML dependency from Next.js Vite package configuration and up…
ndelangen Oct 10, 2025
e9a2317
Merge pull request #32691 from storybookjs/norbert/postcss-config-mod…
ndelangen Oct 10, 2025
5a3dbff
Merge pull request #32641 from storybookjs/jeppe/support-extensionles…
JReinhold Oct 13, 2025
e6663f2
Merge pull request #32543 from storybookjs/yann/csf-factories-codemod…
valentinpalkovic Oct 13, 2025
19d61e2
React Native Web: Fix REACT_NATIVE_AND_RNW should detect vite builder
dannyhw Oct 13, 2025
a78bf07
Merge pull request #32718 from dannyhw/dannyhw/fix/rnw_and_rn_is_vite…
shilman Oct 13, 2025
ec66cb6
Nextjs: Fix Nextjs version detection with prereleases
yannbf Oct 14, 2025
29cf838
Merge pull request #32724 from storybookjs/yann/fix-nextjs-v16-detection
yannbf Oct 14, 2025
d10e24f
Write changelog for 10.0.0-beta.11 [skip ci]
storybook-bot Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ _This section is mandatory for all contributions. If you believe no manual test

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the `@storybookjs/core` team here.

_core team members can create a canary release [here](https://github.com/storybookjs/storybook/actions/workflows/canary-release-pr.yml) or locally with `gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>`_
_core team members can create a canary release [here](https://github.com/storybookjs/storybook/actions/workflows/publish.yml) or locally with `gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>`_

<!-- CANARY_RELEASE_SECTION -->

Expand Down
43 changes: 42 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,47 @@ cd code && yarn storybook:vitest
- TypeScript strict mode is enabled
- Follow existing patterns in the codebase

### Code Quality Checks
After making file changes, always run both formatting and linting checks:
1. **Prettier**: Format code with `yarn prettier --write <file>`
2. **ESLint**: Check for linting issues with `yarn lint:js:cmd <file>`
- The full eslint command is: `cross-env NODE_ENV=production eslint --cache --cache-location=../.cache/eslint --ext .js,.jsx,.json,.html,.ts,.tsx,.mjs --report-unused-disable-directives`
- Use the `lint:js:cmd` script for convenience
- Fix any errors or warnings before committing

### Testing Guidelines
When writing unit tests:
1. **Export functions for testing**: If functions need to be tested, export them from the module
2. **Write meaningful tests**: Tests should actually import and call the functions being tested, not just verify syntax patterns
3. **Use coverage reports**: Run tests with coverage to identify untested code
- Run coverage: `yarn vitest run --coverage <test-file>`
- Aim for high coverage of business logic (75%+ for statements/lines)
- Use coverage reports to identify missing test cases
- Focus on covering:
- All branches and conditions
- Edge cases and error paths
- Different input variations
4. **Mock external dependencies**: Use `vi.mock()` to mock file system, loggers, and other external dependencies
5. **Run tests before committing**: Ensure all tests pass with `yarn test` or `yarn vitest run`

### Logging
When adding logging to code, always use the appropriate logger:
- **Server-side code** (Node.js): Use `logger` from `storybook/internal/node-logger`
```typescript
import { logger } from 'storybook/internal/node-logger';
logger.info('Server message');
logger.warn('Warning message');
logger.error('Error message');
```
- **Client-side code** (browser): Use `logger` from `storybook/internal/client-logger`
```typescript
import { logger } from 'storybook/internal/client-logger';
logger.info('Client message');
logger.warn('Warning message');
logger.error('Error message');
```
- **DO NOT** use `console.log`, `console.warn`, or `console.error` directly unless in isolated files where importing loggers would significantly increase bundle size

### Git Workflow
- Work on feature branches
- Ensure all builds and tests pass before submitting PRs
Expand All @@ -320,4 +361,4 @@ cd code && yarn storybook:vitest
- Include code examples in addon/framework documentation
- Update migration guides for breaking changes

This document should be updated as the repository evolves and new build requirements or limitations are discovered.
This document should be updated as the repository evolves and new build requirements or limitations are discovered.
11 changes: 11 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 10.0.0-beta.11

- Automigration: Improve the viewport/backgrounds automigration - [#32619](https://github.com/storybookjs/storybook/pull/32619), thanks @valentinpalkovic!
- CSF: Enhance config-to-csf-factory to support type wrappers - [#32543](https://github.com/storybookjs/storybook/pull/32543), thanks @yannbf!
- Core: Ensure valid QR code URL - [#32661](https://github.com/storybookjs/storybook/pull/32661), thanks @ghengeveld!
- 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!
- Nextjs: Fix Nextjs version detection with prereleases - [#32724](https://github.com/storybookjs/storybook/pull/32724), thanks @yannbf!
- Presets: Support extensionless imports in TS-based presets - [#32641](https://github.com/storybookjs/storybook/pull/32641), thanks @JReinhold!
- React Native Web: Fix REACT_NATIVE_AND_RNW should detect vite builder - [#32718](https://github.com/storybookjs/storybook/pull/32718), thanks @dannyhw!

## 10.0.0-beta.10

- Core: Make `subtype` an optional property on an index input - [#32602](https://github.com/storybookjs/storybook/pull/32602), thanks @JReinhold!
Expand Down
19 changes: 19 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [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 @@ -585,6 +586,24 @@ 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
Loading