From e4668c38ebf1d2876c14f8df506f2552305e366c Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Tue, 14 May 2024 13:55:39 +0000 Subject: [PATCH 01/24] Update ./docs/versions/next.json for v8.2.0-alpha.0 --- docs/versions/next.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/versions/next.json b/docs/versions/next.json index 26523a287829..45f2ea7f3c4c 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1,6 @@ -{"version":"8.2.0-alpha.6","info":{"plain":"- Addon-actions: Only log spies with names - [#28091](https://github.com/storybookjs/storybook/pull/28091), thanks @kasperpeulen!\n- Build: Change require/import order, so that import has higher prio if both are specified - [#27730](https://github.com/storybookjs/storybook/pull/27730), thanks @kasperpeulen!\n- CLI: Only log the UpgradeStorybookToSameVersionError but continue the upgrade as normal - [#27217](https://github.com/storybookjs/storybook/pull/27217), thanks @kasperpeulen!\n- Core: Replace ip function with a small helper function to address security concerns - [#27529](https://github.com/storybookjs/storybook/pull/27529), thanks @tony19!\n- Portable Stories: Add tags to composed story - [#27708](https://github.com/storybookjs/storybook/pull/27708), thanks @yannbf!\n- Test: Upgrade deps of @storybook/test - [#27862](https://github.com/storybookjs/storybook/pull/27862), thanks @kasperpeulen!\n- Vite: Fix stats-plugin to normalize file names with posix paths - [#27218](https://github.com/storybookjs/storybook/pull/27218), thanks @AlexAtVista!"}} +{ + "version": "8.2.0-alpha.6", + "info": { + "plain": "- Addon-actions: Only log spies with names - [#28091](https://github.com/storybookjs/storybook/pull/28091), thanks @kasperpeulen!\n- Build: Change require/import order, so that import has higher prio if both are specified - [#27730](https://github.com/storybookjs/storybook/pull/27730), thanks @kasperpeulen!\n- CLI: Only log the UpgradeStorybookToSameVersionError but continue the upgrade as normal - [#27217](https://github.com/storybookjs/storybook/pull/27217), thanks @kasperpeulen!\n- Core: Replace ip function with a small helper function to address security concerns - [#27529](https://github.com/storybookjs/storybook/pull/27529), thanks @tony19!\n- Portable Stories: Add tags to composed story - [#27708](https://github.com/storybookjs/storybook/pull/27708), thanks @yannbf!\n- Test: Upgrade deps of @storybook/test - [#27862](https://github.com/storybookjs/storybook/pull/27862), thanks @kasperpeulen!\n- Vite: Fix stats-plugin to normalize file names with posix paths - [#27218](https://github.com/storybookjs/storybook/pull/27218), thanks @AlexAtVista!" + } +} From 5d0911c0fb1f2b1fd159226942ee227601e57a3f Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 14 May 2024 16:00:55 +0200 Subject: [PATCH 02/24] Merge pull request #27105 from storybookjs/valentin/nextjs-add-image-typing Next.js: Add typing for NextImage to main framework options type (cherry picked from commit 46646d27897758b96af6afbe3259a602f51d16e7) --- code/frameworks/nextjs/src/types.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/frameworks/nextjs/src/types.ts b/code/frameworks/nextjs/src/types.ts index 9c7fcd9efd7d..921037eef397 100644 --- a/code/frameworks/nextjs/src/types.ts +++ b/code/frameworks/nextjs/src/types.ts @@ -1,13 +1,13 @@ +import type { + BuilderOptions, + StorybookConfigWebpack, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; import type { ReactOptions, StorybookConfig as StorybookConfigBase, TypescriptOptions as TypescriptOptionsReact, } from '@storybook/preset-react-webpack'; -import type { - StorybookConfigWebpack, - BuilderOptions, - TypescriptOptions as TypescriptOptionsBuilder, -} from '@storybook/builder-webpack5'; import type { CompatibleString } from '@storybook/types'; import type * as NextImage from 'next/image'; From 27698e3685ef399176fbaef962c1fe514b25f840 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 14 May 2024 16:50:22 +0200 Subject: [PATCH 03/24] Merge pull request #27088 from storybookjs/valentin/provide-relaxed-types-for-framework-builder-fields Types: Fix typing for main.framework/builder fields (cherry picked from commit 1ae28db81f043e69d2ac5236cdbc24dcbbea271b) --- code/lib/types/src/modules/core-common.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/lib/types/src/modules/core-common.ts b/code/lib/types/src/modules/core-common.ts index 7addf01fcb5e..fa72e2eb3e3d 100644 --- a/code/lib/types/src/modules/core-common.ts +++ b/code/lib/types/src/modules/core-common.ts @@ -1,11 +1,11 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import type { FileSystemCache } from 'file-system-cache'; -import type { Options as TelejsonOptions } from 'telejson'; import type { Router } from 'express'; +import type { FileSystemCache } from 'file-system-cache'; import type { Server } from 'http'; +import type { Options as TelejsonOptions } from 'telejson'; import type { PackageJson as PackageJsonFromTypeFest } from 'type-fest'; -import type { StoriesEntry, Indexer } from './indexer'; +import type { Indexer, StoriesEntry } from './indexer'; /** * ⚠️ This file contains internal WIP types they MUST NOT be exported outside this package for now! From 8c8b922ab5202aa91ec3e315e8ae09f0c5f15588 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 14 May 2024 16:04:06 +0200 Subject: [PATCH 04/24] Merge pull request #27093 from seanparmelee/raw-conflicts Next.js: Avoid conflicts with the raw loader (cherry picked from commit f5fc4020ed8a2f5d4ccdc2e040e9df3916344742) --- code/frameworks/nextjs/src/swc/loader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/frameworks/nextjs/src/swc/loader.ts b/code/frameworks/nextjs/src/swc/loader.ts index bec334ed64d0..bc5f441fff20 100644 --- a/code/frameworks/nextjs/src/swc/loader.ts +++ b/code/frameworks/nextjs/src/swc/loader.ts @@ -1,9 +1,9 @@ -import { getProjectRoot } from '@storybook/core-common'; import { getVirtualModules } from '@storybook/builder-webpack5'; +import { getProjectRoot } from '@storybook/core-common'; import type { Options } from '@storybook/types'; import type { NextConfig } from 'next'; -import path from 'path'; import loadJsConfig from 'next/dist/build/load-jsconfig'; +import path from 'path'; import type { Configuration as WebpackConfig } from 'webpack'; export const configureSWCLoader = async ( From e5a24badd249dd65f06a45fca2737297ed438aa9 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Wed, 15 May 2024 09:58:09 +0000 Subject: [PATCH 05/24] Write changelog for 8.1.1 [skip ci] --- CHANGELOG.md | 189 +++++++++++++++++++------------------- code/package.json | 3 +- docs/versions/latest.json | 2 +- 3 files changed, 97 insertions(+), 97 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d157ccd8cd5e..83a6c71a3ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,102 +52,101 @@ Storybook 8.1 is here with a tone of new features and bug fixes:
List of all updates - - Addon-actions: Fix falsy args printing as object - 22163 - [#26917](https://github.com/storybookjs/storybook/pull/26917), thanks @Fatcat560! - - Addon-docs: Fix MDX compilation with `@vitejs/plugin-react-swc` and plugins - [#26837](https://github.com/storybookjs/storybook/pull/26837), thanks @JReinhold! - - Addon-docs: Fix `providerImportSource` extension - [#26868](https://github.com/storybookjs/storybook/pull/26868), thanks @bashmish! - - Addon-docs: Fix `react-dom/server` imports breaking stories and docs - [#26557](https://github.com/storybookjs/storybook/pull/26557), thanks @JReinhold! - - Addon-docs: Support Stencil based display names in source snippets - [#26592](https://github.com/storybookjs/storybook/pull/26592), thanks @yannbf! - - Addon-docs: Fix `[Object object]` displayName in some JSX components - [#26566](https://github.com/storybookjs/storybook/pull/26566), thanks @yannbf! - - Angular: Add type support for Angular\'s input signals - [#26413](https://github.com/storybookjs/storybook/pull/26413), thanks @valentinpalkovic! - - Angular: Add type support for Angular\'s output signals - [#26546](https://github.com/storybookjs/storybook/pull/26546), thanks @valentinpalkovic! - - API: Add API access to sidebar renderLabel - [#27099](https://github.com/storybookjs/storybook/pull/27099), thanks @shilman! - - Args: Add possibility to mark controls as read-only - [#26577](https://github.com/storybookjs/storybook/pull/26577), thanks @valentinpalkovic! - - Automigrations: Fix name of VTA addon - [#26816](https://github.com/storybookjs/storybook/pull/26816), thanks @valentinpalkovic! - - Automigrations: Add migration note about new react-docgen default - [#26620](https://github.com/storybookjs/storybook/pull/26620), thanks @valentinpalkovic! - - Automigrations: Fix missing support for mts vite config - [#26441](https://github.com/storybookjs/storybook/pull/26441), thanks @drik98! - - Automigrations: Improve react-docgen automigration prompt - [#27106](https://github.com/storybookjs/storybook/pull/27106), thanks @valentinpalkovic! - - Blocks: Add `of` prop to `Subtitle` - [#22552](https://github.com/storybookjs/storybook/pull/22552), thanks @joaonunomota! - - Blocks: Add `of` prop to `Title` - [#23728](https://github.com/storybookjs/storybook/pull/23728), thanks @Sidnioulz! - - CLI: Add --config-dir flag to add command - [#26771](https://github.com/storybookjs/storybook/pull/26771), thanks @eric-blue! - - CLI: Add --config-dir flag to migrate command - [#26721](https://github.com/storybookjs/storybook/pull/26721), thanks @yannbf! - - CLI: Add main.js `docs.autodocs` automigration - [#27089](https://github.com/storybookjs/storybook/pull/27089), thanks @shilman! - - CLI: Add Visual Tests addon install auto-migration when upgrading to 8.0.x - [#26766](https://github.com/storybookjs/storybook/pull/26766), thanks @ndelangen! - - CLI: Automigrate improve upgrade storybook related packages - [#26497](https://github.com/storybookjs/storybook/pull/26497), thanks @ndelangen! - - CLI: Automigrations copy edits - [#26342](https://github.com/storybookjs/storybook/pull/26342), thanks @joevaugh4n! - - CLI: Fix eslint configuration for string `extends` - [#27097](https://github.com/storybookjs/storybook/pull/27097), thanks @shilman! - - CLI: Improve Yarn berry error parsing - [#26616](https://github.com/storybookjs/storybook/pull/26616), thanks @yannbf! - - CLI: Improve `vite-config-file.ts` - [#26375](https://github.com/storybookjs/storybook/pull/26375), thanks @joevaugh4n! - - CLI: Instruct the correct auto-migration command - [#26515](https://github.com/storybookjs/storybook/pull/26515), thanks @ndelangen! - - CLI: Introduce package manager fallback for initializing Storybook in an empty directory with yarn1 - [#26500](https://github.com/storybookjs/storybook/pull/26500), thanks @valentinpalkovic! - - CLI: Throw an error when running upgrade command in incorrect cwd - [#26585](https://github.com/storybookjs/storybook/pull/26585), thanks @yannbf! - - Codemods: Escape filename given as argument - [#26430](https://github.com/storybookjs/storybook/pull/26430), thanks @YukiKitagata! - - Controls: Add Channels API to search for files in the project root - [#26726](https://github.com/storybookjs/storybook/pull/26726), thanks @valentinpalkovic! - - Controls: Added server channel to create a new story - [#26769](https://github.com/storybookjs/storybook/pull/26769), thanks @valentinpalkovic! - - Controls: Add UI to create new story files - [#26875](https://github.com/storybookjs/storybook/pull/26875), thanks @valentinpalkovic! - - Controls: Fix crashing when docgen extraction partially fails - [#26862](https://github.com/storybookjs/storybook/pull/26862), thanks @yannbf! - - Controls: Fix disable condition in ArgControl component - [#26567](https://github.com/storybookjs/storybook/pull/26567), thanks @valentinpalkovic! - - Controls: Fix number controls do not reset - [#26372](https://github.com/storybookjs/storybook/pull/26372), thanks @jiyiru! - - Core: Add `duration` and `onClick` support to Notification API and improve Notification UI - [#26696](https://github.com/storybookjs/storybook/pull/26696), thanks @ghengeveld! - - Core: Drop unneeded `UPDATE_STORY_ARGS` which was for SSv6 - [#25993](https://github.com/storybookjs/storybook/pull/25993), thanks @tmeasday! - - Core: Ensure that simultaneous onStoriesChanged don\'t clobber each other - [#26882](https://github.com/storybookjs/storybook/pull/26882), thanks @tmeasday! - - Core: Fix filters not being applied in WebKit - [#26949](https://github.com/storybookjs/storybook/pull/26949), thanks @JReinhold! - - Core: Fix preloading too early - [#26442](https://github.com/storybookjs/storybook/pull/26442), thanks @ndelangen! - - Core: Implement file formatter - [#26809](https://github.com/storybookjs/storybook/pull/26809), thanks @valentinpalkovic! - - Core: Optimize clearNotification - [#26415](https://github.com/storybookjs/storybook/pull/26415), thanks @ndelangen! - - Core: Save from controls - [#26827](https://github.com/storybookjs/storybook/pull/26827), thanks @ndelangen! - - CSF: Allow default export without title or component attributes - [#26516](https://github.com/storybookjs/storybook/pull/26516), thanks @kasperpeulen! - - CSF: Fix typings for control and other properties of argTypes - [#26824](https://github.com/storybookjs/storybook/pull/26824), thanks @kasperpeulen! - - CSF: Make sure loaders/decorators can be used as array - [#26514](https://github.com/storybookjs/storybook/pull/26514), thanks @kasperpeulen! - - Dependencies: Upgrade @storybook/csf to 0.1.5 - [#26958](https://github.com/storybookjs/storybook/pull/26958), thanks @Cherry! - - Dependencies: Upgrade `@joshwooding/vite-plugin-react-docgen-typescript` to `0.3.1` - [#26673](https://github.com/storybookjs/storybook/pull/26673), thanks @joshwooding! - - Dependencies: Upgrade `ejs` to `3.1.10` - [#27054](https://github.com/storybookjs/storybook/pull/27054), thanks @RiuSalvi! - - Dependencies: Bump es-module-lexer - [#26737](https://github.com/storybookjs/storybook/pull/26737), thanks @valentinpalkovic! - - Dependencies: Update globby dependency - [#26733](https://github.com/storybookjs/storybook/pull/26733), thanks @valentinpalkovic! - - Dependencies: Update postcss-loader in Next.js framework - [#26707](https://github.com/storybookjs/storybook/pull/26707), thanks @valentinpalkovic! - - Doc Tools: Signature Type Error Handling - [#26774](https://github.com/storybookjs/storybook/pull/26774), thanks @ethriel3695! - - Indexer: Escape special characters in storyImport regex - [#22545](https://github.com/storybookjs/storybook/pull/22545), thanks @VojGin! - - Maintenance: Fix performance regressions - [#26411](https://github.com/storybookjs/storybook/pull/26411), thanks @kasperpeulen! - - MDX: Do not transform `http://` links - [#26488](https://github.com/storybookjs/storybook/pull/26488), thanks @JReinhold! - - Next.js: Fix Compatibility with - ## 8.0.10 - MDX: Don't transform `http://` links - [#26488](https://github.com/storybookjs/storybook/pull/26488), thanks @JReinhold! @@ -217,7 +216,7 @@ Storybook 8.1 is here with a tone of new features and bug fixes: - Controls: Fix type summary when table.type unset - [#26283](https://github.com/storybookjs/storybook/pull/26283), thanks @shilman! - Core: Fix addon bundling script - [#26145](https://github.com/storybookjs/storybook/pull/26145), thanks @ndelangen! - Core: Fix fail to load `main.ts` error message - [#26035](https://github.com/storybookjs/storybook/pull/26035), thanks @ndelangen! -- Maintenance: Fix performance regressions - [#26411](https://github.com/storybookjs/storybook/pull/26411), thanks @kasperpeulen! +- Maintenance: Fix performance regressions - [#26411](https://github.com/storybookjs/storybook/pull/26411), thanks @kasperpeulen! ## 8.0.0 diff --git a/code/package.json b/code/package.json index e9414600048a..c5f6f967cd86 100644 --- a/code/package.json +++ b/code/package.json @@ -297,5 +297,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "8.1.1" } diff --git a/docs/versions/latest.json b/docs/versions/latest.json index f2b7dba133dd..eef9cd9b7aa8 100644 --- a/docs/versions/latest.json +++ b/docs/versions/latest.json @@ -1 +1 @@ -{"version":"8.1.0","info":{"plain":"- Automigration: Improve react-docgen automigration prompt - [#27106](https://github.com/storybookjs/storybook/pull/27106), thanks @valentinpalkovic!\n- Typescript: Add types for `experimental-playwright` entries without `type:bundler` - [#27107](https://github.com/storybookjs/storybook/pull/27107), thanks @ndelangen!"}} +{"version":"8.1.1","info":{"plain":"- Docgen: Only add react-docgen info when a component is defined in the file - [#26967](https://github.com/storybookjs/storybook/pull/26967), thanks @glenjamin!\n- Docs: Fix MDX Stories block tag-filtering behavior - [#27144](https://github.com/storybookjs/storybook/pull/27144), thanks @shilman!\n- Docs: Fix Subtitle block when no `of` prop passed - [#27147](https://github.com/storybookjs/storybook/pull/27147), thanks @JReinhold!\n- Next.js: Add typing for NextImage to main framework options type - [#27105](https://github.com/storybookjs/storybook/pull/27105), thanks @valentinpalkovic!\n- Next.js: Avoid conflicts with the raw loader - [#27093](https://github.com/storybookjs/storybook/pull/27093), thanks @seanparmelee!\n- Types: Fix typing for main.framework/builder fields - [#27088](https://github.com/storybookjs/storybook/pull/27088), thanks @valentinpalkovic!"}} From 9d2c70702ca3077cd34464d23bdd60d6a304697b Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Wed, 15 May 2024 10:59:27 +0000 Subject: [PATCH 06/24] Bump version from "8.1.0" to "8.1.1" [skip ci] --- code/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/package.json b/code/package.json index c5f6f967cd86..e9414600048a 100644 --- a/code/package.json +++ b/code/package.json @@ -297,6 +297,5 @@ "Dependency Upgrades" ] ] - }, - "deferredNextVersion": "8.1.1" + } } From 400ce132815c935f119a281546abbafca8d2b2cd Mon Sep 17 00:00:00 2001 From: Lars Rickert Date: Thu, 16 May 2024 09:37:54 +0200 Subject: [PATCH 07/24] fix: remove unnecessary "