diff --git a/.changeset/little-moles-accept.md b/.changeset/little-moles-accept.md new file mode 100644 index 000000000..c28bd699c --- /dev/null +++ b/.changeset/little-moles-accept.md @@ -0,0 +1,9 @@ +--- +"@sit-onyx/storybook-utils": major +--- + +bump minimum Storybook version to `8.3.0-alpha.5` + +Storybook version `8.3.0-alpha.5` now official supports the improved source code generation, see [changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.prerelease.md#830-alpha3) so we removed our temporarily forked source code generator from `@sit-onyx/storybook-utils`. + +Therefore, the minimum Storybook version was bumped to `8.3.0-alpha.5` which also includes a bug fix that significantly reduces the bundle size when building the Storybook. diff --git a/package.json b/package.json index a01ddd95d..276388759 100644 --- a/package.json +++ b/package.json @@ -27,10 +27,10 @@ "@rushstack/eslint-patch": "^1.10.4", "@sit-onyx/eslint-plugin": "workspace:^", "@sit-onyx/storybook-utils": "workspace:^", - "@storybook/addon-essentials": "^8.2.9", - "@storybook/blocks": "^8.2.9", - "@storybook/vue3": "^8.2.9", - "@storybook/vue3-vite": "^8.2.9", + "@storybook/addon-essentials": "8.3.0-beta.5", + "@storybook/blocks": "8.3.0-beta.5", + "@storybook/vue3": "8.3.0-beta.5", + "@storybook/vue3-vite": "8.3.0-beta.5", "@tsconfig/node20": "^20.1.4", "@types/jsdom": "^21.1.7", "@types/node": "^20.16.5", @@ -51,7 +51,7 @@ "rimraf": "^6.0.1", "sass": "^1.78.0", "simple-git-hooks": "^2.11.1", - "storybook": "^8.2.9", + "storybook": "8.3.0-beta.5", "turbo": "^2.1.1", "typescript": "~5.5.4", "vite": "^5.4.3", diff --git a/packages/storybook-utils/package.json b/packages/storybook-utils/package.json index 830407120..071cea7be 100644 --- a/packages/storybook-utils/package.json +++ b/packages/storybook-utils/package.json @@ -29,9 +29,9 @@ }, "peerDependencies": { "@sit-onyx/icons": "workspace:^", - "@storybook/vue3": ">= 8.2.0", + "@storybook/vue3": ">= 8.3.0-alpha.5", "sit-onyx": "workspace:^", - "storybook": ">= 8.2.0", + "storybook": ">= 8.3.0-alpha.5", "storybook-dark-mode": ">= 4" }, "dependencies": { diff --git a/packages/storybook-utils/src/preview.spec.ts b/packages/storybook-utils/src/preview.spec.ts index f48506fe5..547e90707 100644 --- a/packages/storybook-utils/src/preview.spec.ts +++ b/packages/storybook-utils/src/preview.spec.ts @@ -1,25 +1,19 @@ import bellRing from "@sit-onyx/icons/bell-ring.svg?raw"; import calendar from "@sit-onyx/icons/calendar.svg?raw"; import placeholder from "@sit-onyx/icons/placeholder.svg?raw"; -import { describe, expect, test, vi } from "vitest"; +import { describe, expect, test } from "vitest"; import { replaceAll, sourceCodeTransformer } from "./preview"; -import * as sourceCodeGenerator from "./source-code-generator"; describe("preview.ts", () => { test("should transform source code and add icon/onyx imports", () => { - // ARRANGE - const generatorSpy = vi.spyOn(sourceCodeGenerator, "generateSourceCode") - .mockReturnValue(`