From 4d5447cfbc37c410a33e9a46e23b5380e7b06d19 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 30 Aug 2024 16:56:09 +0200 Subject: [PATCH 1/4] Rename addon vitest to addon test --- code/.storybook/main.ts | 2 +- code/.storybook/vitest.config.ts | 2 +- code/addons/{vitest => test}/README.md | 0 code/addons/{vitest => test}/package.json | 4 ++-- code/addons/{vitest => test}/postinstall.cjs | 0 code/addons/{vitest => test}/preset.cjs | 0 code/addons/{vitest => test}/project.json | 4 ++-- code/addons/{vitest => test}/src/constants.ts | 0 code/addons/{vitest => test}/src/index.ts | 0 code/addons/{vitest => test}/src/manager.tsx | 0 .../src/plugin/global-setup.ts | 0 .../{vitest => test}/src/plugin/index.ts | 6 ++--- .../src/plugin/setup-file.test.ts | 0 .../{vitest => test}/src/plugin/setup-file.ts | 0 .../{vitest => test}/src/plugin/test-utils.ts | 0 .../{vitest => test}/src/plugin/types.ts | 0 .../src/plugin/viewports.test.ts | 0 .../{vitest => test}/src/plugin/viewports.ts | 0 .../{vitest => test}/src/postinstall.ts | 4 ++-- code/addons/{vitest => test}/src/preset.ts | 0 code/addons/{vitest => test}/tsconfig.json | 0 code/addons/{vitest => test}/typings.d.ts | 0 code/addons/{vitest => test}/vitest.config.ts | 0 code/core/src/common/versions.ts | 2 +- .../vitest-plugin/transformer.test.ts | 24 +++++++++---------- .../csf-tools/vitest-plugin/transformer.ts | 2 +- code/package.json | 2 +- code/yarn.lock | 6 ++--- scripts/tasks/sandbox-parts.ts | 4 ++-- scripts/tasks/sandbox.ts | 2 +- 30 files changed, 32 insertions(+), 32 deletions(-) rename code/addons/{vitest => test}/README.md (100%) rename code/addons/{vitest => test}/package.json (97%) rename code/addons/{vitest => test}/postinstall.cjs (100%) rename code/addons/{vitest => test}/preset.cjs (100%) rename code/addons/{vitest => test}/project.json (83%) rename code/addons/{vitest => test}/src/constants.ts (100%) rename code/addons/{vitest => test}/src/index.ts (100%) rename code/addons/{vitest => test}/src/manager.tsx (100%) rename code/addons/{vitest => test}/src/plugin/global-setup.ts (100%) rename code/addons/{vitest => test}/src/plugin/index.ts (98%) rename code/addons/{vitest => test}/src/plugin/setup-file.test.ts (100%) rename code/addons/{vitest => test}/src/plugin/setup-file.ts (100%) rename code/addons/{vitest => test}/src/plugin/test-utils.ts (100%) rename code/addons/{vitest => test}/src/plugin/types.ts (100%) rename code/addons/{vitest => test}/src/plugin/viewports.test.ts (100%) rename code/addons/{vitest => test}/src/plugin/viewports.ts (100%) rename code/addons/{vitest => test}/src/postinstall.ts (99%) rename code/addons/{vitest => test}/src/preset.ts (100%) rename code/addons/{vitest => test}/tsconfig.json (100%) rename code/addons/{vitest => test}/typings.d.ts (100%) rename code/addons/{vitest => test}/vitest.config.ts (100%) diff --git a/code/.storybook/main.ts b/code/.storybook/main.ts index e3f8e6b53f34..a4cedde66608 100644 --- a/code/.storybook/main.ts +++ b/code/.storybook/main.ts @@ -91,7 +91,7 @@ const config: StorybookConfig = { '@storybook/addon-interactions', '@storybook/addon-storysource', '@storybook/addon-designs', - '@storybook/experimental-addon-vitest', + '@storybook/experimental-addon-test', '@storybook/addon-a11y', '@chromatic-com/storybook', ], diff --git a/code/.storybook/vitest.config.ts b/code/.storybook/vitest.config.ts index 4e7c8fdd87d2..a6120deed897 100644 --- a/code/.storybook/vitest.config.ts +++ b/code/.storybook/vitest.config.ts @@ -21,7 +21,7 @@ export default mergeConfig( vitestCommonConfig, defineProject({ plugins: [ - import('@storybook/experimental-addon-vitest/plugin').then(({ storybookTest }) => + import('@storybook/experimental-addon-test/vite-plugin').then(({ storybookTest }) => storybookTest({ configDir: process.cwd(), }) diff --git a/code/addons/vitest/README.md b/code/addons/test/README.md similarity index 100% rename from code/addons/vitest/README.md rename to code/addons/test/README.md diff --git a/code/addons/vitest/package.json b/code/addons/test/package.json similarity index 97% rename from code/addons/vitest/package.json rename to code/addons/test/package.json index fd4c94863253..8a23fa54c7a4 100644 --- a/code/addons/vitest/package.json +++ b/code/addons/test/package.json @@ -1,5 +1,5 @@ { - "name": "@storybook/experimental-addon-vitest", + "name": "@storybook/experimental-addon-test", "version": "8.3.0-beta.0", "description": "Integrate Vitest with Storybook", "keywords": [ @@ -29,7 +29,7 @@ "import": "./dist/index.js", "require": "./dist/index.cjs" }, - "./plugin": { + "./vite-plugin": { "types": "./dist/plugin/index.d.ts", "import": "./dist/plugin/index.js", "require": "./dist/plugin/index.cjs" diff --git a/code/addons/vitest/postinstall.cjs b/code/addons/test/postinstall.cjs similarity index 100% rename from code/addons/vitest/postinstall.cjs rename to code/addons/test/postinstall.cjs diff --git a/code/addons/vitest/preset.cjs b/code/addons/test/preset.cjs similarity index 100% rename from code/addons/vitest/preset.cjs rename to code/addons/test/preset.cjs diff --git a/code/addons/vitest/project.json b/code/addons/test/project.json similarity index 83% rename from code/addons/vitest/project.json rename to code/addons/test/project.json index 71cca948ed01..f9278931287c 100644 --- a/code/addons/vitest/project.json +++ b/code/addons/test/project.json @@ -1,8 +1,8 @@ { - "name": "vitest", + "name": "addon-test", "$schema": "../../node_modules/nx/schemas/project-schema.json", "projectType": "library", "targets": { "build": {} } -} +} \ No newline at end of file diff --git a/code/addons/vitest/src/constants.ts b/code/addons/test/src/constants.ts similarity index 100% rename from code/addons/vitest/src/constants.ts rename to code/addons/test/src/constants.ts diff --git a/code/addons/vitest/src/index.ts b/code/addons/test/src/index.ts similarity index 100% rename from code/addons/vitest/src/index.ts rename to code/addons/test/src/index.ts diff --git a/code/addons/vitest/src/manager.tsx b/code/addons/test/src/manager.tsx similarity index 100% rename from code/addons/vitest/src/manager.tsx rename to code/addons/test/src/manager.tsx diff --git a/code/addons/vitest/src/plugin/global-setup.ts b/code/addons/test/src/plugin/global-setup.ts similarity index 100% rename from code/addons/vitest/src/plugin/global-setup.ts rename to code/addons/test/src/plugin/global-setup.ts diff --git a/code/addons/vitest/src/plugin/index.ts b/code/addons/test/src/plugin/index.ts similarity index 98% rename from code/addons/vitest/src/plugin/index.ts rename to code/addons/test/src/plugin/index.ts index 322e1d5bb74b..e71b54cefe81 100644 --- a/code/addons/vitest/src/plugin/index.ts +++ b/code/addons/test/src/plugin/index.ts @@ -113,7 +113,7 @@ export const storybookTest = (options?: UserOptions): Plugin => { if (typeof config.test.setupFiles === 'string') { config.test.setupFiles = [config.test.setupFiles]; } - config.test.setupFiles.push('@storybook/experimental-addon-vitest/internal/setup-file'); + config.test.setupFiles.push('@storybook/experimental-addon-test/internal/setup-file'); // when a Storybook script is provided, we spawn Storybook for the user when in watch mode if (finalOptions.storybookScript) { @@ -121,14 +121,14 @@ export const storybookTest = (options?: UserOptions): Plugin => { if (typeof config.test.globalSetup === 'string') { config.test.globalSetup = [config.test.globalSetup]; } - config.test.globalSetup.push('@storybook/experimental-addon-vitest/internal/global-setup'); + config.test.globalSetup.push('@storybook/experimental-addon-test/internal/global-setup'); } config.test.server ??= {}; config.test.server.deps ??= {}; config.test.server.deps.inline ??= []; if (Array.isArray(config.test.server.deps.inline)) { - config.test.server.deps.inline.push('@storybook/experimental-addon-vitest'); + config.test.server.deps.inline.push('@storybook/experimental-addon-test'); } }, async transform(code, id) { diff --git a/code/addons/vitest/src/plugin/setup-file.test.ts b/code/addons/test/src/plugin/setup-file.test.ts similarity index 100% rename from code/addons/vitest/src/plugin/setup-file.test.ts rename to code/addons/test/src/plugin/setup-file.test.ts diff --git a/code/addons/vitest/src/plugin/setup-file.ts b/code/addons/test/src/plugin/setup-file.ts similarity index 100% rename from code/addons/vitest/src/plugin/setup-file.ts rename to code/addons/test/src/plugin/setup-file.ts diff --git a/code/addons/vitest/src/plugin/test-utils.ts b/code/addons/test/src/plugin/test-utils.ts similarity index 100% rename from code/addons/vitest/src/plugin/test-utils.ts rename to code/addons/test/src/plugin/test-utils.ts diff --git a/code/addons/vitest/src/plugin/types.ts b/code/addons/test/src/plugin/types.ts similarity index 100% rename from code/addons/vitest/src/plugin/types.ts rename to code/addons/test/src/plugin/types.ts diff --git a/code/addons/vitest/src/plugin/viewports.test.ts b/code/addons/test/src/plugin/viewports.test.ts similarity index 100% rename from code/addons/vitest/src/plugin/viewports.test.ts rename to code/addons/test/src/plugin/viewports.test.ts diff --git a/code/addons/vitest/src/plugin/viewports.ts b/code/addons/test/src/plugin/viewports.ts similarity index 100% rename from code/addons/vitest/src/plugin/viewports.ts rename to code/addons/test/src/plugin/viewports.ts diff --git a/code/addons/vitest/src/postinstall.ts b/code/addons/test/src/postinstall.ts similarity index 99% rename from code/addons/vitest/src/postinstall.ts rename to code/addons/test/src/postinstall.ts index 3ffcd813628e..a33ee94221e0 100644 --- a/code/addons/vitest/src/postinstall.ts +++ b/code/addons/test/src/postinstall.ts @@ -123,7 +123,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-test/vite-plugin'; ${vitestInfo.frameworkPluginImport ? vitestInfo.frameworkPluginImport + '\n' : ''} export default defineWorkspace([ '${relative(dirname(browserWorkspaceFile), rootConfig)}', @@ -154,7 +154,7 @@ export default async function postInstall(options: PostinstallOptions) { resolve('vitest.config.ts'), dedent` import { defineConfig } from "vitest/config"; - import { storybookTest } from "@storybook/experimental-addon-vitest/plugin"; + import { storybookTest } from "@storybook/experimental-addon-test/vite-plugin"; ${vitestInfo.frameworkPluginImport ? vitestInfo.frameworkPluginImport + '\n' : ''} export default defineConfig({ plugins: [ diff --git a/code/addons/vitest/src/preset.ts b/code/addons/test/src/preset.ts similarity index 100% rename from code/addons/vitest/src/preset.ts rename to code/addons/test/src/preset.ts diff --git a/code/addons/vitest/tsconfig.json b/code/addons/test/tsconfig.json similarity index 100% rename from code/addons/vitest/tsconfig.json rename to code/addons/test/tsconfig.json diff --git a/code/addons/vitest/typings.d.ts b/code/addons/test/typings.d.ts similarity index 100% rename from code/addons/vitest/typings.d.ts rename to code/addons/test/typings.d.ts diff --git a/code/addons/vitest/vitest.config.ts b/code/addons/test/vitest.config.ts similarity index 100% rename from code/addons/vitest/vitest.config.ts rename to code/addons/test/vitest.config.ts diff --git a/code/core/src/common/versions.ts b/code/core/src/common/versions.ts index de0955911dbf..6c748bde75c6 100644 --- a/code/core/src/common/versions.ts +++ b/code/core/src/common/versions.ts @@ -15,10 +15,10 @@ export default { '@storybook/addon-onboarding': '8.3.0-beta.0', '@storybook/addon-outline': '8.3.0-beta.0', '@storybook/addon-storysource': '8.3.0-beta.0', + '@storybook/experimental-addon-test': '8.3.0-beta.0', '@storybook/addon-themes': '8.3.0-beta.0', '@storybook/addon-toolbars': '8.3.0-beta.0', '@storybook/addon-viewport': '8.3.0-beta.0', - '@storybook/experimental-addon-vitest': '8.3.0-beta.0', '@storybook/builder-vite': '8.3.0-beta.0', '@storybook/builder-webpack5': '8.3.0-beta.0', '@storybook/core': '8.3.0-beta.0', diff --git a/code/core/src/csf-tools/vitest-plugin/transformer.test.ts b/code/core/src/csf-tools/vitest-plugin/transformer.test.ts index a96833accaf4..72a1d05ab403 100644 --- a/code/core/src/csf-tools/vitest-plugin/transformer.test.ts +++ b/code/core/src/csf-tools/vitest-plugin/transformer.test.ts @@ -73,7 +73,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const _meta = { component: Button, title: "automatic/calculated/title" @@ -102,7 +102,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const _meta = { title: "automatic/calculated/title", component: Button @@ -132,7 +132,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const meta = { component: Button, title: "automatic/calculated/title" @@ -163,7 +163,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const meta = { title: "automatic/calculated/title", component: Button @@ -195,7 +195,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const _meta = { component: Button, title: "automatic/calculated/title" @@ -229,7 +229,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const _meta = { title: "automatic/calculated/title" }; @@ -264,7 +264,7 @@ describe('transformer', () => { const result = await transform({ code }); expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const _meta = { title: "automatic/calculated/title" }; @@ -299,7 +299,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const _meta = { title: "automatic/calculated/title", component: Button, @@ -356,7 +356,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const _meta = { title: "automatic/calculated/title" }; @@ -387,7 +387,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const _meta = { title: "automatic/calculated/title" }; @@ -416,7 +416,7 @@ describe('transformer', () => { expect(result.code).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const _meta = { title: "automatic/calculated/title" }; @@ -449,7 +449,7 @@ describe('transformer', () => { expect(transformedCode).toMatchInlineSnapshot(` import { test as _test, expect as _expect } from "vitest"; - import { testStory as _testStory } from "@storybook/experimental-addon-vitest/internal/test-utils"; + import { testStory as _testStory } from "@storybook/experimental-addon-test/internal/test-utils"; const meta = { title: "automatic/calculated/title", component: Button diff --git a/code/core/src/csf-tools/vitest-plugin/transformer.ts b/code/core/src/csf-tools/vitest-plugin/transformer.ts index b2c66693b228..51ea1169f6c3 100644 --- a/code/core/src/csf-tools/vitest-plugin/transformer.ts +++ b/code/core/src/csf-tools/vitest-plugin/transformer.ts @@ -260,7 +260,7 @@ export async function vitestTransform({ ), t.importDeclaration( [t.importSpecifier(testStoryId, t.identifier('testStory'))], - t.stringLiteral('@storybook/experimental-addon-vitest/internal/test-utils') + t.stringLiteral('@storybook/experimental-addon-test/internal/test-utils') ), ]; diff --git a/code/package.json b/code/package.json index 119cadfb7f2a..b5f90dc041ec 100644 --- a/code/package.json +++ b/code/package.json @@ -126,7 +126,7 @@ "@storybook/csf-plugin": "workspace:*", "@storybook/ember": "workspace:*", "@storybook/eslint-config-storybook": "^4.0.0", - "@storybook/experimental-addon-vitest": "workspace:*", + "@storybook/experimental-addon-test": "workspace:*", "@storybook/global": "^5.0.0", "@storybook/html": "workspace:*", "@storybook/html-vite": "workspace:*", diff --git a/code/yarn.lock b/code/yarn.lock index e7023fe8c13f..47def263899a 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6126,9 +6126,9 @@ __metadata: languageName: node linkType: hard -"@storybook/experimental-addon-vitest@workspace:*, @storybook/experimental-addon-vitest@workspace:addons/vitest": +"@storybook/experimental-addon-test@workspace:*, @storybook/experimental-addon-test@workspace:addons/test": version: 0.0.0-use.local - resolution: "@storybook/experimental-addon-vitest@workspace:addons/vitest" + resolution: "@storybook/experimental-addon-test@workspace:addons/test" dependencies: "@storybook/csf": "npm:^0.1.11" "@vitest/browser": "npm:^2.0.0" @@ -6720,7 +6720,7 @@ __metadata: "@storybook/csf-plugin": "workspace:*" "@storybook/ember": "workspace:*" "@storybook/eslint-config-storybook": "npm:^4.0.0" - "@storybook/experimental-addon-vitest": "workspace:*" + "@storybook/experimental-addon-test": "workspace:*" "@storybook/global": "npm:^5.0.0" "@storybook/html": "workspace:*" "@storybook/html-vite": "workspace:*" diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index 34c7e20c0606..055f4e335617 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -435,7 +435,7 @@ export async function setupVitest(details: TemplateDetails, options: PassedOptio join(sandboxDir, 'vitest.workspace.ts'), dedent` import { defineWorkspace, defaultExclude } from "vitest/config"; - import { storybookTest } from "@storybook/experimental-addon-vitest/plugin"; + import { storybookTest } from "@storybook/experimental-addon-test/vite-plugin"; ${frameworkPluginImport} export default defineWorkspace([ @@ -513,7 +513,7 @@ export async function setupVitest(details: TemplateDetails, options: PassedOptio const vitestAddonPath = relative(sandboxDir, join(CODE_DIRECTORY, 'addons', 'vitest')); packageJson.resolutions = { ...packageJson.resolutions, - '@storybook/experimental-addon-vitest': `file:${vitestAddonPath}`, + '@storybook/experimental-addon-test': `file:${vitestAddonPath}`, }; } diff --git a/scripts/tasks/sandbox.ts b/scripts/tasks/sandbox.ts index 2bb4e6e3999c..70e2e4a765af 100644 --- a/scripts/tasks/sandbox.ts +++ b/scripts/tasks/sandbox.ts @@ -94,7 +94,7 @@ export const sandbox: Task = { 'vitest', 'playwright', '@vitest/browser', - '@storybook/experimental-addon-vitest' + '@storybook/experimental-addon-test' ); if (details.template.expected.framework.includes('nextjs')) { From a0ccf5b8a14ee7334e8ee5f6b060e54c9163fe6d Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 2 Sep 2024 10:50:23 +0200 Subject: [PATCH 2/4] Add type declaration for storybookTest in plugin module --- code/addons/test/src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/addons/test/src/index.ts b/code/addons/test/src/index.ts index dafa948eda6c..9a3583d228c5 100644 --- a/code/addons/test/src/index.ts +++ b/code/addons/test/src/index.ts @@ -1,2 +1,9 @@ +import type { storybookTest as storybookTestImport } from './plugin'; + // make it work with --isolatedModules export default {}; + +// @ts-expect-error - this is a hack to make the module's sub-path augmentable +declare module '@storybook/experimental-addon-test/vite-plugin' { + export const storybookTest: typeof storybookTestImport; +} From 6744cb021cc3c223b100a75e43870cc0fbb68d46 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 2 Sep 2024 15:01:34 +0200 Subject: [PATCH 3/4] fix --- code/addons/test/src/postinstall.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/test/src/postinstall.ts b/code/addons/test/src/postinstall.ts index 3cd7a55ba7cb..c334d9f0571e 100644 --- a/code/addons/test/src/postinstall.ts +++ b/code/addons/test/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 9ca96c6a338bbb044283b54e9054709ed5753060 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 2 Sep 2024 15:22:35 +0200 Subject: [PATCH 4/4] fix import --- code/addons/test/package.json | 2 +- code/addons/test/src/postinstall.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/addons/test/package.json b/code/addons/test/package.json index 14713ac2fcc2..e3a601080035 100644 --- a/code/addons/test/package.json +++ b/code/addons/test/package.json @@ -103,4 +103,4 @@ "./src/postinstall.ts" ] } -} \ No newline at end of file +} diff --git a/code/addons/test/src/postinstall.ts b/code/addons/test/src/postinstall.ts index 3ab64f32be92..3ecbff0432da 100644 --- a/code/addons/test/src/postinstall.ts +++ b/code/addons/test/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';