From 29e7d1751194ee545fb5e447be07ea22c772b060 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Thu, 14 Nov 2024 14:03:06 +0100 Subject: [PATCH 1/2] Merge pull request #29617 from storybookjs/yann/fix-dep-optimization-issue Addon Test: Only optimize react deps if applicable in vitest-plugin (cherry picked from commit b3a9dfddec21fa8dfdda382efc66da91c727930e) --- code/addons/test/src/vitest-plugin/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/addons/test/src/vitest-plugin/index.ts b/code/addons/test/src/vitest-plugin/index.ts index ebe4bb20b281..968b0e656141 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -134,13 +134,13 @@ export const storybookTest = (options?: UserOptions): Plugin => { config.optimizeDeps ??= {}; config.optimizeDeps = { ...config.optimizeDeps, - include: [ - ...(config.optimizeDeps.include ?? []), - 'react-dom/test-utils', - '@storybook/experimental-addon-test/**', - ], + include: [...(config.optimizeDeps.include ?? []), '@storybook/experimental-addon-test/**'], }; + if (frameworkName?.includes('react') || frameworkName?.includes('nextjs')) { + config.optimizeDeps.include.push('react-dom/test-utils'); + } + if (frameworkName?.includes('vue3')) { config.define ??= {}; config.define.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = 'false'; From 81f276d6aacba2d29f32d5a93212e362e2996190 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:05:55 +0000 Subject: [PATCH 2/2] Write changelog for 8.4.4 [skip ci] --- CHANGELOG.md | 4 ++++ code/package.json | 3 ++- docs/versions/latest.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17a5280690dc..eb9f0de30cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 8.4.4 + +- Addon Test: Only optimize react deps if applicable in vitest-plugin - [#29617](https://github.com/storybookjs/storybook/pull/29617), thanks @yannbf! + ## 8.4.3 - Addon Test: Optimize internal dependencies - [#29595](https://github.com/storybookjs/storybook/pull/29595), thanks @yannbf! diff --git a/code/package.json b/code/package.json index a698f5c55266..28390817cffb 100644 --- a/code/package.json +++ b/code/package.json @@ -293,5 +293,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "8.4.4" } diff --git a/docs/versions/latest.json b/docs/versions/latest.json index 225134d6f3a0..c3ee932094f3 100644 --- a/docs/versions/latest.json +++ b/docs/versions/latest.json @@ -1 +1 @@ -{"version":"8.4.3","info":{"plain":"- Addon Test: Optimize internal dependencies - [#29595](https://github.com/storybookjs/storybook/pull/29595), thanks @yannbf!\n- Next.js: Add support for Next 15 - [#29587](https://github.com/storybookjs/storybook/pull/29587), thanks @yannbf!"}} +{"version":"8.4.4","info":{"plain":"- Addon Test: Only optimize react deps if applicable in vitest-plugin - [#29617](https://github.com/storybookjs/storybook/pull/29617), thanks @yannbf!"}}