From 4a41cf65a9567421a5b5a26e686b5b4d36a00e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Maisse?= Date: Tue, 25 May 2021 07:22:07 +0200 Subject: [PATCH 1/2] docs: add a section about Lit support in 6.2 -> 6.3 migration guide --- MIGRATION.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MIGRATION.md b/MIGRATION.md index 4a1ce1edd008..ef9ba80554c6 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -3,6 +3,7 @@ - [From version 6.2.x to 6.3.0](#from-version-62x-to-630) - [Webpack 5 manager build](#webpack-5-manager-build) - [Angular 12 upgrade](#angular-12-upgrade) + - [Lit support](#lit-support) - [6.3 deprecations](#63-deprecations) - [Deprecated scoped blocks imports](#deprecated-scoped-blocks-imports) - [Deprecated `argType.defaultValue`](#deprecated-argtypedefaultvalue) @@ -189,6 +190,14 @@ module.exports = { }; ``` +### Lit support + +Storybook 6.3 introduces Lit 2 support in a non-breaking way to ease migration from `lit-html`/`lit-element` to `lit`. + +To do so, it relies on helpers added in the latest minor versions of `lit-html`/`lit-element`. So when upgrading to Storybook 6.3, please ensure your project is using `lit-html` 1.4.x or `lit-element` 2.5.x. + +According to the package manager you are using, it can be handled automatically when updating Storybook or can require to manually update the versions and regenerate the lockfile. + ### 6.3 deprecations #### Deprecated scoped blocks imports From 13069256cf92957a94a128b1a3080012eb8ddf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Maisse?= Date: Tue, 25 May 2021 07:31:17 +0200 Subject: [PATCH 2/2] docs: fix code snippet types and make npm/yarn snippet consistent --- MIGRATION.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index ef9ba80554c6..abdd21af5267 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -168,16 +168,20 @@ Storybook 6.2 introduced **experimental** webpack5 support for building user com If you're upgrading from 6.2 and already using the experimental webpack5 feature, this might be a breaking change (hence the 'experimental' label) and you should try adding the manager builder: -``` +```shell yarn add @storybook/manager-webpack5 --dev +# Or +npm install @storybook/manager-webpack5 --save-dev ``` ### Angular 12 upgrade Storybook 6.3 supports Angular 12 out of the box when you install it fresh. However, if you're upgrading your project from a previous version, you'll need to do the following steps to force Storybook to use webpack 5 for building your project: -```js -npm install @storybook/builder-webpack5 --save-dev # or yarn +```shell +yarn add @storybook/builder-webpack5 --dev +# Or +npm install @storybook/builder-webpack5 --save-dev ``` Then edit your `.storybook/main.js` config: