From 46a838f1cfae6932fd6b64d23058f5b3b1fb9ba2 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Mon, 19 Aug 2024 15:50:06 +0200 Subject: [PATCH 01/30] Implement add command for vitest addon --- code/addons/vitest/package.json | 2 + code/addons/vitest/src/postinstall.ts | 170 +++++++++++++++++++++++++- code/lib/cli-storybook/src/add.ts | 3 +- code/yarn.lock | 2 + 4 files changed, 174 insertions(+), 3 deletions(-) diff --git a/code/addons/vitest/package.json b/code/addons/vitest/package.json index e318fc7f7f59..b504f0e08468 100644 --- a/code/addons/vitest/package.json +++ b/code/addons/vitest/package.json @@ -75,6 +75,8 @@ }, "devDependencies": { "@vitest/browser": "^2.0.0", + "tinyrainbow": "^1.2.0", + "ts-dedent": "^2.2.0", "vitest": "^2.0.0" }, "peerDependencies": { diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 47bcad1f9349..a7a73eb3721e 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -1,3 +1,169 @@ -export default async function postinstall(context: any) { - console.log('[addon-vitest] postinstall with', context); +import { existsSync } from 'node:fs'; +import * as fs from 'node:fs/promises'; +import { writeFile } from 'node:fs/promises'; +import { join, resolve } from 'node:path'; + +import { + JsPackageManagerFactory, + extractProperFrameworkName, + loadAllPresets, + loadMainConfig, +} from 'storybook/internal/common'; +import { logger } from 'storybook/internal/node-logger'; + +import c from 'tinyrainbow'; +import dedent from 'ts-dedent'; + +import { type PostinstallOptions } from '../../../lib/cli-storybook/src/add'; + +export default async function postInstall(options: PostinstallOptions) { + const packageManager = JsPackageManagerFactory.getPackageManager({ + force: options.packageManager, + }); + + const info = await getFrameworkInfo(options); + + if (info.builderPackageName !== '@storybook/builder-vite') { + logger.info('Only @storybook/builder-vite is supported'); + return; + } + + const configFile = resolve('vitest.config.ts'); + if (existsSync(configFile)) { + logger.info('You already have a vitest.config.ts file. Check our docs:'); + return; + } + + const annotationsImport = [ + '@storybook/nextjs', + '@storybook/experimental-nextjs-vite', + '@storybook/sveltekit', + ].includes(info.frameworkPackageName) + ? info.frameworkPackageName + : ['@storybook/react', '@storybook/svelte', '@storybook/vue3'].includes( + info.rendererPackageName + ) + ? info.rendererPackageName + : null; + + if (!annotationsImport) { + logger.info('Your framework is not yet supported for the vitest addon.'); + return; + } + + const vitestInfo = getVitestPluginInfo(info.frameworkPackageName); + + const packages = ['vitest@latest', '@vitest/browser@latest', 'playwright@latest']; + logger.info(c.bold('Installing packages...')); + logger.info(packages.join(', ')); + await packageManager.addDependencies({ installAsDevDependencies: true }, packages); + + await packageManager.executeCommand({ + command: 'npx', + args: ['playwright', 'install', 'chromium', '--with-deps'], + }); + + await writeFile( + resolve(options.configDir, 'vitest.setup.ts'), + dedent` + import { beforeAll } from 'vitest' + import { setProjectAnnotations } from '${annotationsImport}' + import * as projectAnnotations from './preview' + + const project = setProjectAnnotations(projectAnnotations) + + beforeAll(project.beforeAll) + ` + ); + await writeFile( + configFile, + dedent` + import { defineConfig } from "vitest/config"; + import { storybookTest } from "@storybook/experimental-addon-vitest/plugin"; + ${vitestInfo.frameworkPluginImport ? vitestInfo.frameworkPluginImport + '\n' : ''} + export default defineConfig({ + plugins: [ + storybookTest(),${vitestInfo.frameworkPluginCall ? '\n' + vitestInfo.frameworkPluginCall : ''} + ], + test: { + include: ['**/*.{stories}.?(m)[jt]s?(x)'], + browser: { + enabled: true, + name: 'chromium', + provider: 'playwright', + headless: true, + screenshotFailures: false, + }, + isolate: false, + setupFiles: ['./.storybook/vitest.setup.ts'], + }, + }) + ` + ); +} + +const getVitestPluginInfo = (framework: string) => { + let frameworkPluginImport = ''; + let frameworkPluginCall = ''; + + if (framework === '@storybook/nextjs') { + frameworkPluginImport = "import vitePluginNext from 'vite-plugin-storybook-nextjs'"; + frameworkPluginCall = 'vitePluginNext()'; + } + + if (framework === '@storybook/sveltekit') { + frameworkPluginImport = "import { storybookSveltekitPlugin } from '@storybook/sveltekit/vite'"; + frameworkPluginCall = 'storybookSveltekitPlugin()'; + } + + return { frameworkPluginImport, frameworkPluginCall }; +}; + +async function getFrameworkInfo({ configDir, packageManager: pkgMgr }: PostinstallOptions) { + const packageManager = JsPackageManagerFactory.getPackageManager({ force: pkgMgr }); + const packageJson = await packageManager.retrievePackageJson(); + + const config = await loadMainConfig({ configDir, noCache: true }); + const { framework } = config; + + const frameworkName = typeof framework === 'string' ? framework : framework?.name; + + if (!frameworkName) { + throw new Error('Could not detect your storybook framework.'); + } + + const frameworkPackageName = extractProperFrameworkName(frameworkName); + + const presets = await loadAllPresets({ + corePresets: [join(frameworkName, 'preset')], + overridePresets: [ + require.resolve('@storybook/core/core-server/presets/common-override-preset'), + ], + configDir, + packageJson, + isCritical: true, + }); + + const core = await presets.apply('core', {}); + + const { builder, renderer } = core; + + if (!builder || !renderer) { + throw new Error('Could not detect your storybook framework.'); + } + + const builderPackageJson = await fs.readFile( + `${typeof builder === 'string' ? builder : builder.name}/package.json`, + 'utf8' + ); + const builderPackageName = JSON.parse(builderPackageJson).name; + + const rendererPackageJson = await fs.readFile(`${renderer}/package.json`, 'utf8'); + const rendererPackageName = JSON.parse(rendererPackageJson).name; + + return { + frameworkPackageName, + builderPackageName, + rendererPackageName, + }; } diff --git a/code/lib/cli-storybook/src/add.ts b/code/lib/cli-storybook/src/add.ts index 409c91c41fb6..df3ac84f140f 100644 --- a/code/lib/cli-storybook/src/add.ts +++ b/code/lib/cli-storybook/src/add.ts @@ -17,6 +17,7 @@ import { postinstallAddon } from './postinstallAddon'; export interface PostinstallOptions { packageManager: PackageManagerName; + configDir: string; } /** @@ -139,7 +140,7 @@ export async function add( await writeConfig(main); if (!skipPostinstall && isCoreAddon(addonName)) { - await postinstallAddon(addonName, { packageManager: packageManager.type }); + await postinstallAddon(addonName, { packageManager: packageManager.type, configDir }); } } function isValidVersion(version: string) { diff --git a/code/yarn.lock b/code/yarn.lock index 34cf0e23881e..16faae9c7535 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6133,6 +6133,8 @@ __metadata: dependencies: "@storybook/csf": "npm:^0.1.11" "@vitest/browser": "npm:^2.0.0" + tinyrainbow: "npm:^1.2.0" + ts-dedent: "npm:^2.2.0" vitest: "npm:^2.0.0" peerDependencies: "@vitest/browser": ^2.0.0 From 3cee65eab7a60828c9845692288e495ba22a83cd Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Mon, 19 Aug 2024 16:03:59 +0200 Subject: [PATCH 02/30] Better texts --- code/addons/vitest/src/postinstall.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index a7a73eb3721e..a06d05ad3968 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -23,14 +23,19 @@ export default async function postInstall(options: PostinstallOptions) { const info = await getFrameworkInfo(options); - if (info.builderPackageName !== '@storybook/builder-vite') { - logger.info('Only @storybook/builder-vite is supported'); + if ( + info.frameworkPackageName !== '@storybook/nextjs' && + info.builderPackageName !== '@storybook/builder-vite' + ) { + logger.info('The vitest addon can only be used with a vite framework or nextjs.'); return; } const configFile = resolve('vitest.config.ts'); if (existsSync(configFile)) { - logger.info('You already have a vitest.config.ts file. Check our docs:'); + logger.info( + 'Check our docs how to configure vitest to test stories: https://storybook.js.org/docs/configure/vitest' + ); return; } @@ -47,7 +52,7 @@ export default async function postInstall(options: PostinstallOptions) { : null; if (!annotationsImport) { - logger.info('Your framework is not yet supported for the vitest addon.'); + logger.info('The vitest addon cannot yet be used with: ' + info.frameworkPackageName); return; } @@ -58,6 +63,7 @@ export default async function postInstall(options: PostinstallOptions) { logger.info(packages.join(', ')); await packageManager.addDependencies({ installAsDevDependencies: true }, packages); + logger.info(c.bold('Executing npx playwright install chromium --with-deps ...')); await packageManager.executeCommand({ command: 'npx', args: ['playwright', 'install', 'chromium', '--with-deps'], @@ -92,7 +98,6 @@ export default async function postInstall(options: PostinstallOptions) { name: 'chromium', provider: 'playwright', headless: true, - screenshotFailures: false, }, isolate: false, setupFiles: ['./.storybook/vitest.setup.ts'], From 1a4a5e73d2b5c601d0f617a624f7833a00f295b4 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Mon, 19 Aug 2024 16:11:50 +0200 Subject: [PATCH 03/30] Improve glob --- code/addons/vitest/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index a06d05ad3968..9032b34ad9fe 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -92,7 +92,7 @@ export default async function postInstall(options: PostinstallOptions) { storybookTest(),${vitestInfo.frameworkPluginCall ? '\n' + vitestInfo.frameworkPluginCall : ''} ], test: { - include: ['**/*.{stories}.?(m)[jt]s?(x)'], + include: ['**/*.stories.?(m)[jt]s?(x)'], browser: { enabled: true, name: 'chromium', From f4db6c0397d8aa1acc30a1c04a7e9f96d93ea450 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Mon, 19 Aug 2024 16:22:01 +0200 Subject: [PATCH 04/30] Add more log lines --- code/addons/vitest/src/postinstall.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 9032b34ad9fe..6441c1cf61e8 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -69,6 +69,7 @@ export default async function postInstall(options: PostinstallOptions) { args: ['playwright', 'install', 'chromium', '--with-deps'], }); + logger.info(c.bold('Writing .storybook/vitest.setup.ts file...')); await writeFile( resolve(options.configDir, 'vitest.setup.ts'), dedent` @@ -81,6 +82,8 @@ export default async function postInstall(options: PostinstallOptions) { beforeAll(project.beforeAll) ` ); + + logger.info(c.bold('Writing vitest.config.ts file...')); await writeFile( configFile, dedent` From c98d4c28f0e50bc9289414962e62c7add8fb8f1a Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 20 Aug 2024 15:50:30 +0200 Subject: [PATCH 05/30] Support adding workspace files if vitest.config.ts exists --- code/addons/vitest/package.json | 1 + code/addons/vitest/src/postinstall.ts | 60 ++++++++++++++++++++++----- code/yarn.lock | 1 + 3 files changed, 52 insertions(+), 10 deletions(-) diff --git a/code/addons/vitest/package.json b/code/addons/vitest/package.json index b504f0e08468..547987dac46e 100644 --- a/code/addons/vitest/package.json +++ b/code/addons/vitest/package.json @@ -75,6 +75,7 @@ }, "devDependencies": { "@vitest/browser": "^2.0.0", + "find-up": "^7.0.0", "tinyrainbow": "^1.2.0", "ts-dedent": "^2.2.0", "vitest": "^2.0.0" diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 6441c1cf61e8..d734e4d3d128 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -1,7 +1,8 @@ import { existsSync } from 'node:fs'; import * as fs from 'node:fs/promises'; import { writeFile } from 'node:fs/promises'; -import { join, resolve } from 'node:path'; +import { dirname, join, resolve } from 'node:path'; +import * as path from 'node:path'; import { JsPackageManagerFactory, @@ -11,6 +12,7 @@ import { } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; +import { findUp } from 'find-up'; import c from 'tinyrainbow'; import dedent from 'ts-dedent'; @@ -31,14 +33,6 @@ export default async function postInstall(options: PostinstallOptions) { return; } - const configFile = resolve('vitest.config.ts'); - if (existsSync(configFile)) { - logger.info( - 'Check our docs how to configure vitest to test stories: https://storybook.js.org/docs/configure/vitest' - ); - return; - } - const annotationsImport = [ '@storybook/nextjs', '@storybook/experimental-nextjs-vite', @@ -83,9 +77,55 @@ export default async function postInstall(options: PostinstallOptions) { ` ); + const extensions = ['.ts', '.mts', '.cts', '.js', '.mjs', '.cjs']; + const configFiles = extensions.map((ext) => 'vitest.config' + ext); + + const rootConfig = await findUp(configFiles, { + cwd: process.cwd(), + }); + + if (rootConfig) { + const extname = rootConfig ? path.extname(rootConfig) : 'ts'; + const browserWorkspaceFile = resolve(dirname(rootConfig), `vitest.workspace${extname}`); + if (existsSync(browserWorkspaceFile)) { + logger.info( + 'A workspace file already exists. Check our docs how to configure vitest to test stories: https://storybook.js.org/docs/configure/vitest' + ); + return; + } + logger.info(c.bold('Writing vitest.workspace.ts file...')); + await writeFile( + browserWorkspaceFile, + dedent` + import { defineWorkspace } from 'vitest/config' + + export default defineWorkspace([ + 'vitest.config.ts', + { + extends: 'vitest.config${extname}', + plugins: [ + storybookTest(),${vitestInfo.frameworkPluginCall ? '\n' + vitestInfo.frameworkPluginCall : ''} + ], + test: { + include: ['**/*.stories.?(m)[jt]s?(x)'], + browser: { + enabled: true, + name: 'chromium', + provider: 'playwright', + headless: true, + }, + isolate: false, + setupFiles: ['./.storybook/vitest.setup.ts'], + }, + }, + ]) + ` + ); + return; + } logger.info(c.bold('Writing vitest.config.ts file...')); await writeFile( - configFile, + resolve('vitest.config.ts'), dedent` import { defineConfig } from "vitest/config"; import { storybookTest } from "@storybook/experimental-addon-vitest/plugin"; diff --git a/code/yarn.lock b/code/yarn.lock index 16faae9c7535..525d1d6c99d2 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6133,6 +6133,7 @@ __metadata: dependencies: "@storybook/csf": "npm:^0.1.11" "@vitest/browser": "npm:^2.0.0" + find-up: "npm:^7.0.0" tinyrainbow: "npm:^1.2.0" ts-dedent: "npm:^2.2.0" vitest: "npm:^2.0.0" From 480f404a4f8623adcf28570cdc2cdbc4e336d9eb Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 20 Aug 2024 15:53:31 +0200 Subject: [PATCH 06/30] Update unit tests --- code/lib/cli-storybook/src/add.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/lib/cli-storybook/src/add.test.ts b/code/lib/cli-storybook/src/add.test.ts index 10e7b90b23ac..137e60a72008 100644 --- a/code/lib/cli-storybook/src/add.test.ts +++ b/code/lib/cli-storybook/src/add.test.ts @@ -144,6 +144,7 @@ describe('add (extra)', () => { expect(MockedPostInstall.postinstallAddon).toHaveBeenCalledWith('@storybook/addon-docs', { packageManager: 'npm', + configDir: '.storybook', }); }); }); From e9070eb663cd3f564c60f40598a64f6053cbff6b Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 20 Aug 2024 17:15:20 +0200 Subject: [PATCH 07/30] Update code/addons/vitest/src/postinstall.ts Co-authored-by: Yann Braga --- code/addons/vitest/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index d734e4d3d128..809d8e6a8e40 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -85,7 +85,7 @@ export default async function postInstall(options: PostinstallOptions) { }); if (rootConfig) { - const extname = rootConfig ? path.extname(rootConfig) : 'ts'; + const extname = rootConfig ? path.extname(rootConfig) : '.ts'; const browserWorkspaceFile = resolve(dirname(rootConfig), `vitest.workspace${extname}`); if (existsSync(browserWorkspaceFile)) { logger.info( From 675fdb8933defaa07c6f0491fe114c7e3a094059 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 20 Aug 2024 17:36:59 +0200 Subject: [PATCH 08/30] Get correct path --- code/addons/vitest/src/postinstall.ts | 5 ++--- code/lib/cli-storybook/src/add.ts | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 809d8e6a8e40..b4acaafe9f30 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -1,7 +1,7 @@ import { existsSync } from 'node:fs'; import * as fs from 'node:fs/promises'; import { writeFile } from 'node:fs/promises'; -import { dirname, join, resolve } from 'node:path'; +import { dirname, join, relative, resolve } from 'node:path'; import * as path from 'node:path'; import { @@ -100,9 +100,8 @@ export default async function postInstall(options: PostinstallOptions) { import { defineWorkspace } from 'vitest/config' export default defineWorkspace([ - 'vitest.config.ts', + '${relative(dirname(browserWorkspaceFile), rootConfig)}', { - extends: 'vitest.config${extname}', plugins: [ storybookTest(),${vitestInfo.frameworkPluginCall ? '\n' + vitestInfo.frameworkPluginCall : ''} ], diff --git a/code/lib/cli-storybook/src/add.ts b/code/lib/cli-storybook/src/add.ts index df3ac84f140f..82de4e6cad02 100644 --- a/code/lib/cli-storybook/src/add.ts +++ b/code/lib/cli-storybook/src/add.ts @@ -102,11 +102,11 @@ export async function add( return; } - if (checkInstalled(addonName, requireMain(configDir))) { - throw new Error(dedent` - Addon ${addonName} is already installed; we skipped adding it to your ${mainConfig}. - `); - } + // if (checkInstalled(addonName, requireMain(configDir))) { + // throw new Error(dedent` + // Addon ${addonName} is already installed; we skipped adding it to your ${mainConfig}. + // `); + // } const main = await readConfig(mainConfig); logger.log(`Verifying ${addonName}`); @@ -135,9 +135,9 @@ export async function add( logger.log(`Installing ${addonWithVersion}`); await packageManager.addDependencies({ installAsDevDependencies: true }, [addonWithVersion]); - logger.log(`Adding '${addon}' to main.js addons field.`); - main.appendValueToArray(['addons'], addonName); - await writeConfig(main); + // logger.log(`Adding '${addon}' to main.js addons field.`); + // main.appendValueToArray(['addons'], addonName); + // await writeConfig(main); if (!skipPostinstall && isCoreAddon(addonName)) { await postinstallAddon(addonName, { packageManager: packageManager.type, configDir }); From dbd4844aa4a89f64f9dfcea8a0866dbfdd63d31b Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 21 Aug 2024 14:14:53 +0200 Subject: [PATCH 09/30] Add comment about isolation --- code/addons/vitest/src/postinstall.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index b4acaafe9f30..9a7d98a90736 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -18,6 +18,8 @@ import dedent from 'ts-dedent'; import { type PostinstallOptions } from '../../../lib/cli-storybook/src/add'; +const extensions = ['.ts', '.mts', '.cts', '.js', '.mjs', '.cjs']; + export default async function postInstall(options: PostinstallOptions) { const packageManager = JsPackageManagerFactory.getPackageManager({ force: options.packageManager, @@ -53,6 +55,9 @@ export default async function postInstall(options: PostinstallOptions) { const vitestInfo = getVitestPluginInfo(info.frameworkPackageName); const packages = ['vitest@latest', '@vitest/browser@latest', 'playwright@latest']; + if (info.frameworkPackageName === '@storybook/nextjs') { + packages.push('vite-plugin-storybook-nextjs@latest'); + } logger.info(c.bold('Installing packages...')); logger.info(packages.join(', ')); await packageManager.addDependencies({ installAsDevDependencies: true }, packages); @@ -64,20 +69,24 @@ export default async function postInstall(options: PostinstallOptions) { }); logger.info(c.bold('Writing .storybook/vitest.setup.ts file...')); + + const previewExists = extensions + .map((ext) => path.resolve(path.join(options.configDir, `preview${ext}`))) + .some((config) => existsSync(config)); + await writeFile( resolve(options.configDir, 'vitest.setup.ts'), dedent` import { beforeAll } from 'vitest' import { setProjectAnnotations } from '${annotationsImport}' - import * as projectAnnotations from './preview' + ${previewExists ? `import * as projectAnnotations from './preview'` : ''} - const project = setProjectAnnotations(projectAnnotations) + const project = setProjectAnnotations(${previewExists ? 'projectAnnotations' : '[]'}) beforeAll(project.beforeAll) ` ); - const extensions = ['.ts', '.mts', '.cts', '.js', '.mjs', '.cjs']; const configFiles = extensions.map((ext) => 'vitest.config' + ext); const rootConfig = await findUp(configFiles, { @@ -113,6 +122,8 @@ export default async function postInstall(options: PostinstallOptions) { provider: 'playwright', headless: true, }, + // Disabling isolation is faster and should work for most storybooks. + // Consider removing this, if you have flaky tests. isolate: false, setupFiles: ['./.storybook/vitest.setup.ts'], }, @@ -181,6 +192,7 @@ async function getFrameworkInfo({ configDir, packageManager: pkgMgr }: Postinsta const frameworkPackageName = extractProperFrameworkName(frameworkName); + console.log(configDir); const presets = await loadAllPresets({ corePresets: [join(frameworkName, 'preset')], overridePresets: [ From 419b81c18d58edbbcd6f8a76bfff0b6b44cfdedf Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 21 Aug 2024 14:23:40 +0200 Subject: [PATCH 10/30] Rollback --- code/lib/cli-storybook/src/add.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/lib/cli-storybook/src/add.ts b/code/lib/cli-storybook/src/add.ts index 82de4e6cad02..df3ac84f140f 100644 --- a/code/lib/cli-storybook/src/add.ts +++ b/code/lib/cli-storybook/src/add.ts @@ -102,11 +102,11 @@ export async function add( return; } - // if (checkInstalled(addonName, requireMain(configDir))) { - // throw new Error(dedent` - // Addon ${addonName} is already installed; we skipped adding it to your ${mainConfig}. - // `); - // } + if (checkInstalled(addonName, requireMain(configDir))) { + throw new Error(dedent` + Addon ${addonName} is already installed; we skipped adding it to your ${mainConfig}. + `); + } const main = await readConfig(mainConfig); logger.log(`Verifying ${addonName}`); @@ -135,9 +135,9 @@ export async function add( logger.log(`Installing ${addonWithVersion}`); await packageManager.addDependencies({ installAsDevDependencies: true }, [addonWithVersion]); - // logger.log(`Adding '${addon}' to main.js addons field.`); - // main.appendValueToArray(['addons'], addonName); - // await writeConfig(main); + logger.log(`Adding '${addon}' to main.js addons field.`); + main.appendValueToArray(['addons'], addonName); + await writeConfig(main); if (!skipPostinstall && isCoreAddon(addonName)) { await postinstallAddon(addonName, { packageManager: packageManager.type, configDir }); From 71ad82754d25049a32e9a61a5dc01da769cb210a Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 21 Aug 2024 14:26:51 +0200 Subject: [PATCH 11/30] Fix --- code/addons/vitest/src/postinstall.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 9a7d98a90736..db9dae75ef2b 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -107,7 +107,8 @@ export default async function postInstall(options: PostinstallOptions) { browserWorkspaceFile, dedent` import { defineWorkspace } from 'vitest/config' - + import { storybookTest } from "@storybook/experimental-addon-vitest/plugin"; + ${vitestInfo.frameworkPluginImport ? vitestInfo.frameworkPluginImport + '\n' : ''} export default defineWorkspace([ '${relative(dirname(browserWorkspaceFile), rootConfig)}', { @@ -122,7 +123,7 @@ export default async function postInstall(options: PostinstallOptions) { provider: 'playwright', headless: true, }, - // Disabling isolation is faster and should work for most storybooks. + // Disabling isolation is faster and is similar to how tests are isolated in storybook itself. // Consider removing this, if you have flaky tests. isolate: false, setupFiles: ['./.storybook/vitest.setup.ts'], @@ -152,6 +153,8 @@ export default async function postInstall(options: PostinstallOptions) { provider: 'playwright', headless: true, }, + // Disabling isolation is faster and is similar to how tests are isolated in storybook itself. + // Consider removing this, if you have flaky tests. isolate: false, setupFiles: ['./.storybook/vitest.setup.ts'], }, From 718b8790f4aeb97956019ef13335c36667875874 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 21 Aug 2024 14:38:40 +0200 Subject: [PATCH 12/30] Improve messages --- code/addons/vitest/src/postinstall.ts | 48 +++++++++++++++++++-------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index db9dae75ef2b..c6c4cffe7ed9 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -55,6 +55,14 @@ export default async function postInstall(options: PostinstallOptions) { const vitestInfo = getVitestPluginInfo(info.frameworkPackageName); const packages = ['vitest@latest', '@vitest/browser@latest', 'playwright@latest']; + + logger.info( + dedent` + We detected that you're using Next.js. + We will configure the vite-plugin-storybook-nextjs plugin to allow you to run tests in Vitest. + ` + ); + if (info.frameworkPackageName === '@storybook/nextjs') { packages.push('vite-plugin-storybook-nextjs@latest'); } @@ -98,14 +106,17 @@ export default async function postInstall(options: PostinstallOptions) { const browserWorkspaceFile = resolve(dirname(rootConfig), `vitest.workspace${extname}`); if (existsSync(browserWorkspaceFile)) { logger.info( - 'A workspace file already exists. Check our docs how to configure vitest to test stories: https://storybook.js.org/docs/configure/vitest' + dedent` + We detected that you have Vitest and workspaces configured, so we couldn't automatically set the plugin for you. + Please refer to the documentation on how to complete the set up: + https://storybook.js.org/docs/configure/vitest + ` ); - return; - } - logger.info(c.bold('Writing vitest.workspace.ts file...')); - await writeFile( - browserWorkspaceFile, - dedent` + } else { + logger.info(c.bold('Writing vitest.workspace.ts file...')); + await writeFile( + browserWorkspaceFile, + dedent` import { defineWorkspace } from 'vitest/config' import { storybookTest } from "@storybook/experimental-addon-vitest/plugin"; ${vitestInfo.frameworkPluginImport ? vitestInfo.frameworkPluginImport + '\n' : ''} @@ -131,13 +142,13 @@ export default async function postInstall(options: PostinstallOptions) { }, ]) ` - ); - return; - } - logger.info(c.bold('Writing vitest.config.ts file...')); - await writeFile( - resolve('vitest.config.ts'), - dedent` + ); + } + } else { + logger.info(c.bold('Writing vitest.config.ts file...')); + await writeFile( + resolve('vitest.config.ts'), + dedent` import { defineConfig } from "vitest/config"; import { storybookTest } from "@storybook/experimental-addon-vitest/plugin"; ${vitestInfo.frameworkPluginImport ? vitestInfo.frameworkPluginImport + '\n' : ''} @@ -160,6 +171,15 @@ export default async function postInstall(options: PostinstallOptions) { }, }) ` + ); + } + + logger.info( + dedent` + The Vitest addon is now configured and you're ready to run your tests! + Check the documentation for more information about its features and configurations at: + https://storybook.js.org/docs/configure/vitest + ` ); } From a26e267cd4efe295df4a6ed0872468cbc9f35995 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 21 Aug 2024 14:42:09 +0200 Subject: [PATCH 13/30] Validate framework --- code/addons/vitest/src/postinstall.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index c6c4cffe7ed9..21bb495e7a97 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -9,6 +9,7 @@ import { extractProperFrameworkName, loadAllPresets, loadMainConfig, + validateFrameworkName, } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; @@ -208,11 +209,7 @@ async function getFrameworkInfo({ configDir, packageManager: pkgMgr }: Postinsta const { framework } = config; const frameworkName = typeof framework === 'string' ? framework : framework?.name; - - if (!frameworkName) { - throw new Error('Could not detect your storybook framework.'); - } - + validateFrameworkName(frameworkName); const frameworkPackageName = extractProperFrameworkName(frameworkName); console.log(configDir); From ce006bf896dd879bd56125eacc8d6ec7f6e0d94d Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 22 Aug 2024 10:48:24 +0200 Subject: [PATCH 14/30] Update code/addons/vitest/src/postinstall.ts Co-authored-by: Kyle Gach --- code/addons/vitest/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 21bb495e7a97..eb8c020803a2 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -32,7 +32,7 @@ export default async function postInstall(options: PostinstallOptions) { info.frameworkPackageName !== '@storybook/nextjs' && info.builderPackageName !== '@storybook/builder-vite' ) { - logger.info('The vitest addon can only be used with a vite framework or nextjs.'); + logger.info('The Vitest addon can only be used with a Vite-based Storybook framework or Next.js.'); return; } From 76734a0df3deaa126912b6c3d4ba893b02e70cd1 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 22 Aug 2024 10:48:30 +0200 Subject: [PATCH 15/30] Update code/addons/vitest/src/postinstall.ts Co-authored-by: Kyle Gach --- code/addons/vitest/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index eb8c020803a2..2093281be2cb 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -49,7 +49,7 @@ export default async function postInstall(options: PostinstallOptions) { : null; if (!annotationsImport) { - logger.info('The vitest addon cannot yet be used with: ' + info.frameworkPackageName); + logger.info('The Vitest addon cannot yet be used with: ' + info.frameworkPackageName); return; } From 78d544e6975cd2c3548988ab4f6fed15292a5b1a Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 22 Aug 2024 10:48:38 +0200 Subject: [PATCH 16/30] Update code/addons/vitest/src/postinstall.ts Co-authored-by: Kyle Gach --- code/addons/vitest/src/postinstall.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 2093281be2cb..60273d5bdaea 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -178,8 +178,8 @@ export default async function postInstall(options: PostinstallOptions) { logger.info( dedent` The Vitest addon is now configured and you're ready to run your tests! - Check the documentation for more information about its features and configurations at: - https://storybook.js.org/docs/configure/vitest + Check the documentation for more information about its features and options at: + https://storybook.js.org/docs/writing-tests/test-runner-with-vitest ` ); } From b45a9b4d7f643f361d4f9c52cbb27749834b2ae1 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 22 Aug 2024 10:50:31 +0200 Subject: [PATCH 17/30] Update code/addons/vitest/src/postinstall.ts Co-authored-by: Kyle Gach --- code/addons/vitest/src/postinstall.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 60273d5bdaea..685c1e028294 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -108,9 +108,9 @@ export default async function postInstall(options: PostinstallOptions) { if (existsSync(browserWorkspaceFile)) { logger.info( dedent` - We detected that you have Vitest and workspaces configured, so we couldn't automatically set the plugin for you. - Please refer to the documentation on how to complete the set up: - https://storybook.js.org/docs/configure/vitest + We detected that you are using Vitest with workspaces, so we do not have enough information to continue setting up the plugin automatically. + Please refer to the documentation to complete the setup manually: + https://storybook.js.org/docs/writing-tests/test-runner-with-vitest#manual ` ); } else { From d8a5c72a84363c83852fb039e647221d7a2bc431 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 22 Aug 2024 10:50:41 +0200 Subject: [PATCH 18/30] Update code/addons/vitest/src/postinstall.ts Co-authored-by: Kyle Gach --- code/addons/vitest/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 685c1e028294..5410cc6cb417 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -228,7 +228,7 @@ async function getFrameworkInfo({ configDir, packageManager: pkgMgr }: Postinsta const { builder, renderer } = core; if (!builder || !renderer) { - throw new Error('Could not detect your storybook framework.'); + throw new Error('Could not detect your Storybook framework.'); } const builderPackageJson = await fs.readFile( From cc42862561e99f8cecbeaafcb30f1ff7e5f8e4d0 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 22 Aug 2024 10:53:09 +0200 Subject: [PATCH 19/30] Correct message --- code/addons/vitest/src/postinstall.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 5410cc6cb417..8fb621830b1d 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -32,7 +32,9 @@ export default async function postInstall(options: PostinstallOptions) { info.frameworkPackageName !== '@storybook/nextjs' && info.builderPackageName !== '@storybook/builder-vite' ) { - logger.info('The Vitest addon can only be used with a Vite-based Storybook framework or Next.js.'); + logger.info( + 'The Vitest addon can only be used with a Vite-based Storybook framework or Next.js.' + ); return; } @@ -108,7 +110,7 @@ export default async function postInstall(options: PostinstallOptions) { if (existsSync(browserWorkspaceFile)) { logger.info( dedent` - We detected that you are using Vitest with workspaces, so we do not have enough information to continue setting up the plugin automatically. + We can not automatically setup the plugin when you use Vitest with workspaces. Please refer to the documentation to complete the setup manually: https://storybook.js.org/docs/writing-tests/test-runner-with-vitest#manual ` From b80775b6d5402e6b7336a9e38e9a49f7ae4ae396 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 22 Aug 2024 12:07:12 +0200 Subject: [PATCH 20/30] Change isolate message --- code/addons/vitest/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 8fb621830b1d..6c34eaa19c1a 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -138,7 +138,7 @@ export default async function postInstall(options: PostinstallOptions) { headless: true, }, // Disabling isolation is faster and is similar to how tests are isolated in storybook itself. - // Consider removing this, if you have flaky tests. + // Consider removing this if you are seeing problems with your tests. isolate: false, setupFiles: ['./.storybook/vitest.setup.ts'], }, From 4d80b1f62cbf7ddcbc4bec59928a14c7d73f82c5 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 22 Aug 2024 12:08:34 +0200 Subject: [PATCH 21/30] Fix code style --- code/addons/vitest/src/postinstall.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 6c34eaa19c1a..9e930a82cc88 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -120,7 +120,7 @@ export default async function postInstall(options: PostinstallOptions) { await writeFile( browserWorkspaceFile, dedent` - import { defineWorkspace } from 'vitest/config' + import { defineWorkspace } from 'vitest/config'; import { storybookTest } from "@storybook/experimental-addon-vitest/plugin"; ${vitestInfo.frameworkPluginImport ? vitestInfo.frameworkPluginImport + '\n' : ''} export default defineWorkspace([ @@ -143,7 +143,7 @@ export default async function postInstall(options: PostinstallOptions) { setupFiles: ['./.storybook/vitest.setup.ts'], }, }, - ]) + ]); ` ); } @@ -172,7 +172,7 @@ export default async function postInstall(options: PostinstallOptions) { isolate: false, setupFiles: ['./.storybook/vitest.setup.ts'], }, - }) + }); ` ); } From 0a35a32cbd1b4213e076c38479329a4ae2724040 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Thu, 22 Aug 2024 15:57:22 +0200 Subject: [PATCH 22/30] Fix more codestyle --- code/addons/vitest/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index 9e930a82cc88..bc47cad6f961 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -121,7 +121,7 @@ export default async function postInstall(options: PostinstallOptions) { browserWorkspaceFile, dedent` import { defineWorkspace } from 'vitest/config'; - import { storybookTest } from "@storybook/experimental-addon-vitest/plugin"; + import { storybookTest } from '@storybook/experimental-addon-vitest/plugin'; ${vitestInfo.frameworkPluginImport ? vitestInfo.frameworkPluginImport + '\n' : ''} export default defineWorkspace([ '${relative(dirname(browserWorkspaceFile), rootConfig)}', From 61338bf3d33e1ac5a890ed5498d1c8ed49ea32e3 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Fri, 23 Aug 2024 14:57:57 +0200 Subject: [PATCH 23/30] Fix default export --- code/addons/vitest/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index bc47cad6f961..eb80b34c3bc4 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -13,7 +13,7 @@ import { } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; -import { findUp } from 'find-up'; +import findUp from 'find-up'; import c from 'tinyrainbow'; import dedent from 'ts-dedent'; From cd8f1f272fd743bc97dde8916f44acbb50af63c5 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Fri, 23 Aug 2024 15:14:34 +0200 Subject: [PATCH 24/30] Fix --- code/addons/vitest/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index eb80b34c3bc4..bc47cad6f961 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -13,7 +13,7 @@ import { } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; -import findUp from 'find-up'; +import { findUp } from 'find-up'; import c from 'tinyrainbow'; import dedent from 'ts-dedent'; From c17df9f8811767be638532bf8c69f5e31759e703 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Fri, 23 Aug 2024 15:54:03 +0200 Subject: [PATCH 25/30] Make renderer nullable --- code/addons/vitest/src/postinstall.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index bc47cad6f961..ca1af611e18e 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -229,8 +229,8 @@ async function getFrameworkInfo({ configDir, packageManager: pkgMgr }: Postinsta const { builder, renderer } = core; - if (!builder || !renderer) { - throw new Error('Could not detect your Storybook framework.'); + if (!builder) { + throw new Error('Could not detect your Storybook builder.'); } const builderPackageJson = await fs.readFile( @@ -239,8 +239,12 @@ async function getFrameworkInfo({ configDir, packageManager: pkgMgr }: Postinsta ); const builderPackageName = JSON.parse(builderPackageJson).name; - const rendererPackageJson = await fs.readFile(`${renderer}/package.json`, 'utf8'); - const rendererPackageName = JSON.parse(rendererPackageJson).name; + let rendererPackageName; + + if (renderer) { + const rendererPackageJson = await fs.readFile(`${renderer}/package.json`, 'utf8'); + rendererPackageName = JSON.parse(rendererPackageJson).name; + } return { frameworkPackageName, From 963014874935ac8d7eadbcbd4902b0f9e7503030 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Fri, 23 Aug 2024 15:56:22 +0200 Subject: [PATCH 26/30] Fix type issues --- code/addons/vitest/src/postinstall.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/vitest/src/postinstall.ts index ca1af611e18e..53361975704b 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/vitest/src/postinstall.ts @@ -44,7 +44,8 @@ export default async function postInstall(options: PostinstallOptions) { '@storybook/sveltekit', ].includes(info.frameworkPackageName) ? info.frameworkPackageName - : ['@storybook/react', '@storybook/svelte', '@storybook/vue3'].includes( + : info.rendererPackageName && + ['@storybook/react', '@storybook/svelte', '@storybook/vue3'].includes( info.rendererPackageName ) ? info.rendererPackageName @@ -239,8 +240,7 @@ async function getFrameworkInfo({ configDir, packageManager: pkgMgr }: Postinsta ); const builderPackageName = JSON.parse(builderPackageJson).name; - let rendererPackageName; - + let rendererPackageName: string | undefined; if (renderer) { const rendererPackageJson = await fs.readFile(`${renderer}/package.json`, 'utf8'); rendererPackageName = JSON.parse(rendererPackageJson).name; From dc9432a31fa9c14635f25887db6dd04978fc5ea4 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Fri, 23 Aug 2024 15:59:08 +0200 Subject: [PATCH 27/30] Throw errors in renderToCanvas in portable stories --- .../src/preview-api/modules/store/csf/portable-stories.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/core/src/preview-api/modules/store/csf/portable-stories.ts b/code/core/src/preview-api/modules/store/csf/portable-stories.ts index f81ec95eca77..1525b6e3e6d8 100644 --- a/code/core/src/preview-api/modules/store/csf/portable-stories.ts +++ b/code/core/src/preview-api/modules/store/csf/portable-stories.ts @@ -165,8 +165,12 @@ export function composeStory {}, - showError: (error) => {}, - showException: (error) => {}, + showError: (error): void => { + throw new Error(`${error.title}\n${error.description}`); + }, + showException: (error): void => { + throw error; + }, forceRemount: true, storyContext: context, storyFn: () => story.unboundStoryFn(context), From befba4f7a814ebcb1ace2a718478c9611f33ea1a Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Fri, 23 Aug 2024 15:19:36 +0000 Subject: [PATCH 28/30] Write changelog for 8.3.0-alpha.9 [skip ci] --- CHANGELOG.prerelease.md | 8 ++++++++ code/package.json | 3 ++- docs/versions/next.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index dc1270061fa3..bade8a334b3a 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,3 +1,11 @@ +## 8.3.0-alpha.9 + +- Addon Viewport: Add default options via parameters - [#28944](https://github.com/storybookjs/storybook/pull/28944), thanks @ndelangen! +- CLI: Make PackageJson optional for starting a dev server - [#28594](https://github.com/storybookjs/storybook/pull/28594), thanks @tobiasdiez! +- Svelte: Fix events not being logged in Actions when a story has decorators - [#28247](https://github.com/storybookjs/storybook/pull/28247), thanks @JReinhold! +- Vitest: Fix default viewport - [#28943](https://github.com/storybookjs/storybook/pull/28943), thanks @kasperpeulen! +- Vitest: Implement add command for vitest addon - [#28920](https://github.com/storybookjs/storybook/pull/28920), thanks @kasperpeulen! + ## 8.3.0-alpha.8 - Addon Vitest: Improve transformation logic to avoid duplicate tests - [#28929](https://github.com/storybookjs/storybook/pull/28929), thanks @yannbf! diff --git a/code/package.json b/code/package.json index 264fb23412bb..d6adab474ae7 100644 --- a/code/package.json +++ b/code/package.json @@ -292,5 +292,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "8.3.0-alpha.9" } diff --git a/docs/versions/next.json b/docs/versions/next.json index 713ecd1b6677..551af3e7b3d7 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"8.3.0-alpha.8","info":{"plain":"- Addon Vitest: Improve transformation logic to avoid duplicate tests - [#28929](https://github.com/storybookjs/storybook/pull/28929), thanks @yannbf!\n- Addon Vitest: Set default viewport if applicable - [#28905](https://github.com/storybookjs/storybook/pull/28905), thanks @yannbf!\n- Addon-docs: Remove babel dependency - [#28915](https://github.com/storybookjs/storybook/pull/28915), thanks @shilman!\n- Blocks: Fix scroll to non-ascii anchors - [#28826](https://github.com/storybookjs/storybook/pull/28826), thanks @SkReD!\n- Core: Introduce setProjectAnnotations API to more renderers and frameworks - [#28907](https://github.com/storybookjs/storybook/pull/28907), thanks @yannbf!\n- Dependencies: Upgrade `commander` - [#28857](https://github.com/storybookjs/storybook/pull/28857), thanks @43081j!\n- SvelteKit: Introduce portable stories support - [#28918](https://github.com/storybookjs/storybook/pull/28918), thanks @yannbf!"}} +{"version":"8.3.0-alpha.9","info":{"plain":"- Addon Viewport: Add default options via parameters - [#28944](https://github.com/storybookjs/storybook/pull/28944), thanks @ndelangen!\n- CLI: Make PackageJson optional for starting a dev server - [#28594](https://github.com/storybookjs/storybook/pull/28594), thanks @tobiasdiez!\n- Svelte: Fix events not being logged in Actions when a story has decorators - [#28247](https://github.com/storybookjs/storybook/pull/28247), thanks @JReinhold!\n- Vitest: Fix default viewport - [#28943](https://github.com/storybookjs/storybook/pull/28943), thanks @kasperpeulen!\n- Vitest: Implement add command for vitest addon - [#28920](https://github.com/storybookjs/storybook/pull/28920), thanks @kasperpeulen!"}} From 6388f93b1f3517b8b0dad3dbd05aa5d5313ee5ae Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:50:39 +0000 Subject: [PATCH 29/30] Bump version from "8.3.0-alpha.8" to "8.3.0-alpha.9" [skip ci] --- code/addons/a11y/package.json | 2 +- code/addons/actions/package.json | 2 +- code/addons/backgrounds/package.json | 2 +- code/addons/controls/package.json | 2 +- code/addons/docs/package.json | 2 +- code/addons/essentials/package.json | 2 +- code/addons/gfm/package.json | 2 +- code/addons/highlight/package.json | 2 +- code/addons/interactions/package.json | 2 +- code/addons/jest/package.json | 2 +- code/addons/links/package.json | 2 +- code/addons/measure/package.json | 2 +- code/addons/onboarding/package.json | 2 +- code/addons/outline/package.json | 2 +- code/addons/storysource/package.json | 2 +- code/addons/themes/package.json | 2 +- code/addons/toolbars/package.json | 2 +- code/addons/viewport/package.json | 2 +- code/addons/vitest/package.json | 2 +- code/builders/builder-vite/package.json | 2 +- code/builders/builder-webpack5/package.json | 2 +- code/core/package.json | 2 +- code/core/src/common/versions.ts | 168 +++++++++--------- code/core/src/manager-api/version.ts | 2 +- code/deprecated/builder-manager/package.json | 2 +- code/deprecated/channels/package.json | 2 +- code/deprecated/client-logger/package.json | 2 +- code/deprecated/components/package.json | 2 +- code/deprecated/core-common/package.json | 2 +- code/deprecated/core-events/package.json | 2 +- code/deprecated/core-server/package.json | 2 +- code/deprecated/csf-tools/package.json | 2 +- code/deprecated/docs-tools/package.json | 2 +- code/deprecated/manager-api/package.json | 2 +- code/deprecated/manager/package.json | 2 +- code/deprecated/node-logger/package.json | 2 +- code/deprecated/preview-api/package.json | 2 +- code/deprecated/preview/package.json | 2 +- code/deprecated/router/package.json | 2 +- code/deprecated/telemetry/package.json | 2 +- code/deprecated/theming/package.json | 2 +- code/deprecated/types/package.json | 2 +- code/frameworks/angular/package.json | 2 +- code/frameworks/ember/package.json | 2 +- .../experimental-nextjs-vite/package.json | 2 +- code/frameworks/html-vite/package.json | 2 +- code/frameworks/html-webpack5/package.json | 2 +- code/frameworks/nextjs/package.json | 2 +- code/frameworks/preact-vite/package.json | 2 +- code/frameworks/preact-webpack5/package.json | 2 +- code/frameworks/react-vite/package.json | 2 +- code/frameworks/react-webpack5/package.json | 2 +- code/frameworks/server-webpack5/package.json | 2 +- code/frameworks/svelte-vite/package.json | 2 +- code/frameworks/svelte-webpack5/package.json | 2 +- code/frameworks/sveltekit/package.json | 2 +- code/frameworks/vue3-vite/package.json | 2 +- code/frameworks/vue3-webpack5/package.json | 2 +- .../web-components-vite/package.json | 2 +- .../web-components-webpack5/package.json | 2 +- code/lib/blocks/package.json | 2 +- code/lib/cli-sb/package.json | 2 +- code/lib/cli-storybook/package.json | 2 +- code/lib/cli/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-webpack/package.json | 2 +- code/lib/create-storybook/package.json | 2 +- code/lib/csf-plugin/package.json | 2 +- code/lib/instrumenter/package.json | 2 +- code/lib/react-dom-shim/package.json | 2 +- code/lib/source-loader/package.json | 2 +- code/lib/test/package.json | 2 +- code/package.json | 5 +- code/presets/create-react-app/package.json | 2 +- code/presets/html-webpack/package.json | 2 +- code/presets/preact-webpack/package.json | 2 +- code/presets/react-webpack/package.json | 2 +- code/presets/server-webpack/package.json | 2 +- code/presets/svelte-webpack/package.json | 2 +- code/presets/vue3-webpack/package.json | 2 +- code/renderers/html/package.json | 2 +- code/renderers/preact/package.json | 2 +- code/renderers/react/package.json | 2 +- code/renderers/server/package.json | 2 +- code/renderers/svelte/package.json | 2 +- code/renderers/vue3/package.json | 2 +- code/renderers/web-components/package.json | 2 +- 87 files changed, 171 insertions(+), 172 deletions(-) diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index b9bbd7e9b36b..c78453b24ccb 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Test component compliance with web accessibility standards", "keywords": [ "a11y", diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index 6492ba9c1470..2278d3a84e0a 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Get UI feedback when an action is performed on an interactive element", "keywords": [ "storybook", diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index 4b6f527b4046..85307e348033 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Switch backgrounds to view components in different settings", "keywords": [ "addon", diff --git a/code/addons/controls/package.json b/code/addons/controls/package.json index 90c76427fa05..4fdb76e8b0ec 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-controls", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Interact with component inputs dynamically in the Storybook UI", "keywords": [ "addon", diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 7bb3c37d7eeb..fa0bc583a9e1 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-docs", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Document component usage and properties in Markdown", "keywords": [ "addon", diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 8e8412169c72..7cb5c79da826 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-essentials", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Curated addons to bring out the best of Storybook", "keywords": [ "addon", diff --git a/code/addons/gfm/package.json b/code/addons/gfm/package.json index 14303544e9ba..10855f148550 100644 --- a/code/addons/gfm/package.json +++ b/code/addons/gfm/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-mdx-gfm", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "GitHub Flavored Markdown in Storybook", "keywords": [ "addon", diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index e32ee03dce50..0d36651dc97e 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-highlight", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Highlight DOM nodes within your stories", "keywords": [ "storybook-addons", diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index 55f6b49ed8a6..ff45389bb1a6 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-interactions", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Automate, test and debug user interactions", "keywords": [ "storybook-addons", diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index 14870360c161..95f9acc57422 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "React storybook addon that show component jest report", "keywords": [ "addon", diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 9b2ad0412d4f..66cdb0d3f049 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Link stories together to build demos and prototypes with your UI components", "keywords": [ "addon", diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index f832bde17f82..c5ddf6ca37e6 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-measure", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Inspect layouts by visualizing the box model", "keywords": [ "storybook-addons", diff --git a/code/addons/onboarding/package.json b/code/addons/onboarding/package.json index 575faa0453b9..eac8d4bd2485 100644 --- a/code/addons/onboarding/package.json +++ b/code/addons/onboarding/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-onboarding", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook Addon Onboarding - Introduces a new onboarding experience", "keywords": [ "storybook-addons", diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index 59e1db835842..d28d030433f3 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-outline", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Outline all elements with CSS to help with layout placement and alignment", "keywords": [ "storybook-addons", diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json index e36c6a11f684..0ddabfc47a61 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storysource", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "View a story’s source code to see how it works and paste into your app", "keywords": [ "addon", diff --git a/code/addons/themes/package.json b/code/addons/themes/package.json index e3cddfdc1c38..c590219d1516 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-themes", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Switch between multiple themes for you components in Storybook", "keywords": [ "css", diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index 7746bf812d49..200ad64dc4b2 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-toolbars", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Create your own toolbar items that control story rendering", "keywords": [ "addon", diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index c3d885b48607..90cdbfd2c610 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-viewport", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Build responsive components by adjusting Storybook’s viewport size and orientation", "keywords": [ "addon", diff --git a/code/addons/vitest/package.json b/code/addons/vitest/package.json index 7b701bbfe643..3e248705f024 100644 --- a/code/addons/vitest/package.json +++ b/code/addons/vitest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/experimental-addon-vitest", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Integrate Vitest with Storybook", "keywords": [ "storybook-addons", diff --git a/code/builders/builder-vite/package.json b/code/builders/builder-vite/package.json index 947994ae4036..6d569d4a3bfd 100644 --- a/code/builders/builder-vite/package.json +++ b/code/builders/builder-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-vite", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "A plugin to run and build Storybooks with Vite", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/builders/builder-vite/#readme", "bugs": { diff --git a/code/builders/builder-webpack5/package.json b/code/builders/builder-webpack5/package.json index 8056638e3f45..1d93c339e041 100644 --- a/code/builders/builder-webpack5/package.json +++ b/code/builders/builder-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-webpack5", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/core/package.json b/code/core/package.json index effd375ae4eb..d755d3e7396e 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/core/src/common/versions.ts b/code/core/src/common/versions.ts index 7d34273f3e04..46e8f0eecbf6 100644 --- a/code/core/src/common/versions.ts +++ b/code/core/src/common/versions.ts @@ -1,87 +1,87 @@ // auto generated file, do not edit export default { - '@storybook/addon-a11y': '8.3.0-alpha.8', - '@storybook/addon-actions': '8.3.0-alpha.8', - '@storybook/addon-backgrounds': '8.3.0-alpha.8', - '@storybook/addon-controls': '8.3.0-alpha.8', - '@storybook/addon-docs': '8.3.0-alpha.8', - '@storybook/addon-essentials': '8.3.0-alpha.8', - '@storybook/addon-mdx-gfm': '8.3.0-alpha.8', - '@storybook/addon-highlight': '8.3.0-alpha.8', - '@storybook/addon-interactions': '8.3.0-alpha.8', - '@storybook/addon-jest': '8.3.0-alpha.8', - '@storybook/addon-links': '8.3.0-alpha.8', - '@storybook/addon-measure': '8.3.0-alpha.8', - '@storybook/addon-onboarding': '8.3.0-alpha.8', - '@storybook/addon-outline': '8.3.0-alpha.8', - '@storybook/addon-storysource': '8.3.0-alpha.8', - '@storybook/addon-themes': '8.3.0-alpha.8', - '@storybook/addon-toolbars': '8.3.0-alpha.8', - '@storybook/addon-viewport': '8.3.0-alpha.8', - '@storybook/experimental-addon-vitest': '8.3.0-alpha.8', - '@storybook/builder-vite': '8.3.0-alpha.8', - '@storybook/builder-webpack5': '8.3.0-alpha.8', - '@storybook/core': '8.3.0-alpha.8', - '@storybook/builder-manager': '8.3.0-alpha.8', - '@storybook/channels': '8.3.0-alpha.8', - '@storybook/client-logger': '8.3.0-alpha.8', - '@storybook/components': '8.3.0-alpha.8', - '@storybook/core-common': '8.3.0-alpha.8', - '@storybook/core-events': '8.3.0-alpha.8', - '@storybook/core-server': '8.3.0-alpha.8', - '@storybook/csf-tools': '8.3.0-alpha.8', - '@storybook/docs-tools': '8.3.0-alpha.8', - '@storybook/manager': '8.3.0-alpha.8', - '@storybook/manager-api': '8.3.0-alpha.8', - '@storybook/node-logger': '8.3.0-alpha.8', - '@storybook/preview': '8.3.0-alpha.8', - '@storybook/preview-api': '8.3.0-alpha.8', - '@storybook/router': '8.3.0-alpha.8', - '@storybook/telemetry': '8.3.0-alpha.8', - '@storybook/theming': '8.3.0-alpha.8', - '@storybook/types': '8.3.0-alpha.8', - '@storybook/angular': '8.3.0-alpha.8', - '@storybook/ember': '8.3.0-alpha.8', - '@storybook/experimental-nextjs-vite': '8.3.0-alpha.8', - '@storybook/html-vite': '8.3.0-alpha.8', - '@storybook/html-webpack5': '8.3.0-alpha.8', - '@storybook/nextjs': '8.3.0-alpha.8', - '@storybook/preact-vite': '8.3.0-alpha.8', - '@storybook/preact-webpack5': '8.3.0-alpha.8', - '@storybook/react-vite': '8.3.0-alpha.8', - '@storybook/react-webpack5': '8.3.0-alpha.8', - '@storybook/server-webpack5': '8.3.0-alpha.8', - '@storybook/svelte-vite': '8.3.0-alpha.8', - '@storybook/svelte-webpack5': '8.3.0-alpha.8', - '@storybook/sveltekit': '8.3.0-alpha.8', - '@storybook/vue3-vite': '8.3.0-alpha.8', - '@storybook/vue3-webpack5': '8.3.0-alpha.8', - '@storybook/web-components-vite': '8.3.0-alpha.8', - '@storybook/web-components-webpack5': '8.3.0-alpha.8', - '@storybook/blocks': '8.3.0-alpha.8', - storybook: '8.3.0-alpha.8', - sb: '8.3.0-alpha.8', - '@storybook/cli': '8.3.0-alpha.8', - '@storybook/codemod': '8.3.0-alpha.8', - '@storybook/core-webpack': '8.3.0-alpha.8', - 'create-storybook': '8.3.0-alpha.8', - '@storybook/csf-plugin': '8.3.0-alpha.8', - '@storybook/instrumenter': '8.3.0-alpha.8', - '@storybook/react-dom-shim': '8.3.0-alpha.8', - '@storybook/source-loader': '8.3.0-alpha.8', - '@storybook/test': '8.3.0-alpha.8', - '@storybook/preset-create-react-app': '8.3.0-alpha.8', - '@storybook/preset-html-webpack': '8.3.0-alpha.8', - '@storybook/preset-preact-webpack': '8.3.0-alpha.8', - '@storybook/preset-react-webpack': '8.3.0-alpha.8', - '@storybook/preset-server-webpack': '8.3.0-alpha.8', - '@storybook/preset-svelte-webpack': '8.3.0-alpha.8', - '@storybook/preset-vue3-webpack': '8.3.0-alpha.8', - '@storybook/html': '8.3.0-alpha.8', - '@storybook/preact': '8.3.0-alpha.8', - '@storybook/react': '8.3.0-alpha.8', - '@storybook/server': '8.3.0-alpha.8', - '@storybook/svelte': '8.3.0-alpha.8', - '@storybook/vue3': '8.3.0-alpha.8', - '@storybook/web-components': '8.3.0-alpha.8', + '@storybook/addon-a11y': '8.3.0-alpha.9', + '@storybook/addon-actions': '8.3.0-alpha.9', + '@storybook/addon-backgrounds': '8.3.0-alpha.9', + '@storybook/addon-controls': '8.3.0-alpha.9', + '@storybook/addon-docs': '8.3.0-alpha.9', + '@storybook/addon-essentials': '8.3.0-alpha.9', + '@storybook/addon-mdx-gfm': '8.3.0-alpha.9', + '@storybook/addon-highlight': '8.3.0-alpha.9', + '@storybook/addon-interactions': '8.3.0-alpha.9', + '@storybook/addon-jest': '8.3.0-alpha.9', + '@storybook/addon-links': '8.3.0-alpha.9', + '@storybook/addon-measure': '8.3.0-alpha.9', + '@storybook/addon-onboarding': '8.3.0-alpha.9', + '@storybook/addon-outline': '8.3.0-alpha.9', + '@storybook/addon-storysource': '8.3.0-alpha.9', + '@storybook/addon-themes': '8.3.0-alpha.9', + '@storybook/addon-toolbars': '8.3.0-alpha.9', + '@storybook/addon-viewport': '8.3.0-alpha.9', + '@storybook/experimental-addon-vitest': '8.3.0-alpha.9', + '@storybook/builder-vite': '8.3.0-alpha.9', + '@storybook/builder-webpack5': '8.3.0-alpha.9', + '@storybook/core': '8.3.0-alpha.9', + '@storybook/builder-manager': '8.3.0-alpha.9', + '@storybook/channels': '8.3.0-alpha.9', + '@storybook/client-logger': '8.3.0-alpha.9', + '@storybook/components': '8.3.0-alpha.9', + '@storybook/core-common': '8.3.0-alpha.9', + '@storybook/core-events': '8.3.0-alpha.9', + '@storybook/core-server': '8.3.0-alpha.9', + '@storybook/csf-tools': '8.3.0-alpha.9', + '@storybook/docs-tools': '8.3.0-alpha.9', + '@storybook/manager': '8.3.0-alpha.9', + '@storybook/manager-api': '8.3.0-alpha.9', + '@storybook/node-logger': '8.3.0-alpha.9', + '@storybook/preview': '8.3.0-alpha.9', + '@storybook/preview-api': '8.3.0-alpha.9', + '@storybook/router': '8.3.0-alpha.9', + '@storybook/telemetry': '8.3.0-alpha.9', + '@storybook/theming': '8.3.0-alpha.9', + '@storybook/types': '8.3.0-alpha.9', + '@storybook/angular': '8.3.0-alpha.9', + '@storybook/ember': '8.3.0-alpha.9', + '@storybook/experimental-nextjs-vite': '8.3.0-alpha.9', + '@storybook/html-vite': '8.3.0-alpha.9', + '@storybook/html-webpack5': '8.3.0-alpha.9', + '@storybook/nextjs': '8.3.0-alpha.9', + '@storybook/preact-vite': '8.3.0-alpha.9', + '@storybook/preact-webpack5': '8.3.0-alpha.9', + '@storybook/react-vite': '8.3.0-alpha.9', + '@storybook/react-webpack5': '8.3.0-alpha.9', + '@storybook/server-webpack5': '8.3.0-alpha.9', + '@storybook/svelte-vite': '8.3.0-alpha.9', + '@storybook/svelte-webpack5': '8.3.0-alpha.9', + '@storybook/sveltekit': '8.3.0-alpha.9', + '@storybook/vue3-vite': '8.3.0-alpha.9', + '@storybook/vue3-webpack5': '8.3.0-alpha.9', + '@storybook/web-components-vite': '8.3.0-alpha.9', + '@storybook/web-components-webpack5': '8.3.0-alpha.9', + '@storybook/blocks': '8.3.0-alpha.9', + storybook: '8.3.0-alpha.9', + sb: '8.3.0-alpha.9', + '@storybook/cli': '8.3.0-alpha.9', + '@storybook/codemod': '8.3.0-alpha.9', + '@storybook/core-webpack': '8.3.0-alpha.9', + 'create-storybook': '8.3.0-alpha.9', + '@storybook/csf-plugin': '8.3.0-alpha.9', + '@storybook/instrumenter': '8.3.0-alpha.9', + '@storybook/react-dom-shim': '8.3.0-alpha.9', + '@storybook/source-loader': '8.3.0-alpha.9', + '@storybook/test': '8.3.0-alpha.9', + '@storybook/preset-create-react-app': '8.3.0-alpha.9', + '@storybook/preset-html-webpack': '8.3.0-alpha.9', + '@storybook/preset-preact-webpack': '8.3.0-alpha.9', + '@storybook/preset-react-webpack': '8.3.0-alpha.9', + '@storybook/preset-server-webpack': '8.3.0-alpha.9', + '@storybook/preset-svelte-webpack': '8.3.0-alpha.9', + '@storybook/preset-vue3-webpack': '8.3.0-alpha.9', + '@storybook/html': '8.3.0-alpha.9', + '@storybook/preact': '8.3.0-alpha.9', + '@storybook/react': '8.3.0-alpha.9', + '@storybook/server': '8.3.0-alpha.9', + '@storybook/svelte': '8.3.0-alpha.9', + '@storybook/vue3': '8.3.0-alpha.9', + '@storybook/web-components': '8.3.0-alpha.9', }; diff --git a/code/core/src/manager-api/version.ts b/code/core/src/manager-api/version.ts index 8591402a6893..fcfb97d79bc9 100644 --- a/code/core/src/manager-api/version.ts +++ b/code/core/src/manager-api/version.ts @@ -1 +1 @@ -export const version = '8.3.0-alpha.8'; +export const version = '8.3.0-alpha.9'; diff --git a/code/deprecated/builder-manager/package.json b/code/deprecated/builder-manager/package.json index a8a552924ecb..741de015ffc6 100644 --- a/code/deprecated/builder-manager/package.json +++ b/code/deprecated/builder-manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/builder-manager", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook manager builder", "keywords": [ "storybook" diff --git a/code/deprecated/channels/package.json b/code/deprecated/channels/package.json index ec1c97fa0f95..31b1c2ecc0e7 100644 --- a/code/deprecated/channels/package.json +++ b/code/deprecated/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/client-logger/package.json b/code/deprecated/client-logger/package.json index 2f23329ebbaa..8cdce6b2835e 100644 --- a/code/deprecated/client-logger/package.json +++ b/code/deprecated/client-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/client-logger", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/components/package.json b/code/deprecated/components/package.json index 838443b3f395..53030804ea28 100644 --- a/code/deprecated/components/package.json +++ b/code/deprecated/components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/components", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/deprecated/core-common/package.json b/code/deprecated/core-common/package.json index 5f9d9161c49b..8bd55dac1b0d 100644 --- a/code/deprecated/core-common/package.json +++ b/code/deprecated/core-common/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-common", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/deprecated/core-events/package.json b/code/deprecated/core-events/package.json index 7f822435388d..4606ab7891c1 100644 --- a/code/deprecated/core-events/package.json +++ b/code/deprecated/core-events/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-events", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Event names used in storybook core", "keywords": [ "storybook" diff --git a/code/deprecated/core-server/package.json b/code/deprecated/core-server/package.json index 648ca541e8ad..675f2f9bef16 100644 --- a/code/deprecated/core-server/package.json +++ b/code/deprecated/core-server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-server", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/deprecated/csf-tools/package.json b/code/deprecated/csf-tools/package.json index 7e58684f51c5..e1fff9e1ec56 100644 --- a/code/deprecated/csf-tools/package.json +++ b/code/deprecated/csf-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-tools", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Parse and manipulate CSF and Storybook config files", "keywords": [ "storybook" diff --git a/code/deprecated/docs-tools/package.json b/code/deprecated/docs-tools/package.json index 48742f0ee41c..4057026a9b8a 100644 --- a/code/deprecated/docs-tools/package.json +++ b/code/deprecated/docs-tools/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/docs-tools", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Shared utility functions for frameworks to implement docs", "keywords": [ "storybook" diff --git a/code/deprecated/manager-api/package.json b/code/deprecated/manager-api/package.json index 0fb9d07b011b..eae2b11b9dd1 100644 --- a/code/deprecated/manager-api/package.json +++ b/code/deprecated/manager-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager-api", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Core Storybook Manager API & Context", "keywords": [ "storybook" diff --git a/code/deprecated/manager/package.json b/code/deprecated/manager/package.json index 97af7701c669..8515a7e70ed7 100644 --- a/code/deprecated/manager/package.json +++ b/code/deprecated/manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Core Storybook UI", "keywords": [ "storybook" diff --git a/code/deprecated/node-logger/package.json b/code/deprecated/node-logger/package.json index 3892216e9e2c..849141c5a115 100644 --- a/code/deprecated/node-logger/package.json +++ b/code/deprecated/node-logger/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/node-logger", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/preview-api/package.json b/code/deprecated/preview-api/package.json index e9b5ddeba708..fd6a3923f1a5 100644 --- a/code/deprecated/preview-api/package.json +++ b/code/deprecated/preview-api/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview-api", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/preview/package.json b/code/deprecated/preview/package.json index adb7c3c81052..11834442b277 100644 --- a/code/deprecated/preview/package.json +++ b/code/deprecated/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "", "keywords": [ "storybook" diff --git a/code/deprecated/router/package.json b/code/deprecated/router/package.json index 6132c57066fa..9476923475b5 100644 --- a/code/deprecated/router/package.json +++ b/code/deprecated/router/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/router", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Core Storybook Router", "keywords": [ "storybook" diff --git a/code/deprecated/telemetry/package.json b/code/deprecated/telemetry/package.json index 30ecdeeaa234..9ae7c8f46091 100644 --- a/code/deprecated/telemetry/package.json +++ b/code/deprecated/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/telemetry", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Telemetry logging for crash reports and usage statistics", "keywords": [ "storybook" diff --git a/code/deprecated/theming/package.json b/code/deprecated/theming/package.json index 1cc798105e14..67729f9a9cce 100644 --- a/code/deprecated/theming/package.json +++ b/code/deprecated/theming/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/theming", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Core Storybook Components", "keywords": [ "storybook" diff --git a/code/deprecated/types/package.json b/code/deprecated/types/package.json index 27edb82f7cc8..475ca5046827 100644 --- a/code/deprecated/types/package.json +++ b/code/deprecated/types/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/types", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Core Storybook TS Types", "keywords": [ "storybook" diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index f2d69c1bb486..84da83fbc535 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/angular", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.", "keywords": [ "storybook", diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index 8d3fa6c041fa..685a9a48b933 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ember", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember", "bugs": { diff --git a/code/frameworks/experimental-nextjs-vite/package.json b/code/frameworks/experimental-nextjs-vite/package.json index f315b6f6898a..9055435fa679 100644 --- a/code/frameworks/experimental-nextjs-vite/package.json +++ b/code/frameworks/experimental-nextjs-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/experimental-nextjs-vite", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Next.js and Vite", "keywords": [ "storybook", diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json index 7b1071e4c55d..a375655767e3 100644 --- a/code/frameworks/html-vite/package.json +++ b/code/frameworks/html-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-vite", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json index 7714acf2a4bd..e0ace579f3e8 100644 --- a/code/frameworks/html-webpack5/package.json +++ b/code/frameworks/html-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html-webpack5", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index 4ce22c999821..38d94fd6f8d3 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/nextjs", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Next.js", "keywords": [ "storybook", diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index 2fedc83b4eb9..1696c25ea413 100644 --- a/code/frameworks/preact-vite/package.json +++ b/code/frameworks/preact-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-vite", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json index 9e38888a34f2..c5fde21aca41 100644 --- a/code/frameworks/preact-webpack5/package.json +++ b/code/frameworks/preact-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact-webpack5", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index 58ab1807a44a..37aee2e2bb69 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-vite", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index 4aebcfb2e0ff..5ceece70c284 100644 --- a/code/frameworks/react-webpack5/package.json +++ b/code/frameworks/react-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-webpack5", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index 0ec0727ab3e3..872588c98882 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server-webpack5", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 5d16799c6bc1..db8d8a6da5a8 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-vite", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index 4cbe325c9bf7..fe6edb61d145 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte-webpack5", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index fbda7a15e7b6..69d34b05bf5c 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/sveltekit", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for SvelteKit", "keywords": [ "storybook", diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index b0f642dcc3b3..b3db60cc8ed3 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-vite", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json index b6abcba92c76..f4d98fd007d4 100644 --- a/code/frameworks/vue3-webpack5/package.json +++ b/code/frameworks/vue3-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3-webpack5", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index 2731203bd7d1..f04a629d0b98 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-vite", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index 1de250c85012..a4349120c5eb 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components-webpack5", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", "keywords": [ "lit", diff --git a/code/lib/blocks/package.json b/code/lib/blocks/package.json index f68d7244b3f1..b25daeccad76 100644 --- a/code/lib/blocks/package.json +++ b/code/lib/blocks/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/blocks", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook Doc Blocks", "keywords": [ "storybook" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index 372305e0eb31..e3d7f4792719 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -1,6 +1,6 @@ { "name": "sb", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index 30185ff76b41..7a310545aa47 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook CLI", "keywords": [ "storybook" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index afb3a0e9f34c..a4a7fee38213 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook's CLI - install, dev, build, upgrade, and more", "keywords": [ "cli", diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 603f7c7af563..6dfc57fde0b0 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "A collection of codemod scripts written with JSCodeshift", "keywords": [ "storybook" diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index b3fae73eb6fd..c6168f02a895 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/core-webpack", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook framework-agnostic API", "keywords": [ "storybook" diff --git a/code/lib/create-storybook/package.json b/code/lib/create-storybook/package.json index 850795db0a17..ff5ced6f0b14 100644 --- a/code/lib/create-storybook/package.json +++ b/code/lib/create-storybook/package.json @@ -1,6 +1,6 @@ { "name": "create-storybook", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Initialize Storybook into your project", "homepage": "https://github.com/storybookjs/storybook/tree/next/code/lib/create-storybook", "bugs": { diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index 76a60f21fd11..261ab9b253ef 100644 --- a/code/lib/csf-plugin/package.json +++ b/code/lib/csf-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/csf-plugin", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Enrich CSF files via static analysis", "keywords": [ "storybook" diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index 6bfc123382da..947eb7ec83ef 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/instrumenter", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "", "keywords": [ "storybook" diff --git a/code/lib/react-dom-shim/package.json b/code/lib/react-dom-shim/package.json index b5477c02d0e9..ac162d6e4787 100644 --- a/code/lib/react-dom-shim/package.json +++ b/code/lib/react-dom-shim/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-dom-shim", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "", "keywords": [ "storybook" diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 5966970af9db..d6d4c41d140b 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/source-loader", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Source loader", "keywords": [ "lib", diff --git a/code/lib/test/package.json b/code/lib/test/package.json index b9a15099a7cd..b671628cebcd 100644 --- a/code/lib/test/package.json +++ b/code/lib/test/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/test", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "", "keywords": [ "storybook" diff --git a/code/package.json b/code/package.json index d6adab474ae7..8a8c3bc09300 100644 --- a/code/package.json +++ b/code/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/root", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "private": true, "description": "Storybook root", "homepage": "https://storybook.js.org/", @@ -292,6 +292,5 @@ "Dependency Upgrades" ] ] - }, - "deferredNextVersion": "8.3.0-alpha.9" + } } diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index 8b6bcc00b984..2b3e21bfab37 100644 --- a/code/presets/create-react-app/package.json +++ b/code/presets/create-react-app/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-create-react-app", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Create React App preset", "keywords": [ "storybook" diff --git a/code/presets/html-webpack/package.json b/code/presets/html-webpack/package.json index b9c3a6ffeaad..ee625d26b5b7 100644 --- a/code/presets/html-webpack/package.json +++ b/code/presets/html-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-html-webpack", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/preact-webpack/package.json b/code/presets/preact-webpack/package.json index a08cf6d25226..b1791283456e 100644 --- a/code/presets/preact-webpack/package.json +++ b/code/presets/preact-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-preact-webpack", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Preact: Develop Preact Component in isolation.", "keywords": [ "storybook" diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index 91639cecca25..a37637d8c26f 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-react-webpack", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading", "keywords": [ "storybook" diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index 649baeedded6..98a3bcc52e87 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-server-webpack", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index 584675e82a4e..f43c3b2e68c6 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-svelte-webpack", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/presets/vue3-webpack/package.json b/code/presets/vue3-webpack/package.json index 0ca4c7fbadf4..717912268650 100644 --- a/code/presets/vue3-webpack/package.json +++ b/code/presets/vue3-webpack/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preset-vue3-webpack", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", "keywords": [ "storybook" diff --git a/code/renderers/html/package.json b/code/renderers/html/package.json index 48a13a3ce77b..6ed98418062e 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/html", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook HTML renderer", "keywords": [ "storybook" diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index 3a5605467584..c16c248ec584 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preact", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook Preact renderer", "keywords": [ "storybook" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index 192d05aa9d80..e10377849d98 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook React renderer", "keywords": [ "storybook" diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 2ff56e3de60e..0bf575ea30fa 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/server", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook Server renderer", "keywords": [ "storybook" diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index ee3378a6df04..a9138e9aac82 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/svelte", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook Svelte renderer", "keywords": [ "storybook" diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index 5d8f03ff5fbb..3e9522273cf9 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue3", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook Vue 3 renderer", "keywords": [ "storybook" diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index eb61cbdb5c2b..17b987295abf 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/web-components", - "version": "8.3.0-alpha.8", + "version": "8.3.0-alpha.9", "description": "Storybook web-components renderer", "keywords": [ "lit", From 4419ab2fce100d287ec8b5aa01db9c81151f0e0d Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Mon, 26 Aug 2024 08:50:26 +0200 Subject: [PATCH 30/30] sync `@testing-library/jest-dom` to `6.5.0` --- code/lib/test/package.json | 2 +- code/package.json | 2 +- code/renderers/svelte/package.json | 1 - code/yarn.lock | 16 +++++++--------- .../react/package.json | 4 ++-- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/code/lib/test/package.json b/code/lib/test/package.json index b671628cebcd..4465f9a0311b 100644 --- a/code/lib/test/package.json +++ b/code/lib/test/package.json @@ -48,7 +48,7 @@ "@storybook/global": "^5.0.0", "@storybook/instrumenter": "workspace:*", "@testing-library/dom": "10.4.0", - "@testing-library/jest-dom": "6.4.8", + "@testing-library/jest-dom": "6.5.0", "@testing-library/user-event": "14.5.2", "@vitest/expect": "2.0.5", "@vitest/spy": "2.0.5", diff --git a/code/package.json b/code/package.json index 8a8c3bc09300..8ecf3e22fa18 100644 --- a/code/package.json +++ b/code/package.json @@ -161,7 +161,7 @@ "@storybook/web-components-vite": "workspace:*", "@storybook/web-components-webpack5": "workspace:*", "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.4.8", + "@testing-library/jest-dom": "^6.5.0", "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.2", "@trivago/prettier-plugin-sort-imports": "^4.3.0", diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index a9138e9aac82..9dd6bbe3f5ca 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -68,7 +68,6 @@ }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.0.2", - "@testing-library/jest-dom": "^6.4.1", "@testing-library/svelte": "patch:@testing-library/svelte@npm%3A4.1.0#~/.yarn/patches/@testing-library-svelte-npm-4.1.0-34b7037bc0.patch", "expect-type": "^0.15.0", "fs-extra": "^11.1.0", diff --git a/code/yarn.lock b/code/yarn.lock index 9a26af3780c1..c49c03d61022 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -2229,7 +2229,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.22.15, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.24.4, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.22.15, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.24.4, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7": version: 7.24.7 resolution: "@babel/runtime@npm:7.24.7" dependencies: @@ -6757,7 +6757,7 @@ __metadata: "@storybook/web-components-vite": "workspace:*" "@storybook/web-components-webpack5": "workspace:*" "@testing-library/dom": "npm:^10.4.0" - "@testing-library/jest-dom": "npm:^6.4.8" + "@testing-library/jest-dom": "npm:^6.5.0" "@testing-library/react": "npm:^16.0.0" "@testing-library/user-event": "npm:^14.5.2" "@trivago/prettier-plugin-sort-imports": "npm:^4.3.0" @@ -6943,7 +6943,6 @@ __metadata: "@storybook/preview-api": "workspace:^" "@storybook/theming": "workspace:^" "@sveltejs/vite-plugin-svelte": "npm:^3.0.2" - "@testing-library/jest-dom": "npm:^6.4.1" "@testing-library/svelte": "patch:@testing-library/svelte@npm%3A4.1.0#~/.yarn/patches/@testing-library-svelte-npm-4.1.0-34b7037bc0.patch" expect-type: "npm:^0.15.0" fs-extra: "npm:^11.1.0" @@ -6993,7 +6992,7 @@ __metadata: "@storybook/global": "npm:^5.0.0" "@storybook/instrumenter": "workspace:*" "@testing-library/dom": "npm:10.4.0" - "@testing-library/jest-dom": "npm:6.4.8" + "@testing-library/jest-dom": "npm:6.5.0" "@testing-library/user-event": "npm:14.5.2" "@vitest/expect": "npm:2.0.5" "@vitest/spy": "npm:2.0.5" @@ -7260,19 +7259,18 @@ __metadata: languageName: node linkType: hard -"@testing-library/jest-dom@npm:6.4.8, @testing-library/jest-dom@npm:^6.4.1, @testing-library/jest-dom@npm:^6.4.8": - version: 6.4.8 - resolution: "@testing-library/jest-dom@npm:6.4.8" +"@testing-library/jest-dom@npm:6.5.0, @testing-library/jest-dom@npm:^6.5.0": + version: 6.5.0 + resolution: "@testing-library/jest-dom@npm:6.5.0" dependencies: "@adobe/css-tools": "npm:^4.4.0" - "@babel/runtime": "npm:^7.9.2" aria-query: "npm:^5.0.0" chalk: "npm:^3.0.0" css.escape: "npm:^1.5.1" dom-accessibility-api: "npm:^0.6.3" lodash: "npm:^4.17.21" redent: "npm:^3.0.0" - checksum: 10c0/8eececcac1ec7728c038b9d9eabfc8b8dcf4dc1e997c959450bff16d946e3344275862b84bfe0e1d1beb3817368e782464816aca47ab5c94f0ebf66db71df55d + checksum: 10c0/fd5936a547f04608d8de15a7de3ae26516f21023f8f45169b10c8c8847015fd20ec259b7309f08aa1031bcbc37c6e5e6f532d1bb85ef8f91bad654193ec66a4c languageName: node linkType: hard diff --git a/test-storybooks/portable-stories-kitchen-sink/react/package.json b/test-storybooks/portable-stories-kitchen-sink/react/package.json index ec7ce8e41a90..721bb82cded4 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react/package.json @@ -95,7 +95,7 @@ "@storybook/test": "^8.0.0", "@swc/core": "^1.4.2", "@swc/jest": "^0.2.36", - "@testing-library/jest-dom": "^6.4.0", + "@testing-library/jest-dom": "^6.5.0", "@testing-library/react": "^14.2.1", "@types/identity-obj-proxy": "^3", "@types/react": "^18.2.55", @@ -115,4 +115,4 @@ "typescript": "^5.2.2", "vite": "^5.1.1" } -} \ No newline at end of file +}