diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index 817d5dd0bbf9..eb41871a0b9d 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,3 +1,8 @@ +## 8.4.0-beta.5 + +- Addon Test: Improve unsupported vitest message - [#29486](https://github.com/storybookjs/storybook/pull/29486), thanks @valentinpalkovic! +- Core: Fix race condition during empty folder init - [#29490](https://github.com/storybookjs/storybook/pull/29490), thanks @valentinpalkovic! + ## 8.4.0-beta.4 - Addon Test: Improve Error Handling - [#29476](https://github.com/storybookjs/storybook/pull/29476), thanks @valentinpalkovic! diff --git a/code/addons/test/src/postinstall.ts b/code/addons/test/src/postinstall.ts index 78aaf0986df8..f7b5efe8521c 100644 --- a/code/addons/test/src/postinstall.ts +++ b/code/addons/test/src/postinstall.ts @@ -88,7 +88,7 @@ export default async function postInstall(options: PostinstallOptions) { if (coercedVitestVersion && !satisfies(coercedVitestVersion, '>=2.1.0')) { reasons.push(dedent` • The addon requires Vitest 2.1.0 or later. You are currently using ${picocolors.bold(vitestVersionSpecifier)}. - Please update your ${picocolors.bold(colors.pink('vitest'))} dependency and try again. + Please update all of your Vitest dependencies and try again. `); } diff --git a/code/core/src/common/utils/file-cache.ts b/code/core/src/common/utils/file-cache.ts index 590ddf60d608..d3ee7dd4ecac 100644 --- a/code/core/src/common/utils/file-cache.ts +++ b/code/core/src/common/utils/file-cache.ts @@ -85,6 +85,7 @@ export class FileSystemCache { orgOpts: CacheSetOptions | number = {} ): Promise { const opts: CacheSetOptions = typeof orgOpts === 'number' ? { ttl: orgOpts } : orgOpts; + mkdirSync(this.cache_dir, { recursive: true }); await writeFile(this.generateHash(name), this.parseSetData(name, data, opts), { encoding: opts.encoding || 'utf8', }); @@ -92,6 +93,7 @@ export class FileSystemCache { public setSync(name: string, data: T, orgOpts: CacheSetOptions | number = {}): void { const opts: CacheSetOptions = typeof orgOpts === 'number' ? { ttl: orgOpts } : orgOpts; + mkdirSync(this.cache_dir, { recursive: true }); writeFileSync(this.generateHash(name), this.parseSetData(name, data, opts), { encoding: opts.encoding || 'utf8', }); diff --git a/code/package.json b/code/package.json index 9115b4ed8b8d..7b086aee4d71 100644 --- a/code/package.json +++ b/code/package.json @@ -293,5 +293,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "8.4.0-beta.5" } diff --git a/docs/_snippets/portable-stories-vitest-set-project-annotations-simple.md b/docs/_snippets/portable-stories-vitest-set-project-annotations-simple.md index 0cd16ae92250..99b3522e0fae 100644 --- a/docs/_snippets/portable-stories-vitest-set-project-annotations-simple.md +++ b/docs/_snippets/portable-stories-vitest-set-project-annotations-simple.md @@ -1,9 +1,9 @@ -```tsx filename="setupTest.ts" renderer="react" language="ts" +```tsx filename=".storybook/vitest.setup.ts" renderer="react" language="ts" import { beforeAll } from 'vitest'; // 👇 If you're using Next.js, import from @storybook/nextjs // If you're using Next.js with Vite, import from @storybook/experimental-nextjs-vite import { setProjectAnnotations } from '@storybook/react'; -import * as previewAnnotations from './.storybook/preview'; +import * as previewAnnotations from './preview'; const annotations = setProjectAnnotations([previewAnnotations]); @@ -11,11 +11,11 @@ const annotations = setProjectAnnotations([previewAnnotations]); beforeAll(annotations.beforeAll); ``` -```tsx filename="setupTest.ts" renderer="svelte" language="ts" +```tsx filename=".storybook/vitest.setup.ts" renderer="svelte" language="ts" import { beforeAll } from 'vitest'; // 👇 If you're using Sveltekit, import from @storybook/sveltekit import { setProjectAnnotations } from '@storybook/svelte'; -import * as previewAnnotations from './.storybook/preview'; +import * as previewAnnotations from './preview'; const annotations = setProjectAnnotations([previewAnnotations]); @@ -23,10 +23,10 @@ const annotations = setProjectAnnotations([previewAnnotations]); beforeAll(annotations.beforeAll); ``` -```tsx filename="setupTest.ts" renderer="vue" language="ts" +```tsx filename=".storybook/vitest.setup.ts" renderer="vue" language="ts" import { beforeAll } from 'vitest'; import { setProjectAnnotations } from '@storybook/vue3'; -import * as previewAnnotations from './.storybook/preview'; +import * as previewAnnotations from './preview'; const annotations = setProjectAnnotations([previewAnnotations]); diff --git a/docs/versions/next.json b/docs/versions/next.json index cd3d3e08b10c..883963577d9f 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"8.4.0-beta.4","info":{"plain":"- Addon Test: Improve Error Handling - [#29476](https://github.com/storybookjs/storybook/pull/29476), thanks @valentinpalkovic!\n- Addon Test: Improve postinstall script - [#29479](https://github.com/storybookjs/storybook/pull/29479), thanks @yannbf!\n- Addon Test: Throttle Vitest progress updates more heavily - [#29482](https://github.com/storybookjs/storybook/pull/29482), thanks @ghengeveld!\n- CLI: Refactor NPMProxy error parsing logic - [#29459](https://github.com/storybookjs/storybook/pull/29459), thanks @yannbf!\n- Core: Track test provider state in sessionStorage - [#29450](https://github.com/storybookjs/storybook/pull/29450), thanks @ghengeveld!\n- Dependencies: Upgrade VTA to v3.2.0 to resolve peerDep conflict - [#29461](https://github.com/storybookjs/storybook/pull/29461), thanks @ghengeveld!"}} +{"version":"8.4.0-beta.5","info":{"plain":"- Addon Test: Improve unsupported vitest message - [#29486](https://github.com/storybookjs/storybook/pull/29486), thanks @valentinpalkovic!\n- Core: Fix race condition during empty folder init - [#29490](https://github.com/storybookjs/storybook/pull/29490), thanks @valentinpalkovic!"}}