Skip to content

Commit b4b4f33

Browse files
authored
Merge pull request #28221 from storybookjs/version-patch-from-8.1.7
Release: Patch 8.1.8
2 parents cc49ca8 + b5c83c7 commit b4b4f33

File tree

8 files changed

+89
-26
lines changed

8 files changed

+89
-26
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 8.1.8
2+
3+
- Automigrations: Make VTA "learn more" link clickable - [#28020](https://github.com/storybookjs/storybook/pull/28020), thanks @deiga!
4+
- CLI: Fix `init --skip-install` - [#28226](https://github.com/storybookjs/storybook/pull/28226), thanks @shilman!
5+
16
## 8.1.7
27

38
- Addon-actions: Only log spies with names - [#28091](https://github.com/storybookjs/storybook/pull/28091), thanks @kasperpeulen!

MIGRATION.md

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [Manager addons are now rendered with React 18](#manager-addons-are-now-rendered-with-react-18)
1818
- [Removal of `storiesOf`-API](#removal-of-storiesof-api)
1919
- [Removed deprecated shim packages](#removed-deprecated-shim-packages)
20+
- [Deprecated `@storybook/testing-library` package](#deprecated-storybooktesting-library-package)
2021
- [Framework-specific Vite plugins have to be explicitly added](#framework-specific-vite-plugins-have-to-be-explicitly-added)
2122
- [For React:](#for-react)
2223
- [For Vue:](#for-vue)
@@ -97,17 +98,17 @@
9798
- [Tab addons cannot manually route, Tool addons can filter their visibility via tabId](#tab-addons-cannot-manually-route-tool-addons-can-filter-their-visibility-via-tabid)
9899
- [Removed `config` preset](#removed-config-preset-1)
99100
- [From version 7.5.0 to 7.6.0](#from-version-750-to-760)
100-
- [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated)
101-
- [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated)
102-
- [typescript.skipBabel deprecated](#typescriptskipbabel-deprecated)
103-
- [Primary doc block accepts of prop](#primary-doc-block-accepts-of-prop)
104-
- [Addons no longer need a peer dependency on React](#addons-no-longer-need-a-peer-dependency-on-react)
101+
- [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated)
102+
- [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated)
103+
- [typescript.skipBabel deprecated](#typescriptskipbabel-deprecated)
104+
- [Primary doc block accepts of prop](#primary-doc-block-accepts-of-prop)
105+
- [Addons no longer need a peer dependency on React](#addons-no-longer-need-a-peer-dependency-on-react)
105106
- [From version 7.4.0 to 7.5.0](#from-version-740-to-750)
106-
- [`storyStoreV6` and `storiesOf` is deprecated](#storystorev6-and-storiesof-is-deprecated)
107-
- [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers)
107+
- [`storyStoreV6` and `storiesOf` is deprecated](#storystorev6-and-storiesof-is-deprecated)
108+
- [`storyIndexers` is replaced with `experimental_indexers`](#storyindexers-is-replaced-with-experimental_indexers)
108109
- [From version 7.0.0 to 7.2.0](#from-version-700-to-720)
109-
- [Addon API is more type-strict](#addon-api-is-more-type-strict)
110-
- [Addon-controls hideNoControlsWarning parameter is deprecated](#addon-controls-hidenocontrolswarning-parameter-is-deprecated)
110+
- [Addon API is more type-strict](#addon-api-is-more-type-strict)
111+
- [Addon-controls hideNoControlsWarning parameter is deprecated](#addon-controls-hidenocontrolswarning-parameter-is-deprecated)
111112
- [From version 6.5.x to 7.0.0](#from-version-65x-to-700)
112113
- [7.0 breaking changes](#70-breaking-changes)
113114
- [Dropped support for Node 15 and below](#dropped-support-for-node-15-and-below)
@@ -133,7 +134,7 @@
133134
- [Deploying build artifacts](#deploying-build-artifacts)
134135
- [Dropped support for file URLs](#dropped-support-for-file-urls)
135136
- [Serving with nginx](#serving-with-nginx)
136-
- [Ignore story files from node\_modules](#ignore-story-files-from-node_modules)
137+
- [Ignore story files from node_modules](#ignore-story-files-from-node_modules)
137138
- [7.0 Core changes](#70-core-changes)
138139
- [7.0 feature flags removed](#70-feature-flags-removed)
139140
- [Story context is prepared before for supporting fine grained updates](#story-context-is-prepared-before-for-supporting-fine-grained-updates)
@@ -147,7 +148,7 @@
147148
- [Addon-interactions: Interactions debugger is now default](#addon-interactions-interactions-debugger-is-now-default)
148149
- [7.0 Vite changes](#70-vite-changes)
149150
- [Vite builder uses Vite config automatically](#vite-builder-uses-vite-config-automatically)
150-
- [Vite cache moved to node\_modules/.cache/.vite-storybook](#vite-cache-moved-to-node_modulescachevite-storybook)
151+
- [Vite cache moved to node_modules/.cache/.vite-storybook](#vite-cache-moved-to-node_modulescachevite-storybook)
151152
- [7.0 Webpack changes](#70-webpack-changes)
152153
- [Webpack4 support discontinued](#webpack4-support-discontinued)
153154
- [Babel mode v7 exclusively](#babel-mode-v7-exclusively)
@@ -197,7 +198,7 @@
197198
- [Dropped addon-docs manual babel configuration](#dropped-addon-docs-manual-babel-configuration)
198199
- [Dropped addon-docs manual configuration](#dropped-addon-docs-manual-configuration)
199200
- [Autoplay in docs](#autoplay-in-docs)
200-
- [Removed STORYBOOK\_REACT\_CLASSES global](#removed-storybook_react_classes-global)
201+
- [Removed STORYBOOK_REACT_CLASSES global](#removed-storybook_react_classes-global)
201202
- [7.0 Deprecations and default changes](#70-deprecations-and-default-changes)
202203
- [storyStoreV7 enabled by default](#storystorev7-enabled-by-default)
203204
- [`Story` type deprecated](#story-type-deprecated)
@@ -439,6 +440,7 @@ The `docs.autodocs` setting in `main.js` is deprecated in 8.1 and will be remove
439440
It has been replaced with a tags-based system which is more flexible than before.
440441

441442
`docs.autodocs` takes three values:
443+
442444
- `true`: generate autodocs for every component
443445
- `false`: don't generate autodocs at all
444446
- `tag`: generate autodocs for components that have been tagged `'autodocs'`.
@@ -448,8 +450,8 @@ Starting in 8.1, to generate autodocs for every component (`docs.autodocs = true
448450
```js
449451
// .storybook/preview.js
450452
export default {
451-
tags: ['autodocs'],
452-
}
453+
tags: ["autodocs"],
454+
};
453455
```
454456

455457
Tags cascade, so setting `'autodocs'` at the project level automatically propagates to every component and story. If you set autodocs globally and want to opt-out for a particular component, you can remove the `'autodocs'` tag for a component like this:
@@ -458,8 +460,8 @@ Tags cascade, so setting `'autodocs'` at the project level automatically propaga
458460
// Button.stories.ts
459461
export default {
460462
component: Button,
461-
tags: ['!autodocs'],
462-
}
463+
tags: ["!autodocs"],
464+
};
463465
```
464466

465467
If you had set `docs.autodocs = 'tag'`, the default setting, you can remove the setting from `.storybook/main.js`. That is now the default behavior.
@@ -602,6 +604,19 @@ These sections explain the rationale, and the required changes you might have to
602604
- [New Addons API](#new-addons-api)
603605
- [`addons.setConfig` should now be imported from `@storybook/manager-api`.](#addonssetconfig-should-now-be-imported-from-storybookmanager-api)
604606

607+
### Deprecated `@storybook/testing-library` package
608+
609+
In Storybook 8, `@storybook/testing-library` has been integrated to a new package called `@storybook/test`, which uses Vitest APIs for an improved experience. When upgrading to Storybook 8 with 'npx storybook@latest upgrade', you will get prompted and will get an automigration for the new package. Please migrate when you can.
610+
611+
To migrate by hand, install `@storybook/test` and replace `@storybook/testing-libary` imports globally:
612+
613+
```ts
614+
- import { userEvent } from '@storybook/testing-library';
615+
+ import { userEvent } from '@storybook/test';
616+
```
617+
618+
For more information on the change, see the [announcement post](https://storybook.js.org/blog/storybook-test/).
619+
605620
### Framework-specific Vite plugins have to be explicitly added
606621

607622
In Storybook 7, we would automatically add frameworks-specific Vite plugins, e.g. `@vitejs/plugin-react` if not installed.

code/lib/cli/src/automigrate/fixes/vta.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const vta: Fix<Options> = {
3232
return dedent`
3333
New to Storybook 8: Storybook's Visual Tests addon helps you catch unintentional changes/bugs in your stories. The addon is powered by Chromatic, a cloud-based testing tool developed by Storybook's core team.
3434
35-
Learn more: ${chalk.yellow('storybook.js.org/docs/writing-tests/visual-testing')}
35+
Learn more: ${chalk.yellow('https://storybook.js.org/docs/writing-tests/visual-testing')}
3636
3737
Install Visual Tests addon in your project?
3838
`;

code/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,5 +299,6 @@
299299
"Dependency Upgrades"
300300
]
301301
]
302-
}
302+
},
303+
"deferredNextVersion": "8.1.8"
303304
}

docs/migration-guide/from-older-version.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ Storybook 8 focuses on improving performance, compatibility, and stability. Key
77
- 🩻 A new visual testing workflow via [the Visual Tests addon](https://www.chromatic.com/docs/visual-tests-addon/)
88
- 💨 [2-4x faster test builds](https://storybook.js.org/blog/optimize-storybook-7-6/#2-4x-faster-builds-with-thetest-flag), [25-50% faster React docgen](https://storybook.js.org/blog/optimize-storybook-7-6/#22x-faster-react-docgen), and [SWC support for Webpack projects](https://storybook.js.org/blog/optimize-storybook-7-6/#using-webpack-enable-swc)
99
- 🧩 Improved framework support: you no longer need to install React as a peer dependency when using a non-React renderer
10-
- 🎛️ Strengthened control generation in [React](https://storybook.js.org/blog/storybook-8-beta/#major-performance-improvements
11-
) and [Vue](https://storybook.js.org/blog/first-class-vue-support-storybook-8/) projects
12-
- ⚡️ Improved Vite architecture, Vitest testing, and Vite 5 support
10+
- 🎛️ Strengthened control generation in [React](https://storybook.js.org/blog/storybook-8-beta/#major-performance-improvements) and [Vue](https://storybook.js.org/blog/first-class-vue-support-storybook-8/) projects
11+
- ⚡️ Improved Vite architecture, Vitest testing, and Vite 5 support
1312
- 🌐 [Support for React Server Components (RSC)](https://storybook.js.org/blog/storybook-react-server-components/): our experimental solution renders async RSC in the browser and mocks Node code
1413
- ✨ A refreshed desktop UI & mobile UX
1514
- ➕ Much, much more
@@ -24,6 +23,7 @@ The rest of this guide will help you upgrade successfully, either automatically
2423
- [Start and build CLI binaries removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-storybook--build-storybook-binaries-removed)
2524
- [`storiesOf` API has been removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removal-of-storiesof-api)
2625
- [`*.stories.mdx` format has been removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropping-support-for-storiesmdx-csf-in-mdx-format-and-mdx1-support)
26+
- [Packages have been consolidated/removed](#package-structure-changes)
2727
- [Implicit actions (from `argTypesRegex`) can no longer be used during rendering (e.g. in a play function)](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#implicit-actions-can-not-be-used-during-rendering-for-example-in-the-play-function)
2828
- [`react-docgen` (instead of `react-docgen-typescript`) is the default for component analysis](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-docgen-component-analysis-by-default)
2929
- [Storyshots has been removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#storyshots-has-been-removed)
@@ -88,6 +88,27 @@ Storybook 8 uses MDX 3. If you're coming from MDX 1 (used by Storybook 6), there
8888

8989
If you are using Vite, you may now need to create a `vite.config.js` file in your project root to allow newer versions of Vite to work with Storybook. Additionally, you may need to install and configure a Vite plugin for your framework. More information is available in the [full migration notes](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-specific-vite-plugins-have-to-be-explicitly-added).
9090

91+
## Package structure changes
92+
93+
The following packages are **removed**. See the [full migration notes](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removed-deprecated-shim-packages) for details.
94+
95+
| Removal | Replacement |
96+
| -------------------------------- | ----------------------------------------------------- |
97+
| `@storybook/addons` | `@storybook/manager-api` or `@storyboook/preview-api` |
98+
| `@storybook/channel-postmessage` | `@storybook/channels` |
99+
| `@storybook/channel-websocket` | `@storybook/channels` |
100+
| `@storybook/client-api` | `@storybook/preview-api` |
101+
| `@storybook/core-client` | `@storybook/preview-api` |
102+
| `@storybook/preview-web` | `@storybook/preview-api` |
103+
| `@storybook/store` | `@storybook/preview-api` |
104+
| `@storybook/api` | `@storybook/manager-api` |
105+
106+
The following packages are **deprecated**. See the [full migration notes](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-storybooktesting-library-package) for details.
107+
108+
| Deprecation | Replacement |
109+
| ---------------------------- | ----------------- |
110+
| `@storybook/testing-library` | `@storybook/test` |
111+
91112
## Troubleshooting
92113

93114
The automatic upgrade should get your Storybook into a working state. If you encounter an error running Storybook after upgrading, here’s what to do:

docs/migration-guide/index.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ Storybook 8 focuses on improving performance, compatibility, and stability. Key
77
- 🩻 A new visual testing workflow via [the Visual Tests addon](https://www.chromatic.com/docs/visual-tests-addon/)
88
- 💨 [2-4x faster test builds](https://storybook.js.org/blog/optimize-storybook-7-6/#2-4x-faster-builds-with-thetest-flag), [25-50% faster React docgen](https://storybook.js.org/blog/optimize-storybook-7-6/#22x-faster-react-docgen), and [SWC support for Webpack projects](https://storybook.js.org/blog/optimize-storybook-7-6/#using-webpack-enable-swc)
99
- 🧩 Improved framework support: you no longer need to install React as a peer dependency when using a non-React renderer
10-
- 🎛️ Strengthened control generation in [React](https://storybook.js.org/blog/storybook-8-beta/#major-performance-improvements
11-
) and [Vue](https://storybook.js.org/blog/first-class-vue-support-storybook-8/) projects
12-
- ⚡️ Improved Vite architecture, Vitest testing, and Vite 5 support
10+
- 🎛️ Strengthened control generation in [React](https://storybook.js.org/blog/storybook-8-beta/#major-performance-improvements) and [Vue](https://storybook.js.org/blog/first-class-vue-support-storybook-8/) projects
11+
- ⚡️ Improved Vite architecture, Vitest testing, and Vite 5 support
1312
- 🌐 [Support for React Server Components (RSC)](https://storybook.js.org/blog/storybook-react-server-components/): our experimental solution renders async RSC in the browser and mocks Node code
1413
- ✨ A refreshed desktop UI & mobile UX
1514
- ➕ Much, much more
@@ -30,6 +29,7 @@ The rest of this guide will help you upgrade successfully, either automatically
3029

3130
- [`storiesOf` API has been removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removal-of-storiesof-api)
3231
- [`*.stories.mdx` format has been removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropping-support-for-storiesmdx-csf-in-mdx-format-and-mdx1-support)
32+
- [Packages have been consolidated/removed](#package-structure-changes)
3333
- [Implicit actions (from `argTypesRegex`) can no longer be used during rendering (e.g. in a play function)](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#implicit-actions-can-not-be-used-during-rendering-for-example-in-the-play-function)
3434
- [`react-docgen` (instead of `react-docgen-typescript`) is the default for component analysis](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-docgen-component-analysis-by-default)
3535
- [Storyshots has been removed](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#storyshots-has-been-removed)
@@ -152,6 +152,27 @@ If you prefer to debug yourself, here are a few useful things you can do to help
152152
1. Try removing all addons that are not in the `@storybook` npm namespace (make sure you don't remove the `storybook` package). Community addons that work well with 7.x might not yet be compatible with 8.0, and this is the fastest way to isolate that possibility. If you find an addon that needs to be upgraded to work with Storybook 8, please post an issue on the addon’s repository, or better yet, a pull request to upgrade it!
153153
2. Another debugging technique is to bisect to older prerelease versions of Storybook to figure out which release broke your Storybook. For example, assuming that the current prerelease of Storybook is `8.0.0-beta.56`, you could set the version to `8.0.0-alpha.0` in your `package.json` and reinstall to verify that it still works (`alpha.0` should be nearly identical to `7.6.x`). If it works, you could then try `8.0.0-beta.0`, then `8.0.0-beta.28` and so forth. Once you’ve isolated the bad release, read through its [CHANGELOG](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) entry and perhaps there’s a change that jumps out as the culprit. If you find the problem, please submit an issue or pull request to the Storybook monorepo and we’ll do our best to take care of it quickly.
154154

155+
## Package structure changes
156+
157+
The following packages are **removed**. See the [full migration notes](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removed-deprecated-shim-packages) for details.
158+
159+
| Removal | Replacement |
160+
| -------------------------------- | ----------------------------------------------------- |
161+
| `@storybook/addons` | `@storybook/manager-api` or `@storyboook/preview-api` |
162+
| `@storybook/channel-postmessage` | `@storybook/channels` |
163+
| `@storybook/channel-websocket` | `@storybook/channels` |
164+
| `@storybook/client-api` | `@storybook/preview-api` |
165+
| `@storybook/core-client` | `@storybook/preview-api` |
166+
| `@storybook/preview-web` | `@storybook/preview-api` |
167+
| `@storybook/store` | `@storybook/preview-api` |
168+
| `@storybook/api` | `@storybook/manager-api` |
169+
170+
The following packages are **deprecated**. See the [full migration notes](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-storybooktesting-library-package) for details.
171+
172+
| Deprecation | Replacement |
173+
| ---------------------------- | ----------------- |
174+
| `@storybook/testing-library` | `@storybook/test` |
175+
155176
## Optional migrations
156177

157178
In addition to the automigrations and manual migrations above, there are also optional migrations that you should consider. These are features that we’ve deprecated in Storybook 8 (but remain backwards compatible), or best practices that should help you be more productive in the future.

docs/versions/latest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"8.1.7","info":{"plain":"- Addon-actions: Only log spies with names - [#28091](https://github.com/storybookjs/storybook/pull/28091), thanks @kasperpeulen!\n- CLI: Fix typo in React Docgen migration - [#27536](https://github.com/storybookjs/storybook/pull/27536), thanks @jonniebigodes!\n- Portable Stories: Add tags to composed story - [#27708](https://github.com/storybookjs/storybook/pull/27708), thanks @yannbf!\n- Test: Display toHaveBeenCalledWith expected / received values on failure - [#28088](https://github.com/storybookjs/storybook/pull/28088), thanks @kasperpeulen!"}}
1+
{"version":"8.1.8","info":{"plain":"- Automigrations: Make VTA \\\"learn more\\\" link clickable - [#28020](https://github.com/storybookjs/storybook/pull/28020), thanks @deiga!\n- CLI: Fix `init --skip-install` - [#28226](https://github.com/storybookjs/storybook/pull/28226), thanks @shilman!"}}

0 commit comments

Comments
 (0)