Skip to content

Commit 8598d09

Browse files
committed
Merge remote-tracking branch 'GuiAmPm/gui-storybook-9-support' into feat/storybook9
2 parents ce7a735 + 192b2d9 commit 8598d09

60 files changed

Lines changed: 2319 additions & 1017 deletions

Some content is hidden

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

.changeset/shiny-sloths-drum.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@web/storybook-framework-web-components': minor
3+
'@web/storybook-builder': minor
4+
'@web/storybook-utils': minor
5+
---
6+
7+
Migrate projects to Storybook 9

.changeset/smooth-bugs-lay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@web/storybook-addon-mocks': patch
3+
---
4+
5+
Initial commit
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Storybook Builder >> Migration from Storybook 8 to 9
2+
3+
## General migration guide
4+
5+
Storybook 9 introduced changes which consolidated external packages into the main Storybook packages. To avoid compatibility issues, `@web/mocks` won't be migrated and will keep support for Storybook 8, instead, we recommend using `@web/storybook-addons-mocks` which is compatible with Storybook 9.
6+
This is a drop-in replacement, so you can just change the import from `@web/mocks` to `@web/storybook-addons-mocks` and it should work without any issues while on version 9.

docs/docs/storybook-builder/migration-to-storybook-7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Storybook Builder >> Migration to Storybook 7 ||5
1+
# Storybook Builder >> Migration to Storybook 7 ||6
22

33
This guide explains how to migrate from [`@web/dev-server-storybook` plugin](../dev-server/plugins/storybook.md) (that used opinionated Storybook 6 bundle `@web/storybook-prebuilt`) to Storybook 7 and new `@web/storybook-builder`.
44

docs/docs/storybook-builder/migration-to-storybook-8.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Storybook Builder >> Migration from Storybook 7 to 8 ||4
1+
# Storybook Builder >> Migration from Storybook 7 to 8 ||5
22

33
## Update dependencies
44

@@ -11,7 +11,7 @@ You need to:
1111

1212
## General migration guide
1313

14-
Make sure to follow the [Storybook's own migration guide](https://storybook.js.org/docs/migration-guide).
14+
Make sure to follow the [Storybook's own migration guide](https://storybook.js.org/docs/8/migration-guide).
1515
We recommend to read it carefully, even though big part of it is not directly related to `@web/storybook-builder` or `@web/storybook-framework-web-components`, many small details are too easy to miss, so go through it step by step.
1616

1717
## Specific migration notes
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Storybook Builder >> Migration from Storybook 8 to 9 ||5
2+
3+
## Update dependencies
4+
5+
`@web/storybook-builder` for Storybook 9 is released as version `0.3.x` and expects all Storybook packages to be at least `9.1.19`.
6+
7+
You need to:
8+
9+
- update `@web/storybook-builder` and `@web/storybook-framework-web-components` to `^0.3.0`
10+
- update dependencies under the namespace `@storybook/*` and the `storybook` itself to `^9.1.19`
11+
12+
## General migration guide
13+
14+
Make sure to follow the [Storybook's own migration guide](https://storybook.js.org/docs/releases/migration-guide-from-older-version).
15+
We recommend to read it carefully, even though big part of it is not directly related to `@web/storybook-builder` or `@web/storybook-framework-web-components`, many small details are too easy to miss, so go through it step by step.
16+
17+
## Specific migration notes
18+
19+
Apart from Storybook's own migration steps, from the Builder API perspective the `@web/storybook-builder` is considered backwards compatible.
20+
If you use standard Storybook addons and do not use custom WDS/rollup plugins, you shouldn't require any extra changes.
21+
22+
However, if you do use something custom, here is a list of some changes that might cause highly unlikely difficulties:
23+
24+
- Storybook 9 consolidated most packages it uses into the main storybook packages. These migrated packages and instructions are found in the [migration guide](https://storybook.js.org/docs/releases/migration-guide-from-older-version#package-structure-changes).
25+
- CSF 3 is now the default format for stories, but CSF 2 is still supported, so if you have CSF 2 stories, they should work without any changes, but we recommend to migrate them to CSF 3 to get all the benefits of it, e.g. better support for TypeScript and better DX in general.

docs/docs/storybook-builder/overview.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ Then proceed to the [Configuration](./configuration.md).
3131

3232
## Storybook versions
3333

34+
Storybook 9 is supported by:
35+
36+
- `@web/storybook-builder@0.3.x`
37+
- `@web/storybook-framework-web-components@0.3.x`
38+
3439
Storybook 8 is supported by:
3540

3641
- `@web/storybook-builder@0.2.x`

0 commit comments

Comments
 (0)