From 09196b1fe701ff3eb8f9a6273dcb1b6656fb72b9 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 3 Jan 2025 11:52:25 +0100 Subject: [PATCH 01/20] Addon Test: Add Vitest 3 support --- code/.storybook/vitest.config.ts | 8 +- code/addons/test/package.json | 12 +- code/addons/test/src/node/vitest-manager.ts | 119 ++- code/addons/test/src/postinstall.ts | 45 +- .../test/src/vitest-plugin/global-setup.ts | 4 +- code/addons/test/src/vitest-plugin/index.ts | 1 - .../test/src/vitest-plugin/test-utils.ts | 4 +- code/package.json | 12 +- code/yarn.lock | 810 +++++++++++++----- 9 files changed, 753 insertions(+), 262 deletions(-) diff --git a/code/.storybook/vitest.config.ts b/code/.storybook/vitest.config.ts index 4b177f409281..bbb12a61a6ac 100644 --- a/code/.storybook/vitest.config.ts +++ b/code/.storybook/vitest.config.ts @@ -24,7 +24,7 @@ export default mergeConfig( plugins: [ import('@storybook/experimental-addon-test/vitest-plugin').then(({ storybookTest }) => storybookTest({ - configDir: process.cwd(), + configDir: __dirname, tags: { include: ['vitest'], }, @@ -47,10 +47,14 @@ export default mergeConfig( testNamePattern: /^(?!.*(UseState)).*$/, browser: { enabled: true, - name: 'chromium', provider: 'playwright', headless: true, screenshotFailures: false, + instances: [ + { + browser: 'chromium', + }, + ], }, setupFiles: ['./storybook.setup.ts'], environment: 'happy-dom', diff --git a/code/addons/test/package.json b/code/addons/test/package.json index ab0ffda5e379..e48ff8ba3345 100644 --- a/code/addons/test/package.json +++ b/code/addons/test/package.json @@ -94,8 +94,8 @@ "@types/istanbul-lib-report": "^3.0.3", "@types/node": "^22.0.0", "@types/semver": "^7", - "@vitest/browser": "^2.1.3", - "@vitest/runner": "^2.1.3", + "@vitest/browser": "^3.0.0-beta.3", + "@vitest/runner": "^3.0.0-beta.3", "ansi-to-html": "^0.7.2", "boxen": "^8.0.1", "es-toolkit": "^1.22.0", @@ -115,13 +115,13 @@ "tree-kill": "^1.2.2", "ts-dedent": "^2.2.0", "typescript": "^5.3.2", - "vitest": "^2.1.3" + "vitest": "^3.0.0-beta.3" }, "peerDependencies": { - "@vitest/browser": "^2.1.1", - "@vitest/runner": "^2.1.1", + "@vitest/browser": "^2.1.1 || ^3.0.0", + "@vitest/runner": "^2.1.1 || ^3.0.0", "storybook": "workspace:^", - "vitest": "^2.1.1" + "vitest": "^2.1.1 || ^3.0.0" }, "peerDependenciesMeta": { "@vitest/browser": { diff --git a/code/addons/test/src/node/vitest-manager.ts b/code/addons/test/src/node/vitest-manager.ts index 4145acf18a3f..0a4b1f815039 100644 --- a/code/addons/test/src/node/vitest-manager.ts +++ b/code/addons/test/src/node/vitest-manager.ts @@ -4,10 +4,12 @@ import type { CoverageOptions, ResolvedCoverageOptions, TestProject, + TestRunResult, TestSpecification, Vitest, WorkspaceProject, } from 'vitest/node'; +import { version as vitestVersion } from 'vitest/node'; import { resolvePathInStorybookCache } from 'storybook/internal/common'; import type { TestingModuleRunRequestPayload } from 'storybook/internal/core-events'; @@ -15,7 +17,9 @@ import type { TestingModuleRunRequestPayload } from 'storybook/internal/core-eve import type { DocsIndexEntry, StoryIndex, StoryIndexEntry } from '@storybook/types'; import path, { dirname, join, normalize } from 'pathe'; +import { satisfies } from 'semver'; import slash from 'slash'; +import type { ModuleNode } from 'vite'; import { COVERAGE_DIRECTORY, type Config } from '../constants'; import { log } from '../logger'; @@ -31,6 +35,8 @@ type TagsFilter = { const packageDir = dirname(require.resolve('@storybook/experimental-addon-test/package.json')); +const isVitest3OrLater = satisfies(vitestVersion, '>=3.0.0-beta.3', { includePrerelease: true }); + // We have to tell Vitest that it runs as part of Storybook process.env.VITEST_STORYBOOK = 'true'; @@ -43,6 +49,8 @@ export class VitestManager { storyCountForCurrentRun: number = 0; + runningPromise: Promise | null = null; + constructor(private testManager: TestManager) {} async startVitest({ coverage = false } = {}) { @@ -113,7 +121,7 @@ export class VitestManager { await this.vitestRestartPromise; this.vitestRestartPromise = new Promise(async (resolve, reject) => { try { - await this.vitest?.runningPromise; + await this.runningPromise; await this.closeVitest(); await this.startVitest({ coverage }); resolve(); @@ -126,8 +134,34 @@ export class VitestManager { return this.vitestRestartPromise; } + private getModulesByFilepath(file: string): Set { + const set = this.vite.moduleGraph.getModulesByFile(file); + return set || new Set(); + } + + private getModuleProjects(filepath: string) { + return this.vitest!.projects.filter((project) => { + return this.getModulesByFilepath(filepath).size; + }); + } + + private setGlobalTestNamePattern(pattern: string | RegExp) { + if (isVitest3OrLater) { + this.vitest!.setGlobalTestNamePattern(pattern); + } else { + // @ts-expect-error vitest.configOverride is a Vitest < 3 API. + this.vitest!.configOverride.testNamePattern = pattern; + } + } + + private resetGlobalTestNamePattern() { + if (this.vitest) { + this.setGlobalTestNamePattern(''); + } + } + private updateLastChanged(filepath: string) { - const projects = this.vitest!.getModuleProjects(filepath); + const projects = this.getModuleProjects(filepath); projects.forEach(({ server, browser }) => { if (server) { const serverMods = server.moduleGraph.getModulesByFile(filepath); @@ -173,6 +207,22 @@ export class VitestManager { return true; } + private get vite() { + // TODO: vitest.server is a Vitest < 3.0.0 API. Remove as soon as we don't support < 3.0.0 anymore. + return isVitest3OrLater ? this.vitest!.vite : this.vitest!.server; + } + + async runFiles(specifications: TestSpecification[], allTestsRun?: boolean) { + const runTest: ( + specifications: TestSpecification[], + allTestsRun?: boolean | undefined + // @ts-expect-error vitest.runFiles is a Vitest < 3.0.0 API. Remove as soon as we don't support < 3.0.0 anymore. + ) => Promise = this.vitest!.runFiles ?? this.vitest!.runTestSpecifications; + this.runningPromise = runTest.call(this.vitest, specifications, allTestsRun); + await this.runningPromise; + this.runningPromise = null; + } + async runTests(requestPayload: TestingModuleRunRequestPayload) { if (!this.vitest) { await this.startVitest(); @@ -180,7 +230,7 @@ export class VitestManager { await this.vitestRestartPromise; } - this.resetTestNamePattern(); + this.resetGlobalTestNamePattern(); const stories = await this.fetchStories(requestPayload.indexUrl, requestPayload.storyIds); const vitestTestSpecs = await this.getStorybookTestSpecs(); @@ -219,18 +269,17 @@ export class VitestManager { if (isSingleStoryRun) { const storyName = stories[0].name; - this.vitest!.configOverride.testNamePattern = new RegExp( - `^${storyName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}$` - ); + const regex = new RegExp(`^${storyName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}$`); + this.setGlobalTestNamePattern(regex); } - await this.vitest!.runFiles(filteredTestFiles, true); - this.resetTestNamePattern(); + await this.runFiles(filteredTestFiles, true); + this.resetGlobalTestNamePattern(); } async cancelCurrentRun() { await this.vitest?.cancelCurrentRun('keyboard-input'); - await this.vitest?.runningPromise; + await this.runningPromise; } async closeVitest() { @@ -245,22 +294,26 @@ export class VitestManager { } private async getTestDependencies(spec: TestSpecification, deps = new Set()) { - const addImports = async (project: WorkspaceProject, filepath: string) => { + const addImports = async (project: TestProject, filepath: string) => { if (deps.has(filepath)) { return; } deps.add(filepath); - const mod = project.server.moduleGraph.getModuleById(filepath); - const transformed = - mod?.ssrTransformResult || (await project.vitenode.transformRequest(filepath)); + // TODO: Remove project.server once we don't support Vitest < 3.0.0 anymore + const server = isVitest3OrLater ? project.vite : project.server; + + const mod = server.moduleGraph.getModuleById(filepath); + // @ts-expect-error project.vitenode is a Vitest < 3 API. + const viteNode = isVitest3OrLater ? project.vite : project.vitenode; + const transformed = mod?.ssrTransformResult || (await viteNode.transformRequest(filepath)); if (!transformed) { return; } const dependencies = [...(transformed.deps || []), ...(transformed.dynamicDeps || [])]; await Promise.all( dependencies.map(async (dep) => { - const idPath = await project.server.pluginContainer.resolveId(dep, filepath, { + const idPath = await server.pluginContainer.resolveId(dep, filepath, { ssr: true, }); const fsPath = idPath && !idPath.external && idPath.id.split('?')[0]; @@ -276,7 +329,11 @@ export class VitestManager { ); }; - await addImports(spec.project.workspaceProject, spec.moduleId); + await addImports( + // @ts-expect-error spec.project.workspaceProject is a Vitest < 3 API. + isVitest3OrLater ? spec.project : spec.project.workspaceProject, + spec.moduleId + ); deps.delete(spec.moduleId); return deps; @@ -286,9 +343,14 @@ export class VitestManager { if (!this.vitest) { return; } - this.resetTestNamePattern(); + this.resetGlobalTestNamePattern(); + + const globTestSpecs: (filters?: string[] | undefined) => Promise = + // TODO: vitest.globTestSpecs is a Vitest < 3.0.0 API. + isVitest3OrLater ? this.vitest.globTestSpecifications : this.vitest.globTestSpecs; + + const globTestFiles = await globTestSpecs.call(this.vitest); - const globTestFiles = await this.vitest.globTestSpecs(); const testGraphs = await Promise.all( globTestFiles .filter((workspace) => this.isStorybookProject(workspace.project)) @@ -307,8 +369,8 @@ export class VitestManager { if (triggerAffectedTests.length) { await this.vitest.cancelCurrentRun('keyboard-input'); - await this.vitest.runningPromise; - await this.vitest.runFiles(triggerAffectedTests, false); + await this.runningPromise; + await this.runFiles(triggerAffectedTests, false); } } @@ -328,7 +390,7 @@ export class VitestManager { } async registerVitestConfigListener() { - this.vitest?.server?.watcher.on('change', async (file) => { + this.vite?.watcher.on('change', async (file) => { file = normalize(file); const isConfig = file === this.vitest?.server.config.configFile; if (isConfig) { @@ -340,20 +402,15 @@ export class VitestManager { } async setupWatchers() { - this.resetTestNamePattern(); - this.vitest?.server?.watcher.removeAllListeners('change'); - this.vitest?.server?.watcher.removeAllListeners('add'); - this.vitest?.server?.watcher.on('change', this.runAffectedTestsAfterChange.bind(this)); - this.vitest?.server?.watcher.on('add', this.runAffectedTestsAfterChange.bind(this)); + this.resetGlobalTestNamePattern(); + const server = this.vite; + server?.watcher.removeAllListeners('change'); + server?.watcher.removeAllListeners('add'); + server?.watcher.on('change', this.runAffectedTestsAfterChange.bind(this)); + server?.watcher.on('add', this.runAffectedTestsAfterChange.bind(this)); this.registerVitestConfigListener(); } - resetTestNamePattern() { - if (this.vitest) { - this.vitest.configOverride.testNamePattern = undefined; - } - } - isStorybookProject(project: TestProject | WorkspaceProject) { // eslint-disable-next-line no-underscore-dangle return !!project.config.env?.__STORYBOOK_URL__; diff --git a/code/addons/test/src/postinstall.ts b/code/addons/test/src/postinstall.ts index 95d0a25979d1..6ba56f014f9a 100644 --- a/code/addons/test/src/postinstall.ts +++ b/code/addons/test/src/postinstall.ts @@ -406,8 +406,39 @@ export default async function postInstall(options: PostinstallOptions) { } const vitestConfigFile = await findFile('vitest.config'); + const vitestShimFile = await findFile('vitest.shims.d'); const rootConfig = vitestConfigFile || viteConfigFile; + const isVitest3OrLater = !!(coercedVitestVersion && satisfies(coercedVitestVersion, '>=3.0.0')); + + const browserConfig = isVitest3OrLater + ? dedent` + { + enabled: true, + headless: true, + provider: 'playwright' + instances: [ + { + browser: 'chromium', + } + ] + }` + : dedent` + { + enabled: true, + headless: true, + name: 'chromium', + provider: 'playwright' + }, + `; + + if (isVitest3OrLater && fileExtension === 'ts' && !vitestShimFile) { + await writeFile( + 'vitest.shims.d.ts', + '/// ' + ); + } + if (rootConfig) { // If there's an existing config, we create a workspace file so we can run Storybook tests alongside. const extension = extname(rootConfig); @@ -435,12 +466,7 @@ export default async function postInstall(options: PostinstallOptions) { ], test: { name: 'storybook', - browser: { - enabled: true, - headless: true, - name: 'chromium', - provider: 'playwright', - }, + browser: ${browserConfig}, setupFiles: ['./.storybook/vitest.setup.ts'], }, }, @@ -472,12 +498,7 @@ export default async function postInstall(options: PostinstallOptions) { ], test: { name: 'storybook', - browser: { - enabled: true, - headless: true, - name: 'chromium', - provider: 'playwright', - }, + browser: ${browserConfig}, setupFiles: ['${vitestSetupFilePath}'], }, }); diff --git a/code/addons/test/src/vitest-plugin/global-setup.ts b/code/addons/test/src/vitest-plugin/global-setup.ts index 8526c48e245e..5085021a00b5 100644 --- a/code/addons/test/src/vitest-plugin/global-setup.ts +++ b/code/addons/test/src/vitest-plugin/global-setup.ts @@ -1,7 +1,7 @@ /* eslint-disable no-underscore-dangle */ import { type ChildProcess, spawn } from 'node:child_process'; -import type { GlobalSetupContext } from 'vitest/node'; +import type { TestProject } from 'vitest/node'; import { logger } from 'storybook/internal/node-logger'; @@ -61,7 +61,7 @@ const startStorybookIfNotRunning = async () => { } }; -export const setup = async ({ config }: GlobalSetupContext) => { +export const setup = async ({ config }: TestProject) => { if (config.watch && isVitestStandaloneRun) { await startStorybookIfNotRunning(); } diff --git a/code/addons/test/src/vitest-plugin/index.ts b/code/addons/test/src/vitest-plugin/index.ts index 314c52f9a928..0f8756899ca0 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -193,7 +193,6 @@ export const storybookTest = async (options?: UserOptions): Promise => { } : {}), - // @ts-expect-error: TODO browser: { ...inputConfig_ONLY_MUTATE_WHEN_STRICTLY_NEEDED_OR_YOU_WILL_BE_FIRED.test?.browser, commands: { diff --git a/code/addons/test/src/vitest-plugin/test-utils.ts b/code/addons/test/src/vitest-plugin/test-utils.ts index 85150c5a7c2f..a776637216a7 100644 --- a/code/addons/test/src/vitest-plugin/test-utils.ts +++ b/code/addons/test/src/vitest-plugin/test-utils.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable no-underscore-dangle */ -import { type RunnerTask, type TaskContext, type TaskMeta, type TestContext } from 'vitest'; +import { type RunnerTask, type TaskMeta, type TestContext } from 'vitest'; import { type Report, composeStory } from 'storybook/internal/preview-api'; import type { ComponentAnnotations, ComposedStoryFn } from 'storybook/internal/types'; @@ -25,7 +25,7 @@ export const testStory = ( meta: ComponentAnnotations, skipTags: string[] ) => { - return async (context: TestContext & TaskContext & { story: ComposedStoryFn }) => { + return async (context: TestContext & { story: ComposedStoryFn }) => { const composedStory = composeStory( story, meta, diff --git a/code/package.json b/code/package.json index 095188241d45..b90e7562fbb8 100644 --- a/code/package.json +++ b/code/package.json @@ -178,9 +178,9 @@ "@typescript-eslint/parser": "7.18.0", "@vitejs/plugin-react": "^4.3.2", "@vitejs/plugin-vue": "^4.4.0", - "@vitest/browser": "^2.1.3", - "@vitest/coverage-istanbul": "^2.1.3", - "@vitest/coverage-v8": "^2.1.3", + "@vitest/browser": "^3.0.0-beta.3", + "@vitest/coverage-istanbul": "^3.0.0-beta.3", + "@vitest/coverage-v8": "^3.0.0-beta.3", "create-storybook": "workspace:*", "cross-env": "^7.0.3", "danger": "^12.3.3", @@ -220,9 +220,9 @@ "ts-dedent": "^2.0.0", "typescript": "5.4.3", "util": "^0.12.4", - "vite": "^4.0.0", - "vite-plugin-inspect": "^0.8.5", - "vitest": "^2.1.3", + "vite": "^6.0.7", + "vite-plugin-inspect": "^0.10.6", + "vitest": "^3.0.0-beta.3", "wait-on": "^7.0.1" }, "dependenciesMeta": { diff --git a/code/yarn.lock b/code/yarn.lock index 33c81835e56f..62dc3b9459c7 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -931,6 +931,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.4": + version: 7.26.3 + resolution: "@babel/parser@npm:7.26.3" + dependencies: + "@babel/types": "npm:^7.26.3" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/48f736374e61cfd10ddbf7b80678514ae1f16d0e88bc793d2b505d73d9b987ea786fc8c2f7ee8f8b8c467df062030eb07fd0eb2168f0f541ca1f542775852cad + languageName: node + linkType: hard + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.24.4": version: 7.24.4 resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.24.4" @@ -2480,6 +2491,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.26.3": + version: 7.26.3 + resolution: "@babel/types@npm:7.26.3" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10c0/966c5242c5e55c8704bf7a7418e7be2703a0afa4d19a8480999d5a4ef13d095dd60686615fe5983cb7593b4b06ba3a7de8d6ca501c1d78bdd233a10d90be787b + languageName: node + linkType: hard + "@base2/pretty-print-object@npm:1.0.1": version: 1.0.1 resolution: "@base2/pretty-print-object@npm:1.0.1" @@ -2504,12 +2525,12 @@ __metadata: languageName: node linkType: hard -"@bundled-es-modules/cookie@npm:^2.0.0": - version: 2.0.0 - resolution: "@bundled-es-modules/cookie@npm:2.0.0" +"@bundled-es-modules/cookie@npm:^2.0.1": + version: 2.0.1 + resolution: "@bundled-es-modules/cookie@npm:2.0.1" dependencies: - cookie: "npm:^0.5.0" - checksum: 10c0/0655dd331b35d7b5b6dd2301c3bcfb7233018c0e3235a40ced1d53f00463ab92dc01f0091f153812867bc0ef0f8e0a157a30acb16e8d7ef149702bf8db9fe7a6 + cookie: "npm:^0.7.2" + checksum: 10c0/dfac5e36127e827c5557b8577f17a8aa94c057baff6d38555917927b99da0ecf0b1357e7fedadc8853ecdbd4a8a7fa1f5e64111b2a656612f4a36376f5bdbe8d languageName: node linkType: hard @@ -3793,50 +3814,48 @@ __metadata: languageName: node linkType: hard -"@inquirer/confirm@npm:^3.0.0": - version: 3.1.20 - resolution: "@inquirer/confirm@npm:3.1.20" +"@inquirer/confirm@npm:^5.0.0": + version: 5.1.1 + resolution: "@inquirer/confirm@npm:5.1.1" dependencies: - "@inquirer/core": "npm:^9.0.8" - "@inquirer/type": "npm:^1.5.1" - checksum: 10c0/5cf4c15c194932a6c97c7efa89266e585be70d209993eafdcf0b91a6f1219fe232c7485706b314af3befb0d579051218d9c7f82df6970d9d59b95879dd1abdfd + "@inquirer/core": "npm:^10.1.2" + "@inquirer/type": "npm:^3.0.2" + peerDependencies: + "@types/node": ">=18" + checksum: 10c0/acca658c2b0a4546560d4c22e405aa7a94644a1126fd0ca895c7d2d11a3a5c836e85ffb45b7b2f9c955c5c0cc44975dbefa17d66e82de01b545e73d6f8de5c80 languageName: node linkType: hard -"@inquirer/core@npm:^9.0.8": - version: 9.0.8 - resolution: "@inquirer/core@npm:9.0.8" +"@inquirer/core@npm:^10.1.2": + version: 10.1.2 + resolution: "@inquirer/core@npm:10.1.2" dependencies: - "@inquirer/figures": "npm:^1.0.5" - "@inquirer/type": "npm:^1.5.1" - "@types/mute-stream": "npm:^0.0.4" - "@types/node": "npm:^22.0.0" - "@types/wrap-ansi": "npm:^3.0.0" + "@inquirer/figures": "npm:^1.0.9" + "@inquirer/type": "npm:^3.0.2" ansi-escapes: "npm:^4.3.2" - cli-spinners: "npm:^2.9.2" cli-width: "npm:^4.1.0" - mute-stream: "npm:^1.0.0" + mute-stream: "npm:^2.0.0" signal-exit: "npm:^4.1.0" strip-ansi: "npm:^6.0.1" wrap-ansi: "npm:^6.2.0" yoctocolors-cjs: "npm:^2.1.2" - checksum: 10c0/b38f9c8af932f159501f9ca38c670bd19794400a6f1421f61e08ed42982b44f33ab992237ca81bcf2fb4aa756c683e50067676cd3ef70c691219502df73c0ecf + checksum: 10c0/95eeb5955a85026ae947d52d5c9b3c116954567fd7b989fad76e8908aca836eb63a3ce463e12690a05fb467d60dec732f831ba19493bc80cb0ab3a55990567a5 languageName: node linkType: hard -"@inquirer/figures@npm:^1.0.5": - version: 1.0.5 - resolution: "@inquirer/figures@npm:1.0.5" - checksum: 10c0/ec9ba23db42cb33fa18eb919abf2a18e750e739e64c1883ce4a98345cd5711c60cac12d1faf56a859f52d387deb221c8d3dfe60344ee07955a9a262f8b821fe3 +"@inquirer/figures@npm:^1.0.9": + version: 1.0.9 + resolution: "@inquirer/figures@npm:1.0.9" + checksum: 10c0/21e1a7c902b2b77f126617b501e0fe0d703fae680a9df472afdae18a3e079756aee85690cef595a14e91d18630118f4a3893aab6832b9232fefc6ab31c804a68 languageName: node linkType: hard -"@inquirer/type@npm:^1.5.1": - version: 1.5.1 - resolution: "@inquirer/type@npm:1.5.1" - dependencies: - mute-stream: "npm:^1.0.0" - checksum: 10c0/a4fa548179210b55102c05bb7f475bb757385fb5ccbc7f8f20b8020d9f3acb75d544f26292b35ebb8b7b5ebac54ecb503d238058aea4a34f2b47b78c8c63020e +"@inquirer/type@npm:^3.0.2": + version: 3.0.2 + resolution: "@inquirer/type@npm:3.0.2" + peerDependencies: + "@types/node": ">=18" + checksum: 10c0/fe348db2977fff92cad0ade05b36ec40714326fccd4a174be31663f8923729b4276f1736d892a449627d7fb03235ff44e8aac5aa72b09036d993593b813ef313 languageName: node linkType: hard @@ -4082,9 +4101,9 @@ __metadata: languageName: node linkType: hard -"@mswjs/interceptors@npm:^0.35.6": - version: 0.35.6 - resolution: "@mswjs/interceptors@npm:0.35.6" +"@mswjs/interceptors@npm:^0.37.0": + version: 0.37.4 + resolution: "@mswjs/interceptors@npm:0.37.4" dependencies: "@open-draft/deferred-promise": "npm:^2.2.0" "@open-draft/logger": "npm:^0.3.0" @@ -4092,7 +4111,7 @@ __metadata: is-node-process: "npm:^1.2.0" outvariant: "npm:^1.4.3" strict-event-emitter: "npm:^0.5.1" - checksum: 10c0/9472f640183675869368bf2ccf32354db0dfb320c754bcbfc683059f5380674598c59dde4fa58007f74817e31aa1dbd123787fcd0b1d37d53595aa718d06bfbe + checksum: 10c0/6ea2d2e479048186243ffa71948a03818c1e7546156b8d0be95d0e39da3eaf9aec3191512c7ecec15914a14f29a6064368f4ca98526b1056fe4417897187193d languageName: node linkType: hard @@ -5289,7 +5308,7 @@ __metadata: languageName: node linkType: hard -"@rollup/pluginutils@npm:^5.0.2, @rollup/pluginutils@npm:^5.1.0": +"@rollup/pluginutils@npm:^5.0.2": version: 5.1.0 resolution: "@rollup/pluginutils@npm:5.1.0" dependencies: @@ -5305,6 +5324,29 @@ __metadata: languageName: node linkType: hard +"@rollup/pluginutils@npm:^5.1.4": + version: 5.1.4 + resolution: "@rollup/pluginutils@npm:5.1.4" + dependencies: + "@types/estree": "npm:^1.0.0" + estree-walker: "npm:^2.0.2" + picomatch: "npm:^4.0.2" + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + checksum: 10c0/6d58fbc6f1024eb4b087bc9bf59a1d655a8056a60c0b4021d3beaeec3f0743503f52467fd89d2cf0e7eccf2831feb40a05ad541a17637ea21ba10b21c2004deb + languageName: node + linkType: hard + +"@rollup/rollup-android-arm-eabi@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.29.1" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@rollup/rollup-android-arm-eabi@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-android-arm-eabi@npm:4.9.1" @@ -5312,6 +5354,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm64@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-android-arm64@npm:4.29.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@rollup/rollup-android-arm64@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-android-arm64@npm:4.9.1" @@ -5319,6 +5368,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-darwin-arm64@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-darwin-arm64@npm:4.29.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@rollup/rollup-darwin-arm64@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-darwin-arm64@npm:4.9.1" @@ -5326,6 +5382,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-darwin-x64@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-darwin-x64@npm:4.29.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@rollup/rollup-darwin-x64@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-darwin-x64@npm:4.9.1" @@ -5333,6 +5396,27 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-freebsd-arm64@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.29.1" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-x64@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-freebsd-x64@npm:4.29.1" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-gnueabihf@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.29.1" + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-arm-gnueabihf@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.9.1" @@ -5340,6 +5424,20 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm-musleabihf@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.29.1" + conditions: os=linux & cpu=arm & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-gnu@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.29.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-arm64-gnu@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.9.1" @@ -5347,6 +5445,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm64-musl@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.29.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + "@rollup/rollup-linux-arm64-musl@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-linux-arm64-musl@npm:4.9.1" @@ -5354,6 +5459,27 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-loongarch64-gnu@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.29.1" + conditions: os=linux & cpu=loong64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.29.1" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-riscv64-gnu@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.29.1" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-riscv64-gnu@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.9.1" @@ -5361,6 +5487,20 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-s390x-gnu@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.29.1" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-gnu@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.29.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-x64-gnu@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-linux-x64-gnu@npm:4.9.1" @@ -5368,6 +5508,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-x64-musl@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.29.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + "@rollup/rollup-linux-x64-musl@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-linux-x64-musl@npm:4.9.1" @@ -5375,6 +5522,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-arm64-msvc@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.29.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@rollup/rollup-win32-arm64-msvc@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.9.1" @@ -5382,6 +5536,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-ia32-msvc@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.29.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@rollup/rollup-win32-ia32-msvc@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.9.1" @@ -5389,6 +5550,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-x64-msvc@npm:4.29.1": + version: 4.29.1 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.29.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@rollup/rollup-win32-x64-msvc@npm:4.9.1": version: 4.9.1 resolution: "@rollup/rollup-win32-x64-msvc@npm:4.9.1" @@ -6416,8 +6584,8 @@ __metadata: "@types/istanbul-lib-report": "npm:^3.0.3" "@types/node": "npm:^22.0.0" "@types/semver": "npm:^7" - "@vitest/browser": "npm:^2.1.3" - "@vitest/runner": "npm:^2.1.3" + "@vitest/browser": "npm:^3.0.0-beta.3" + "@vitest/runner": "npm:^3.0.0-beta.3" ansi-to-html: "npm:^0.7.2" boxen: "npm:^8.0.1" es-toolkit: "npm:^1.22.0" @@ -6439,12 +6607,12 @@ __metadata: tree-kill: "npm:^1.2.2" ts-dedent: "npm:^2.2.0" typescript: "npm:^5.3.2" - vitest: "npm:^2.1.3" + vitest: "npm:^3.0.0-beta.3" peerDependencies: - "@vitest/browser": ^2.1.1 - "@vitest/runner": ^2.1.1 + "@vitest/browser": ^2.1.1 || ^3.0.0 + "@vitest/runner": ^2.1.1 || ^3.0.0 storybook: "workspace:^" - vitest: ^2.1.1 + vitest: ^2.1.1 || ^3.0.0 peerDependenciesMeta: "@vitest/browser": optional: true @@ -7118,9 +7286,9 @@ __metadata: "@typescript-eslint/parser": "npm:7.18.0" "@vitejs/plugin-react": "npm:^4.3.2" "@vitejs/plugin-vue": "npm:^4.4.0" - "@vitest/browser": "npm:^2.1.3" - "@vitest/coverage-istanbul": "npm:^2.1.3" - "@vitest/coverage-v8": "npm:^2.1.3" + "@vitest/browser": "npm:^3.0.0-beta.3" + "@vitest/coverage-istanbul": "npm:^3.0.0-beta.3" + "@vitest/coverage-v8": "npm:^3.0.0-beta.3" create-storybook: "workspace:*" cross-env: "npm:^7.0.3" danger: "npm:^12.3.3" @@ -7160,9 +7328,9 @@ __metadata: ts-dedent: "npm:^2.0.0" typescript: "npm:5.4.3" util: "npm:^0.12.4" - vite: "npm:^4.0.0" - vite-plugin-inspect: "npm:^0.8.5" - vitest: "npm:^2.1.3" + vite: "npm:^6.0.7" + vite-plugin-inspect: "npm:^0.10.6" + vitest: "npm:^3.0.0-beta.3" wait-on: "npm:^7.0.1" dependenciesMeta: ejs: @@ -8023,6 +8191,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:1.0.6": + version: 1.0.6 + resolution: "@types/estree@npm:1.0.6" + checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a + languageName: node + linkType: hard + "@types/estree@npm:^0.0.51": version: 0.0.51 resolution: "@types/estree@npm:0.0.51" @@ -8308,15 +8483,6 @@ __metadata: languageName: node linkType: hard -"@types/mute-stream@npm:^0.0.4": - version: 0.0.4 - resolution: "@types/mute-stream@npm:0.0.4" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/944730fd7b398c5078de3c3d4d0afeec8584283bc694da1803fdfca14149ea385e18b1b774326f1601baf53898ce6d121a952c51eb62d188ef6fcc41f725c0dc - languageName: node - linkType: hard - "@types/node@npm:^22.0.0": version: 22.1.0 resolution: "@types/node@npm:22.1.0" @@ -8680,13 +8846,6 @@ __metadata: languageName: node linkType: hard -"@types/wrap-ansi@npm:^3.0.0": - version: 3.0.0 - resolution: "@types/wrap-ansi@npm:3.0.0" - checksum: 10c0/8d8f53363f360f38135301a06b596c295433ad01debd082078c33c6ed98b05a5c8fe8853a88265432126096084f4a135ec1564e3daad631b83296905509f90b3 - languageName: node - linkType: hard - "@types/ws@npm:^8, @types/ws@npm:^8.5.5": version: 8.5.10 resolution: "@types/ws@npm:8.5.10" @@ -9087,22 +9246,22 @@ __metadata: languageName: node linkType: hard -"@vitest/browser@npm:^2.1.3": - version: 2.1.3 - resolution: "@vitest/browser@npm:2.1.3" +"@vitest/browser@npm:^3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/browser@npm:3.0.0-beta.3" dependencies: "@testing-library/dom": "npm:^10.4.0" "@testing-library/user-event": "npm:^14.5.2" - "@vitest/mocker": "npm:2.1.3" - "@vitest/utils": "npm:2.1.3" - magic-string: "npm:^0.30.11" - msw: "npm:^2.3.5" - sirv: "npm:^2.0.4" + "@vitest/mocker": "npm:3.0.0-beta.3" + "@vitest/utils": "npm:3.0.0-beta.3" + magic-string: "npm:^0.30.17" + msw: "npm:^2.7.0" + sirv: "npm:^3.0.0" tinyrainbow: "npm:^1.2.0" ws: "npm:^8.18.0" peerDependencies: playwright: "*" - vitest: 2.1.3 + vitest: 3.0.0-beta.3 webdriverio: "*" peerDependenciesMeta: playwright: @@ -9111,53 +9270,53 @@ __metadata: optional: true webdriverio: optional: true - checksum: 10c0/428a8d62ffcc2d637363fc7eb986d6beaeda7681b032d785f2bc475f8d105a14c674610e22a0a0c74e4ee10774b3709b11bc359e0458c6867c3d4acdc3f190a6 + checksum: 10c0/c475c8457218fa4422029b0b36d2a6d3ac93bfa000e77ac836bcafc3ab4477177ed4f9e35c295209ab1a9382a0d49b7e7cff6a0445eef6ac8b7852beb798b6b2 languageName: node linkType: hard -"@vitest/coverage-istanbul@npm:^2.1.3": - version: 2.1.3 - resolution: "@vitest/coverage-istanbul@npm:2.1.3" +"@vitest/coverage-istanbul@npm:^3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/coverage-istanbul@npm:3.0.0-beta.3" dependencies: "@istanbuljs/schema": "npm:^0.1.3" - debug: "npm:^4.3.6" + debug: "npm:^4.4.0" istanbul-lib-coverage: "npm:^3.2.2" istanbul-lib-instrument: "npm:^6.0.3" istanbul-lib-report: "npm:^3.0.1" istanbul-lib-source-maps: "npm:^5.0.6" istanbul-reports: "npm:^3.1.7" - magicast: "npm:^0.3.4" + magicast: "npm:^0.3.5" test-exclude: "npm:^7.0.1" tinyrainbow: "npm:^1.2.0" peerDependencies: - vitest: 2.1.3 - checksum: 10c0/6b21eb219f45dc0f3bfb35049280658687b6b2f4ba5e17dc2c7e2c221f5d37e60c6962c5cfd77bd5f2848bb56debd26f82e5684b293f5775a8a416a0173f1803 + vitest: 3.0.0-beta.3 + checksum: 10c0/dc62761f7653592d1270652c46f5f98246406b42bf1b5a540fe83e32f6818ca1d14a7f963d7da78e6c8e9a637e6d8755424c45aeb35252a58c2ff80b195661da languageName: node linkType: hard -"@vitest/coverage-v8@npm:^2.1.3": - version: 2.1.3 - resolution: "@vitest/coverage-v8@npm:2.1.3" +"@vitest/coverage-v8@npm:^3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/coverage-v8@npm:3.0.0-beta.3" dependencies: "@ampproject/remapping": "npm:^2.3.0" "@bcoe/v8-coverage": "npm:^0.2.3" - debug: "npm:^4.3.6" + debug: "npm:^4.4.0" istanbul-lib-coverage: "npm:^3.2.2" istanbul-lib-report: "npm:^3.0.1" istanbul-lib-source-maps: "npm:^5.0.6" istanbul-reports: "npm:^3.1.7" - magic-string: "npm:^0.30.11" - magicast: "npm:^0.3.4" - std-env: "npm:^3.7.0" + magic-string: "npm:^0.30.17" + magicast: "npm:^0.3.5" + std-env: "npm:^3.8.0" test-exclude: "npm:^7.0.1" tinyrainbow: "npm:^1.2.0" peerDependencies: - "@vitest/browser": 2.1.3 - vitest: 2.1.3 + "@vitest/browser": 3.0.0-beta.3 + vitest: 3.0.0-beta.3 peerDependenciesMeta: "@vitest/browser": optional: true - checksum: 10c0/5fdff9e9dd8b8d2030c00a5273ba2b27441c0cb45d007b6671504745dac6d095c160a01433789e7ed1ca6cd234246f883c1d52c02cfb62f8ae81dda17dd56bc6 + checksum: 10c0/b8ef161a557d0d6490dd3d7836fbb29ab01a090be6856cb45e05c7777e8d5841d3aa31e371b6d795820ff06311d303f7dabbb6773ed19e00ef88f9947680f3b7 languageName: node linkType: hard @@ -9173,15 +9332,15 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/expect@npm:2.1.3" +"@vitest/expect@npm:3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/expect@npm:3.0.0-beta.3" dependencies: - "@vitest/spy": "npm:2.1.3" - "@vitest/utils": "npm:2.1.3" - chai: "npm:^5.1.1" + "@vitest/spy": "npm:3.0.0-beta.3" + "@vitest/utils": "npm:3.0.0-beta.3" + chai: "npm:^5.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/0837adcbb938feebcc083664afc5c4d12e42f1f2442b6f1bedc6b5650a8ff2448b1f10713b45afb099c839fb5cf766c971736267fa9b0fe2ac87f3e2d7f782c2 + checksum: 10c0/41b5bc8eb9ff73c9b372489e90a16f7e0885544cf92831e40482cd0a97c9796a4b18e7abdffb200755d917dfab314806aa7583461312424685acd63db5b55e1d languageName: node linkType: hard @@ -9197,23 +9356,22 @@ __metadata: languageName: node linkType: hard -"@vitest/mocker@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/mocker@npm:2.1.3" +"@vitest/mocker@npm:3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/mocker@npm:3.0.0-beta.3" dependencies: - "@vitest/spy": "npm:2.1.3" + "@vitest/spy": "npm:3.0.0-beta.3" estree-walker: "npm:^3.0.3" - magic-string: "npm:^0.30.11" + magic-string: "npm:^0.30.17" peerDependencies: - "@vitest/spy": 2.1.3 - msw: ^2.3.5 - vite: ^5.0.0 + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - checksum: 10c0/03c80628d092244f21a0ba9041665fc75f987d0d11fab1ae0b7027ec21e503f65057e8c24b936602c5f852d83fbb183da13d05dba117c99785b41b3dafd105ce + checksum: 10c0/2402086b8567f860846aa0c00fb0256058a129ad0e4aad0bc691ee9b054c595920df1044b205a650b16f2dfbc535eaf9f39e3bc4e88d0d1c5546dd0dfabbd698 languageName: node linkType: hard @@ -9226,7 +9384,7 @@ __metadata: languageName: node linkType: hard -"@vitest/pretty-format@npm:2.1.3, @vitest/pretty-format@npm:^2.1.3": +"@vitest/pretty-format@npm:2.1.3": version: 2.1.3 resolution: "@vitest/pretty-format@npm:2.1.3" dependencies: @@ -9235,24 +9393,33 @@ __metadata: languageName: node linkType: hard -"@vitest/runner@npm:2.1.3, @vitest/runner@npm:^2.1.3": - version: 2.1.3 - resolution: "@vitest/runner@npm:2.1.3" +"@vitest/pretty-format@npm:3.0.0-beta.3, @vitest/pretty-format@npm:^3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/pretty-format@npm:3.0.0-beta.3" dependencies: - "@vitest/utils": "npm:2.1.3" + tinyrainbow: "npm:^1.2.0" + checksum: 10c0/9cac796784b01d185e97d3f10c008e7b1548c9a854c5e43e96d83340f8a38d2c3e1a094ded4617d0eafb40330e16b3542e5ed91110bec180d504192ad393e298 + languageName: node + linkType: hard + +"@vitest/runner@npm:3.0.0-beta.3, @vitest/runner@npm:^3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/runner@npm:3.0.0-beta.3" + dependencies: + "@vitest/utils": "npm:3.0.0-beta.3" pathe: "npm:^1.1.2" - checksum: 10c0/d5b077643265d10025e22fa64a0e54c3d4fddc23e05f9fcd143dbcc4080851b0df31985986e57890a974577a18d3af624758b6062801d7dd96f9b4f2eaf591f1 + checksum: 10c0/c3cdb389cfa44f6a1d4601e6be547c1d233f5a967fbfe729c1c797e98691405569028a0a049952b6153c902ec8750ec93fdd428e41f1854bfe421b6bbad01c15 languageName: node linkType: hard -"@vitest/snapshot@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/snapshot@npm:2.1.3" +"@vitest/snapshot@npm:3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/snapshot@npm:3.0.0-beta.3" dependencies: - "@vitest/pretty-format": "npm:2.1.3" - magic-string: "npm:^0.30.11" + "@vitest/pretty-format": "npm:3.0.0-beta.3" + magic-string: "npm:^0.30.17" pathe: "npm:^1.1.2" - checksum: 10c0/a3dcea6a5f7581b6a34dc3bf5f7bd42a05e2ccf6e1171d9f1b759688aebe650e6412564d066aeaa45e83ac549d453b6a3edcf774a8ac728c0c639f8dc919039f + checksum: 10c0/ca157fa555e3ce5564891dc9fe65e54181c9e39f1d95776492fd23fff17d8a1c1de4ccbf1e026c2b8d7b88b62d3c6ed65ac605baf0549407dd4a9e77161f4f77 languageName: node linkType: hard @@ -9265,12 +9432,12 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/spy@npm:2.1.3" +"@vitest/spy@npm:3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/spy@npm:3.0.0-beta.3" dependencies: - tinyspy: "npm:^3.0.0" - checksum: 10c0/8d85a5c2848c5bd81892af989aebad65d0c7ae74094aa98ad4f35ecf80755259c7a748a8e7bf683b2906fac29a51fc0ffa82f8fc073b36dbd8a0418261fccdba + tinyspy: "npm:^3.0.2" + checksum: 10c0/68177eb00b81eeb26ba320d2bde8fde4fb6d10ba54fb05fad679997e11a9d0a24c30710731cc5c06425ef2d176ba02da47d6bdfe0e99a349411037d2af62081c languageName: node linkType: hard @@ -9286,7 +9453,18 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:2.1.3, @vitest/utils@npm:^2.1.1": +"@vitest/utils@npm:3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "@vitest/utils@npm:3.0.0-beta.3" + dependencies: + "@vitest/pretty-format": "npm:3.0.0-beta.3" + loupe: "npm:^3.1.2" + tinyrainbow: "npm:^1.2.0" + checksum: 10c0/9bd9a8dbeae1d54d2912ef12274216e124c8f2db424a8b45c395736824a10cf202c47b7509712bb949869b703894ab41a6953c3f4d748593fe3a1d6066ce38cc + languageName: node + linkType: hard + +"@vitest/utils@npm:^2.1.1": version: 2.1.3 resolution: "@vitest/utils@npm:2.1.3" dependencies: @@ -11900,6 +12078,19 @@ __metadata: languageName: node linkType: hard +"chai@npm:^5.1.2": + version: 5.1.2 + resolution: "chai@npm:5.1.2" + dependencies: + assertion-error: "npm:^2.0.1" + check-error: "npm:^2.1.1" + deep-eql: "npm:^5.0.1" + loupe: "npm:^3.1.0" + pathval: "npm:^2.0.0" + checksum: 10c0/6c04ff8495b6e535df9c1b062b6b094828454e9a3c9493393e55b2f4dbff7aa2a29a4645133cad160fb00a16196c4dc03dc9bb37e1f4ba9df3b5f50d7533a736 + languageName: node + linkType: hard + "chalk@npm:5.3.0, chalk@npm:^5.0.0, chalk@npm:^5.0.1, chalk@npm:^5.2.0, chalk@npm:^5.3.0": version: 5.3.0 resolution: "chalk@npm:5.3.0" @@ -12183,7 +12374,7 @@ __metadata: languageName: node linkType: hard -"cli-spinners@npm:^2.5.0, cli-spinners@npm:^2.9.2": +"cli-spinners@npm:^2.5.0": version: 2.9.2 resolution: "cli-spinners@npm:2.9.2" checksum: 10c0/907a1c227ddf0d7a101e7ab8b300affc742ead4b4ebe920a5bf1bc6d45dce2958fcd195eb28fa25275062fe6fa9b109b93b63bc8033396ed3bcb50297008b3a3 @@ -12673,10 +12864,10 @@ __metadata: languageName: node linkType: hard -"cookie@npm:^0.5.0": - version: 0.5.0 - resolution: "cookie@npm:0.5.0" - checksum: 10c0/c01ca3ef8d7b8187bae434434582288681273b5a9ed27521d4d7f9f7928fe0c920df0decd9f9d3bbd2d14ac432b8c8cf42b98b3bdd5bfe0e6edddeebebe8b61d +"cookie@npm:^0.7.2": + version: 0.7.2 + resolution: "cookie@npm:0.7.2" + checksum: 10c0/9596e8ccdbf1a3a88ae02cf5ee80c1c50959423e1022e4e60b91dd87c622af1da309253d8abdb258fb5e3eacb4f08e579dc58b4897b8087574eee0fd35dfa5d2 languageName: node linkType: hard @@ -13189,7 +13380,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:^4.3.7": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.7": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -13222,6 +13413,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.4.0": + version: 4.4.0 + resolution: "debug@npm:4.4.0" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de + languageName: node + linkType: hard + "decamelize@npm:^1.2.0": version: 1.2.0 resolution: "decamelize@npm:1.2.0" @@ -14283,7 +14486,7 @@ __metadata: languageName: node linkType: hard -"error-stack-parser-es@npm:^0.1.4": +"error-stack-parser-es@npm:^0.1.5": version: 0.1.5 resolution: "error-stack-parser-es@npm:0.1.5" checksum: 10c0/60331183269d5d5f2d80ce01be58387e7f7ef86ec821db7bba3e7aad201174b3f1b561973c678af7ec945542de8f2d1d23d5152ff8adf6154080eff02cd0e0b5 @@ -14423,6 +14626,13 @@ __metadata: languageName: node linkType: hard +"es-module-lexer@npm:^1.5.4": + version: 1.6.0 + resolution: "es-module-lexer@npm:1.6.0" + checksum: 10c0/667309454411c0b95c476025929881e71400d74a746ffa1ff4cb450bd87f8e33e8eef7854d68e401895039ac0bac64e7809acbebb6253e055dd49ea9e3ea9212 + languageName: node + linkType: hard + "es-object-atoms@npm:^1.0.0": version: 1.0.0 resolution: "es-object-atoms@npm:1.0.0" @@ -15446,6 +15656,13 @@ __metadata: languageName: node linkType: hard +"expect-type@npm:^1.1.0": + version: 1.1.0 + resolution: "expect-type@npm:1.1.0" + checksum: 10c0/5af0febbe8fe18da05a6d51e3677adafd75213512285408156b368ca471252565d5ca6e59e4bddab25121f3cfcbbebc6a5489f8cc9db131cc29e69dcdcc7ae15 + languageName: node + linkType: hard + "exponential-backoff@npm:^3.1.1": version: 3.1.1 resolution: "exponential-backoff@npm:3.1.1" @@ -19836,6 +20053,13 @@ __metadata: languageName: node linkType: hard +"loupe@npm:^3.1.2": + version: 3.1.2 + resolution: "loupe@npm:3.1.2" + checksum: 10c0/b13c02e3ddd6a9d5f8bf84133b3242de556512d824dddeea71cce2dbd6579c8f4d672381c4e742d45cf4423d0701765b4a6e5fbc24701def16bc2b40f8daa96a + languageName: node + linkType: hard + "lower-case@npm:^2.0.2": version: 2.0.2 resolution: "lower-case@npm:2.0.2" @@ -19955,14 +20179,23 @@ __metadata: languageName: node linkType: hard -"magicast@npm:^0.3.4": - version: 0.3.4 - resolution: "magicast@npm:0.3.4" +"magic-string@npm:^0.30.17": + version: 0.30.17 + resolution: "magic-string@npm:0.30.17" dependencies: - "@babel/parser": "npm:^7.24.4" - "@babel/types": "npm:^7.24.0" + "@jridgewell/sourcemap-codec": "npm:^1.5.0" + checksum: 10c0/16826e415d04b88378f200fe022b53e638e3838b9e496edda6c0e086d7753a44a6ed187adc72d19f3623810589bf139af1a315541cd6a26ae0771a0193eaf7b8 + languageName: node + linkType: hard + +"magicast@npm:^0.3.5": + version: 0.3.5 + resolution: "magicast@npm:0.3.5" + dependencies: + "@babel/parser": "npm:^7.25.4" + "@babel/types": "npm:^7.25.4" source-map-js: "npm:^1.2.0" - checksum: 10c0/7ebaaac397b13c31ca05e6d9649296751d76749b945d10a0800107872119fbdf267acdb604571d25e38ec6fd7ab3568a951b6e76eaef1caba9eaa11778fd9783 + checksum: 10c0/a6cacc0a848af84f03e3f5bda7b0de75e4d0aa9ddce5517fd23ed0f31b5ddd51b2d0ff0b7e09b51f7de0f4053c7a1107117edda6b0732dca3e9e39e6c5a68c64 languageName: node linkType: hard @@ -21593,26 +21826,27 @@ __metadata: languageName: node linkType: hard -"msw@npm:^2.3.5": - version: 2.4.8 - resolution: "msw@npm:2.4.8" +"msw@npm:^2.7.0": + version: 2.7.0 + resolution: "msw@npm:2.7.0" dependencies: - "@bundled-es-modules/cookie": "npm:^2.0.0" + "@bundled-es-modules/cookie": "npm:^2.0.1" "@bundled-es-modules/statuses": "npm:^1.0.1" "@bundled-es-modules/tough-cookie": "npm:^0.1.6" - "@inquirer/confirm": "npm:^3.0.0" - "@mswjs/interceptors": "npm:^0.35.6" + "@inquirer/confirm": "npm:^5.0.0" + "@mswjs/interceptors": "npm:^0.37.0" + "@open-draft/deferred-promise": "npm:^2.2.0" "@open-draft/until": "npm:^2.1.0" "@types/cookie": "npm:^0.6.0" "@types/statuses": "npm:^2.0.4" - chalk: "npm:^4.1.2" graphql: "npm:^16.8.1" headers-polyfill: "npm:^4.0.2" is-node-process: "npm:^1.2.0" - outvariant: "npm:^1.4.2" + outvariant: "npm:^1.4.3" path-to-regexp: "npm:^6.3.0" + picocolors: "npm:^1.1.1" strict-event-emitter: "npm:^0.5.1" - type-fest: "npm:^4.9.0" + type-fest: "npm:^4.26.1" yargs: "npm:^17.7.2" peerDependencies: typescript: ">= 4.8.x" @@ -21621,7 +21855,7 @@ __metadata: optional: true bin: msw: cli/index.js - checksum: 10c0/33a8c5697f7cb003a2af33ff6b259eaf7babf180fadf0697d107d0856ab0d2ff1a80d319e788d9127f289ff091334bee589f348180a1fdd0914bf8c4725830dc + checksum: 10c0/14fb8299dcb6bcf2c6b3777a3127ed6be795a281598394022650b82889f1b70e0ada96559fefead351b18ed5db4e0a3a64367b758dd64f74dea63edc8eb2b551 languageName: node linkType: hard @@ -21651,13 +21885,20 @@ __metadata: languageName: node linkType: hard -"mute-stream@npm:1.0.0, mute-stream@npm:^1.0.0": +"mute-stream@npm:1.0.0": version: 1.0.0 resolution: "mute-stream@npm:1.0.0" checksum: 10c0/dce2a9ccda171ec979a3b4f869a102b1343dee35e920146776780de182f16eae459644d187e38d59a3d37adf85685e1c17c38cf7bfda7e39a9880f7a1d10a74c languageName: node linkType: hard +"mute-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "mute-stream@npm:2.0.0" + checksum: 10c0/2cf48a2087175c60c8dcdbc619908b49c07f7adcfc37d29236b0c5c612d6204f789104c98cc44d38acab7b3c96f4a3ec2cfdc4934d0738d876dbefa2a12c69f4 + languageName: node + linkType: hard + "nanoid@npm:^3.3.6, nanoid@npm:^3.3.7": version: 3.3.7 resolution: "nanoid@npm:3.3.7" @@ -22573,7 +22814,7 @@ __metadata: languageName: node linkType: hard -"outvariant@npm:^1.4.0, outvariant@npm:^1.4.2, outvariant@npm:^1.4.3": +"outvariant@npm:^1.4.0, outvariant@npm:^1.4.3": version: 1.4.3 resolution: "outvariant@npm:1.4.3" checksum: 10c0/5976ca7740349cb8c71bd3382e2a762b1aeca6f33dc984d9d896acdf3c61f78c3afcf1bfe9cc633a7b3c4b295ec94d292048f83ea2b2594fae4496656eba992c @@ -23173,6 +23414,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.1.1": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 + languageName: node + linkType: hard + "picomatch@npm:4.0.1": version: 4.0.1 resolution: "picomatch@npm:4.0.1" @@ -23606,6 +23854,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.4.49": + version: 8.4.49 + resolution: "postcss@npm:8.4.49" + dependencies: + nanoid: "npm:^3.3.7" + picocolors: "npm:^1.1.1" + source-map-js: "npm:^1.2.1" + checksum: 10c0/f1b3f17aaf36d136f59ec373459f18129908235e65dbdc3aee5eef8eba0756106f52de5ec4682e29a2eab53eb25170e7e871b3e4b52a8f1de3d344a514306be3 + languageName: node + linkType: hard + "preact@npm:^10.5.13": version: 10.19.3 resolution: "preact@npm:10.19.3" @@ -25689,6 +25948,78 @@ __metadata: languageName: node linkType: hard +"rollup@npm:^4.23.0": + version: 4.29.1 + resolution: "rollup@npm:4.29.1" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.29.1" + "@rollup/rollup-android-arm64": "npm:4.29.1" + "@rollup/rollup-darwin-arm64": "npm:4.29.1" + "@rollup/rollup-darwin-x64": "npm:4.29.1" + "@rollup/rollup-freebsd-arm64": "npm:4.29.1" + "@rollup/rollup-freebsd-x64": "npm:4.29.1" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.29.1" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.29.1" + "@rollup/rollup-linux-arm64-gnu": "npm:4.29.1" + "@rollup/rollup-linux-arm64-musl": "npm:4.29.1" + "@rollup/rollup-linux-loongarch64-gnu": "npm:4.29.1" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.29.1" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.29.1" + "@rollup/rollup-linux-s390x-gnu": "npm:4.29.1" + "@rollup/rollup-linux-x64-gnu": "npm:4.29.1" + "@rollup/rollup-linux-x64-musl": "npm:4.29.1" + "@rollup/rollup-win32-arm64-msvc": "npm:4.29.1" + "@rollup/rollup-win32-ia32-msvc": "npm:4.29.1" + "@rollup/rollup-win32-x64-msvc": "npm:4.29.1" + "@types/estree": "npm:1.0.6" + fsevents: "npm:~2.3.2" + dependenciesMeta: + "@rollup/rollup-android-arm-eabi": + optional: true + "@rollup/rollup-android-arm64": + optional: true + "@rollup/rollup-darwin-arm64": + optional: true + "@rollup/rollup-darwin-x64": + optional: true + "@rollup/rollup-freebsd-arm64": + optional: true + "@rollup/rollup-freebsd-x64": + optional: true + "@rollup/rollup-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm-musleabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + optional: true + "@rollup/rollup-linux-loongarch64-gnu": + optional: true + "@rollup/rollup-linux-powerpc64le-gnu": + optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true + "@rollup/rollup-linux-s390x-gnu": + optional: true + "@rollup/rollup-linux-x64-gnu": + optional: true + "@rollup/rollup-linux-x64-musl": + optional: true + "@rollup/rollup-win32-arm64-msvc": + optional: true + "@rollup/rollup-win32-ia32-msvc": + optional: true + "@rollup/rollup-win32-x64-msvc": + optional: true + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: 10c0/fcd0321df78fdc74b36858e92c4b73ebf5aa8f0b9cf7c446f008e0dc3c5c4ed855d662dc44e5a09c7794bbe91017b4dd7be88b619c239f0494f9f0fbfa67c557 + languageName: node + linkType: hard + "rsvp@npm:^3.0.14, rsvp@npm:^3.0.18": version: 3.6.2 resolution: "rsvp@npm:3.6.2" @@ -26361,6 +26692,17 @@ __metadata: languageName: node linkType: hard +"sirv@npm:^3.0.0": + version: 3.0.0 + resolution: "sirv@npm:3.0.0" + dependencies: + "@polka/url": "npm:^1.0.0-next.24" + mrmime: "npm:^2.0.0" + totalist: "npm:^3.0.0" + checksum: 10c0/282c52ee5a93cafa297096ad31aa6c3004a21d4c93abe728b701e51e4329acb887f6e92f07696225414fd6bb4a7782fd64a42d0b6b6467ae0f66bd3fde90b865 + languageName: node + linkType: hard + "sisteransi@npm:^1.0.5": version: 1.0.5 resolution: "sisteransi@npm:1.0.5" @@ -26536,6 +26878,13 @@ __metadata: languageName: node linkType: hard +"source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf + languageName: node + linkType: hard + "source-map-loader@npm:5.0.0": version: 5.0.0 resolution: "source-map-loader@npm:5.0.0" @@ -26787,7 +27136,7 @@ __metadata: languageName: node linkType: hard -"std-env@npm:^3.7.0": +"std-env@npm:^3.8.0": version: 3.8.0 resolution: "std-env@npm:3.8.0" checksum: 10c0/f560a2902fd0fa3d648d7d0acecbd19d664006f7372c1fba197ed4c216b4c9e48db6e2769b5fe1616d42a9333c9f066c5011935035e85c59f45dc4f796272040 @@ -27618,10 +27967,10 @@ __metadata: languageName: node linkType: hard -"tinyexec@npm:^0.3.0": - version: 0.3.0 - resolution: "tinyexec@npm:0.3.0" - checksum: 10c0/138a4f4241aea6b6312559508468ab275a31955e66e2f57ed206e0aaabecee622624f208c5740345f0a66e33478fd065e359ed1eb1269eb6fd4fa25d44d0ba3b +"tinyexec@npm:^0.3.1": + version: 0.3.2 + resolution: "tinyexec@npm:0.3.2" + checksum: 10c0/3efbf791a911be0bf0821eab37a3445c2ba07acc1522b1fa84ae1e55f10425076f1290f680286345ed919549ad67527d07281f1c19d584df3b74326909eb1f90 languageName: node linkType: hard @@ -27635,10 +27984,10 @@ __metadata: languageName: node linkType: hard -"tinypool@npm:^1.0.0": - version: 1.0.0 - resolution: "tinypool@npm:1.0.0" - checksum: 10c0/71b20b9c54366393831c286a0772380c20f8cad9546d724c484edb47aea3228f274c58e98cf51d28c40869b39f5273209ef3ea94a9d2a23f8b292f4731cd3e4e +"tinypool@npm:^1.0.2": + version: 1.0.2 + resolution: "tinypool@npm:1.0.2" + checksum: 10c0/31ac184c0ff1cf9a074741254fe9ea6de95026749eb2b8ec6fd2b9d8ca94abdccda731f8e102e7f32e72ed3b36d32c6975fd5f5523df3f1b6de6c3d8dfd95e63 languageName: node linkType: hard @@ -27663,6 +28012,13 @@ __metadata: languageName: node linkType: hard +"tinyspy@npm:^3.0.2": + version: 3.0.2 + resolution: "tinyspy@npm:3.0.2" + checksum: 10c0/55ffad24e346622b59292e097c2ee30a63919d5acb7ceca87fc0d1c223090089890587b426e20054733f97a58f20af2c349fb7cc193697203868ab7ba00bcea0 + languageName: node + linkType: hard + "tmp@npm:0.0.28": version: 0.0.28 resolution: "tmp@npm:0.0.28" @@ -29081,39 +29437,40 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:2.1.3": - version: 2.1.3 - resolution: "vite-node@npm:2.1.3" +"vite-node@npm:3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "vite-node@npm:3.0.0-beta.3" dependencies: cac: "npm:^6.7.14" - debug: "npm:^4.3.6" + debug: "npm:^4.4.0" + es-module-lexer: "npm:^1.5.4" pathe: "npm:^1.1.2" - vite: "npm:^5.0.0" + vite: "npm:^5.0.0 || ^6.0.0" bin: vite-node: vite-node.mjs - checksum: 10c0/1b06139880a8170651e025e8c35aa92a917f8ec8f24507cda5bf4be09843f6447e1f494932a8d7eb98124f1c8c9fee02283ef318ddd57e2b861d2d85a409a206 + checksum: 10c0/2bb427dea20c4cda571cbd61deca51b7b15de5b1b9e9f0a8b0ecfd184d3416f2793c1a74611a35b00e2ccb3314c273777bbd162414a6091d8acad1246df9e90a languageName: node linkType: hard -"vite-plugin-inspect@npm:^0.8.5": - version: 0.8.5 - resolution: "vite-plugin-inspect@npm:0.8.5" +"vite-plugin-inspect@npm:^0.10.6": + version: 0.10.6 + resolution: "vite-plugin-inspect@npm:0.10.6" dependencies: "@antfu/utils": "npm:^0.7.10" - "@rollup/pluginutils": "npm:^5.1.0" - debug: "npm:^4.3.5" - error-stack-parser-es: "npm:^0.1.4" + "@rollup/pluginutils": "npm:^5.1.4" + debug: "npm:^4.4.0" + error-stack-parser-es: "npm:^0.1.5" fs-extra: "npm:^11.2.0" open: "npm:^10.1.0" perfect-debounce: "npm:^1.0.0" - picocolors: "npm:^1.0.1" - sirv: "npm:^2.0.4" + picocolors: "npm:^1.1.1" + sirv: "npm:^3.0.0" peerDependencies: - vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 + vite: ^6.0.0 peerDependenciesMeta: "@nuxt/kit": optional: true - checksum: 10c0/b44c80a9a9b7677529e8674fdeaf4a9c052e2237cfb749d558898a487f481ac7d797ed2067eca93a5da8ade50bae9c289919c5aefdb26a4b5ceccc75b24b78a3 + checksum: 10c0/40a62d7b3b7ef1d50aa7b36b5e426b8b066f9c418770534b778d6b2792cebbc2d335192754cc844dcd10d19f3cddee7ae64fc4d5360b1a53ff79d738a11a4a8e languageName: node linkType: hard @@ -29155,7 +29512,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:5.1.5, vite@npm:^5.0.0": +"vite@npm:5.1.5": version: 5.1.5 resolution: "vite@npm:5.1.5" dependencies: @@ -29235,6 +29592,58 @@ __metadata: languageName: node linkType: hard +"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.0.7": + version: 6.0.7 + resolution: "vite@npm:6.0.7" + dependencies: + esbuild: "npm:^0.24.2" + fsevents: "npm:~2.3.3" + postcss: "npm:^8.4.49" + rollup: "npm:^4.23.0" + peerDependencies: + "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: ">=1.21.0" + less: "*" + lightningcss: ^1.21.0 + sass: "*" + sass-embedded: "*" + stylus: "*" + sugarss: "*" + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + bin: + vite: bin/vite.js + checksum: 10c0/ae81047b4290a7206b9394a39a782d509e9610462e7946422ba22d5bc615b5a322c07e33d7bf9dd0b3312ec3f5c63353b725913d1519324bfdf539b4f1e03f52 + languageName: node + linkType: hard + "vitefu@npm:^1.0.3": version: 1.0.3 resolution: "vitefu@npm:1.0.3" @@ -29263,34 +29672,35 @@ __metadata: languageName: node linkType: hard -"vitest@npm:^2.1.3": - version: 2.1.3 - resolution: "vitest@npm:2.1.3" - dependencies: - "@vitest/expect": "npm:2.1.3" - "@vitest/mocker": "npm:2.1.3" - "@vitest/pretty-format": "npm:^2.1.3" - "@vitest/runner": "npm:2.1.3" - "@vitest/snapshot": "npm:2.1.3" - "@vitest/spy": "npm:2.1.3" - "@vitest/utils": "npm:2.1.3" - chai: "npm:^5.1.1" - debug: "npm:^4.3.6" - magic-string: "npm:^0.30.11" +"vitest@npm:^3.0.0-beta.3": + version: 3.0.0-beta.3 + resolution: "vitest@npm:3.0.0-beta.3" + dependencies: + "@vitest/expect": "npm:3.0.0-beta.3" + "@vitest/mocker": "npm:3.0.0-beta.3" + "@vitest/pretty-format": "npm:^3.0.0-beta.3" + "@vitest/runner": "npm:3.0.0-beta.3" + "@vitest/snapshot": "npm:3.0.0-beta.3" + "@vitest/spy": "npm:3.0.0-beta.3" + "@vitest/utils": "npm:3.0.0-beta.3" + chai: "npm:^5.1.2" + debug: "npm:^4.4.0" + expect-type: "npm:^1.1.0" + magic-string: "npm:^0.30.17" pathe: "npm:^1.1.2" - std-env: "npm:^3.7.0" + std-env: "npm:^3.8.0" tinybench: "npm:^2.9.0" - tinyexec: "npm:^0.3.0" - tinypool: "npm:^1.0.0" + tinyexec: "npm:^0.3.1" + tinypool: "npm:^1.0.2" tinyrainbow: "npm:^1.2.0" - vite: "npm:^5.0.0" - vite-node: "npm:2.1.3" + vite: "npm:^5.0.0 || ^6.0.0" + vite-node: "npm:3.0.0-beta.3" why-is-node-running: "npm:^2.3.0" peerDependencies: "@edge-runtime/vm": "*" - "@types/node": ^18.0.0 || >=20.0.0 - "@vitest/browser": 2.1.3 - "@vitest/ui": 2.1.3 + "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + "@vitest/browser": 3.0.0-beta.3 + "@vitest/ui": 3.0.0-beta.3 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -29308,7 +29718,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10c0/7688fdce37205e7f3b448039df216e103e3a52994af0201993e22decbb558d129a734001b991f3c3d80bf4a4ef91ca6a5665a7395d5b051249da60a0016eda36 + checksum: 10c0/6ddec4cbe4768f6fbf81bce614e1cf2e0b0b00c737486a9ba010816081bd25ef38523029e8454a739210b12ee282d769e89f76a8b318682f55f26a4ce9002991 languageName: node linkType: hard From e61762b41a04894ad108d35da0300d117ad8a2e4 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 3 Jan 2025 11:53:19 +0100 Subject: [PATCH 02/20] Adjust tests for Vitest 3 --- .../PreviewWeb.integration.test.ts | 204 +++++++++--------- .../client/docs/angular-properties.test.ts | 6 +- .../transforms/__tests__/transforms.tests.js | 4 +- .../lib/compiler/json-to-csf-compiler.test.ts | 2 +- .../src/__test__/portable-stories.test.tsx | 4 +- .../react/src/docs/extractArgTypes.test.ts | 8 +- .../docs/web-components-properties.test.ts | 8 +- ...ividual-snapshot-tests-portable-stories.md | 22 +- ...able-stories-vitest-multi-snapshot-test.md | 4 +- 9 files changed, 130 insertions(+), 132 deletions(-) diff --git a/code/core/src/preview-api/modules/preview-web/PreviewWeb.integration.test.ts b/code/core/src/preview-api/modules/preview-web/PreviewWeb.integration.test.ts index 3a6c21dd7239..0c47c5a61fc2 100644 --- a/code/core/src/preview-api/modules/preview-web/PreviewWeb.integration.test.ts +++ b/code/core/src/preview-api/modules/preview-web/PreviewWeb.integration.test.ts @@ -104,122 +104,118 @@ beforeEach(() => { * Skipping this test, because it causes a cyclical dependency error, where core depends on docs & * blocks This was done to avoid a conflict in the CPC work, we should revisit this. */ -describe.skip( - 'PreviewWeb', - () => { - describe('initial render', () => { - it('renders story mode through the stack', async () => { - const { DocsRenderer } = await import('../../../../../addons/docs/src/index'); - projectAnnotations.parameters.docs.renderer = () => new DocsRenderer() as any; - - projectAnnotations.renderToCanvas.mockImplementationOnce( - ({ storyFn }: RenderContext) => storyFn() - ); - document.location.search = '?id=component-one--a'; - await new PreviewWeb(importFn, getProjectAnnotations).ready(); - - await waitForRender(); - - await vi.waitFor(() => { - expect(projectAnnotations.decorators[0]).toHaveBeenCalled(); - expect(projectAnnotations.render).toHaveBeenCalled(); - }); +describe('PreviewWeb', { skip: true }, () => { + describe('initial render', () => { + it('renders story mode through the stack', async () => { + const { DocsRenderer } = await import('../../../../../addons/docs/src/index'); + projectAnnotations.parameters.docs.renderer = () => new DocsRenderer() as any; + + projectAnnotations.renderToCanvas.mockImplementationOnce(({ storyFn }: RenderContext) => + storyFn() + ); + document.location.search = '?id=component-one--a'; + await new PreviewWeb(importFn, getProjectAnnotations).ready(); + + await waitForRender(); + + await vi.waitFor(() => { + expect(projectAnnotations.decorators[0]).toHaveBeenCalled(); + expect(projectAnnotations.render).toHaveBeenCalled(); }); + }); - it('renders docs mode through docs page', async () => { - const { DocsRenderer } = await import('../../../../../addons/docs/src/index'); - projectAnnotations.parameters.docs.renderer = () => new DocsRenderer() as any; - - document.location.search = '?id=component-one--docs&viewMode=docs'; - const preview = new PreviewWeb(importFn, getProjectAnnotations); - - const docsRoot = document.createElement('div'); - vi.mocked(preview.view.prepareForDocs).mockReturnValue(docsRoot as any); - componentOneExports.default.parameters.docs.container.mockImplementationOnce(() => - React.createElement('div', {}, 'INSIDE') - ); - - await preview.ready(); - - await vi.waitFor( - () => { - if (docsRoot.outerHTML !== '
INSIDE
') { - throw new Error('DocsRoot not ready yet'); - } - }, - { - timeout: 2000, - } - ); + it('renders docs mode through docs page', async () => { + const { DocsRenderer } = await import('../../../../../addons/docs/src/index'); + projectAnnotations.parameters.docs.renderer = () => new DocsRenderer() as any; + + document.location.search = '?id=component-one--docs&viewMode=docs'; + const preview = new PreviewWeb(importFn, getProjectAnnotations); - expect(docsRoot.outerHTML).toMatchInlineSnapshot('"
INSIDE
"'); + const docsRoot = document.createElement('div'); + vi.mocked(preview.view.prepareForDocs).mockReturnValue(docsRoot as any); + componentOneExports.default.parameters.docs.container.mockImplementationOnce(() => + React.createElement('div', {}, 'INSIDE') + ); - // Extended timeout to try and avoid - // Error: Event was not emitted in time: storyRendered,docsRendered,storyThrewException,storyErrored,storyMissing - }, 10_000); + await preview.ready(); - it('sends docs rendering exceptions to showException', async () => { - const { DocsRenderer } = await import('../../../../../addons/docs/src/index'); - projectAnnotations.parameters.docs.renderer = () => new DocsRenderer() as any; + await vi.waitFor( + () => { + if (docsRoot.outerHTML !== '
INSIDE
') { + throw new Error('DocsRoot not ready yet'); + } + }, + { + timeout: 2000, + } + ); - document.location.search = '?id=component-one--docs&viewMode=docs'; - const preview = new PreviewWeb(importFn, getProjectAnnotations); + expect(docsRoot.outerHTML).toMatchInlineSnapshot('"
INSIDE
"'); - const docsRoot = document.createElement('div'); - vi.mocked(preview.view.prepareForDocs).mockReturnValue(docsRoot as any); - componentOneExports.default.parameters.docs.container.mockImplementation(() => { - throw new Error('Docs rendering error'); - }); + // Extended timeout to try and avoid + // Error: Event was not emitted in time: storyRendered,docsRendered,storyThrewException,storyErrored,storyMissing + }, 10_000); - vi.mocked(preview.view.showErrorDisplay).mockClear(); + it('sends docs rendering exceptions to showException', async () => { + const { DocsRenderer } = await import('../../../../../addons/docs/src/index'); + projectAnnotations.parameters.docs.renderer = () => new DocsRenderer() as any; - await preview.ready(); + document.location.search = '?id=component-one--docs&viewMode=docs'; + const preview = new PreviewWeb(importFn, getProjectAnnotations); - await vi.waitFor( - () => { - expect(preview.view.showErrorDisplay).toHaveBeenCalled(); - }, - { - timeout: 2000, - } - ); + const docsRoot = document.createElement('div'); + vi.mocked(preview.view.prepareForDocs).mockReturnValue(docsRoot as any); + componentOneExports.default.parameters.docs.container.mockImplementation(() => { + throw new Error('Docs rendering error'); }); - }); - describe('onGetGlobalMeta changed (HMR)', () => { - const newGlobalDecorator = vi.fn((s) => s()); - const newGetProjectAnnotations = () => { - return { - ...projectAnnotations, - args: { a: 'second' }, - globals: { a: 'second' }, - decorators: [newGlobalDecorator], - }; - }; + vi.mocked(preview.view.showErrorDisplay).mockClear(); + + await preview.ready(); - it('renders story mode through the updated stack', async () => { - const { DocsRenderer } = await import('../../../../../addons/docs/src/index'); - projectAnnotations.parameters.docs.renderer = () => new DocsRenderer() as any; - - document.location.search = '?id=component-one--a'; - const preview = new PreviewWeb(importFn, getProjectAnnotations); - await preview.ready(); - await waitForRender(); - - projectAnnotations.renderToCanvas.mockImplementationOnce( - ({ storyFn }: RenderContext) => storyFn() - ); - projectAnnotations.decorators[0].mockClear(); - mockChannel.emit.mockClear(); - preview.onGetProjectAnnotationsChanged({ getProjectAnnotations: newGetProjectAnnotations }); - - await vi.waitFor(() => { - expect(projectAnnotations.decorators[0]).not.toHaveBeenCalled(); - expect(newGlobalDecorator).toHaveBeenCalled(); - expect(projectAnnotations.render).toHaveBeenCalled(); - }); + await vi.waitFor( + () => { + expect(preview.view.showErrorDisplay).toHaveBeenCalled(); + }, + { + timeout: 2000, + } + ); + }); + }); + + describe('onGetGlobalMeta changed (HMR)', () => { + const newGlobalDecorator = vi.fn((s) => s()); + const newGetProjectAnnotations = () => { + return { + ...projectAnnotations, + args: { a: 'second' }, + globals: { a: 'second' }, + decorators: [newGlobalDecorator], + }; + }; + + it('renders story mode through the updated stack', async () => { + const { DocsRenderer } = await import('../../../../../addons/docs/src/index'); + projectAnnotations.parameters.docs.renderer = () => new DocsRenderer() as any; + + document.location.search = '?id=component-one--a'; + const preview = new PreviewWeb(importFn, getProjectAnnotations); + await preview.ready(); + await waitForRender(); + + projectAnnotations.renderToCanvas.mockImplementationOnce(({ storyFn }: RenderContext) => + storyFn() + ); + projectAnnotations.decorators[0].mockClear(); + mockChannel.emit.mockClear(); + preview.onGetProjectAnnotationsChanged({ getProjectAnnotations: newGetProjectAnnotations }); + + await vi.waitFor(() => { + expect(projectAnnotations.decorators[0]).not.toHaveBeenCalled(); + expect(newGlobalDecorator).toHaveBeenCalled(); + expect(projectAnnotations.render).toHaveBeenCalled(); }); }); - }, - { retry: 0 } -); + }); +}); diff --git a/code/frameworks/angular/src/client/docs/angular-properties.test.ts b/code/frameworks/angular/src/client/docs/angular-properties.test.ts index baa410f34fe4..a4531cbbe480 100644 --- a/code/frameworks/angular/src/client/docs/angular-properties.test.ts +++ b/code/frameworks/angular/src/client/docs/angular-properties.test.ts @@ -18,20 +18,20 @@ describe('angular component properties', () => { expect(true).toEqual(true); }); // TODO: Fix this test - // it(`${testEntry.name}`, () => { + // it(`${testEntry.name}`, async () => { // const inputPath = join(testDir, testFile); // // snapshot the output of compodoc // const compodocOutput = runCompodoc(inputPath); // const compodocJson = JSON.parse(compodocOutput); - // expect(compodocJson).toMatchFileSnapshot( + // await expect(compodocJson).toMatchFileSnapshot( // join(testDir, `compodoc-${SNAPSHOT_OS}.snapshot`) // ); // // snapshot the output of addon-docs angular-properties // const componentData = findComponentByName('InputComponent', compodocJson); // const argTypes = extractArgTypesFromData(componentData); - // expect(argTypes).toMatchFileSnapshot(join(testDir, 'argtypes.snapshot')); + // await expect(argTypes).toMatchFileSnapshot(join(testDir, 'argtypes.snapshot')); // }); } } diff --git a/code/lib/codemod/src/transforms/__tests__/transforms.tests.js b/code/lib/codemod/src/transforms/__tests__/transforms.tests.js index 85aab5dc009f..7d969a9acfc7 100644 --- a/code/lib/codemod/src/transforms/__tests__/transforms.tests.js +++ b/code/lib/codemod/src/transforms/__tests__/transforms.tests.js @@ -24,8 +24,8 @@ readdirSync(fixturesDir).forEach((transformName) => { .filter((fileName) => inputRegExp.test(fileName)) .forEach((fileName) => { const inputPath = join(transformFixturesDir, fileName); - it(`transforms correctly using "${fileName}" data`, () => - expect( + it(`transforms correctly using "${fileName}" data`, async () => + await expect( applyTransform(require(join(__dirname, '..', transformName)), null, { path: inputPath, source: fs.readFileSync(inputPath, 'utf8'), diff --git a/code/presets/server-webpack/src/lib/compiler/json-to-csf-compiler.test.ts b/code/presets/server-webpack/src/lib/compiler/json-to-csf-compiler.test.ts index f0d8237215cb..49f925c7798b 100644 --- a/code/presets/server-webpack/src/lib/compiler/json-to-csf-compiler.test.ts +++ b/code/presets/server-webpack/src/lib/compiler/json-to-csf-compiler.test.ts @@ -25,7 +25,7 @@ async function generate(filePath: string) { it(`${fixtureFile}`, async () => { const inputPath = join(transformFixturesDir, fixtureFile); const code = await generate(inputPath); - expect(code).toMatchFileSnapshot(inputPath.replace(inputRegExp, '.snapshot')); + await expect(code).toMatchFileSnapshot(inputPath.replace(inputRegExp, '.snapshot')); }); }); }); diff --git a/code/renderers/react/src/__test__/portable-stories.test.tsx b/code/renderers/react/src/__test__/portable-stories.test.tsx index 85f33c9a714a..e6156727c4d9 100644 --- a/code/renderers/react/src/__test__/portable-stories.test.tsx +++ b/code/renderers/react/src/__test__/portable-stories.test.tsx @@ -77,8 +77,8 @@ describe('renders', () => { expect(screen.getByTestId('loaded-data').textContent).toEqual('loaded data'); }); - it('should throw an error in play function', () => { - expect(() => MountInPlayFunctionThrow.run()).rejects.toThrowError('Error thrown in play'); + it('should throw an error in play function', async () => { + await expect(() => MountInPlayFunctionThrow.run()).rejects.toThrowError('Error thrown in play'); }); it('should call and compose loaders data', async () => { diff --git a/code/renderers/react/src/docs/extractArgTypes.test.ts b/code/renderers/react/src/docs/extractArgTypes.test.ts index d6f612cbc285..d9a097d15767 100644 --- a/code/renderers/react/src/docs/extractArgTypes.test.ts +++ b/code/renderers/react/src/docs/extractArgTypes.test.ts @@ -71,12 +71,12 @@ describe('react component properties', () => { if (skippedTests.includes(testEntry.name)) { it.skip(`${testEntry.name}`, () => {}); } else { - it(`${testEntry.name}`, () => { + it(`${testEntry.name}`, async () => { const inputPath = join(testDir, testFile); // snapshot the output of babel-plugin-react-docgen const docgenPretty = annotateWithDocgen(inputPath); - expect(docgenPretty).toMatchFileSnapshot(join(testDir, 'docgen.snapshot')); + await expect(docgenPretty).toMatchFileSnapshot(join(testDir, 'docgen.snapshot')); // transform into an uglier format that's works with require-from-string const docgenModule = transformToModule(docgenPretty); @@ -84,7 +84,7 @@ describe('react component properties', () => { // snapshot the output of component-properties/react const { component } = requireFromString(docgenModule, inputPath); const properties = extractProps(component); - expect(properties).toMatchFileSnapshot(join(testDir, 'properties.snapshot')); + await expect(properties).toMatchFileSnapshot(join(testDir, 'properties.snapshot')); // snapshot the output of `extractArgTypes` const argTypes = extractArgTypes(component); @@ -93,7 +93,7 @@ describe('react component properties', () => { argTypes, parameters, } as unknown as StoryContext); - expect(rows).toMatchFileSnapshot(join(testDir, 'argTypes.snapshot')); + await expect(rows).toMatchFileSnapshot(join(testDir, 'argTypes.snapshot')); }); } } diff --git a/code/renderers/web-components/src/docs/web-components-properties.test.ts b/code/renderers/web-components/src/docs/web-components-properties.test.ts index 2ba3618f5bda..8a99fdeb0351 100644 --- a/code/renderers/web-components/src/docs/web-components-properties.test.ts +++ b/code/renderers/web-components/src/docs/web-components-properties.test.ts @@ -46,7 +46,7 @@ describe('web-components component properties', () => { const testDir = join(fixturesDir, testEntry.name); const testFile = readdirSync(testDir).find((fileName) => inputRegExp.test(fileName)); if (testFile) { - it(`${testEntry.name}`, () => { + it(`${testEntry.name}`, async () => { const inputPath = join(testDir, testFile); // snapshot the output of wca @@ -55,11 +55,13 @@ describe('web-components component properties', () => { customElements.tags.forEach((tag: any) => { tag.path = 'dummy-path-to-component'; }); - expect(customElements).toMatchFileSnapshot(join(testDir, 'custom-elements.snapshot')); + await expect(customElements).toMatchFileSnapshot( + join(testDir, 'custom-elements.snapshot') + ); // snapshot the properties const properties = extractArgTypesFromElements('input', customElements); - expect(properties).toMatchFileSnapshot(join(testDir, 'properties.snapshot')); + await expect(properties).toMatchFileSnapshot(join(testDir, 'properties.snapshot')); }); } } diff --git a/docs/_snippets/individual-snapshot-tests-portable-stories.md b/docs/_snippets/individual-snapshot-tests-portable-stories.md index 8b2d518fc907..451fcf475918 100644 --- a/docs/_snippets/individual-snapshot-tests-portable-stories.md +++ b/docs/_snippets/individual-snapshot-tests-portable-stories.md @@ -15,7 +15,7 @@ const compose = (entry) => { return composeStories(entry); } catch (e) { throw new Error( - `There was an issue composing stories for the module: ${JSON.stringify(entry)}, ${e}`, + `There was an issue composing stories for the module: ${JSON.stringify(entry)}, ${e}` ); } }; @@ -23,7 +23,7 @@ const compose = (entry) => { function getAllStoryFiles() { // Place the glob you want to match your stories files const storyFiles = glob.sync( - path.join(__dirname, 'stories/**/*.{stories,story}.{js,jsx,mjs,ts,tsx}'), + path.join(__dirname, 'stories/**/*.{stories,story}.{js,jsx,mjs,ts,tsx}') ); return storyFiles.map((filePath) => { @@ -45,7 +45,7 @@ describe('Stories Snapshots', () => { if (stories.length <= 0) { throw new Error( - `No stories found for this module: ${title}. Make sure there is at least one valid story for this module.`, + `No stories found for this module: ${title}. Make sure there is at least one valid story for this module.` ); } @@ -157,7 +157,7 @@ const compose = (entry) => { return composeStories(entry); } catch (error) { throw new Error( - `There was an issue composing stories for the module: ${JSON.stringify(entry)}, ${error}`, + `There was an issue composing stories for the module: ${JSON.stringify(entry)}, ${error}` ); } }; @@ -166,7 +166,7 @@ function getAllStoryFiles() { const storyFiles = Object.entries( import.meta.glob('./stories/**/*.(stories|story).@(js|jsx|mjs|ts|tsx)', { eager: true, - }), + }) ); return storyFiles.map(([filePath, storyFile]) => { @@ -185,7 +185,7 @@ describe('Stories Snapshots', () => { if (stories.length <= 0) { throw new Error( - `No stories found for this module: ${title}. Make sure there is at least one valid story for this module.`, + `No stories found for this module: ${title}. Make sure there is at least one valid story for this module.` ); } @@ -196,7 +196,7 @@ describe('Stories Snapshots', () => { await new Promise((resolve) => setTimeout(resolve, 1)); // Defines the custom snapshot path location and file name const customSnapshotPath = `./__snapshots__/${componentName}.spec.js.snap`; - expect(document.body.firstChild).toMatchFileSnapshot(customSnapshotPath); + await expect(document.body.firstChild).toMatchFileSnapshot(customSnapshotPath); }); }); }); @@ -226,7 +226,7 @@ const compose = (entry: StoryFile): ReturnType> return composeStories(entry); } catch (e) { throw new Error( - `There was an issue composing stories for the module: ${JSON.stringify(entry)}, ${e}`, + `There was an issue composing stories for the module: ${JSON.stringify(entry)}, ${e}` ); } }; @@ -236,7 +236,7 @@ function getAllStoryFiles() { const storyFiles = Object.entries( import.meta.glob('./stories/**/*.(stories|story).@(js|jsx|mjs|ts|tsx)', { eager: true, - }), + }) ); return storyFiles.map(([filePath, storyFile]) => { @@ -256,7 +256,7 @@ describe('Stories Snapshots', () => { if (stories.length <= 0) { throw new Error( - `No stories found for this module: ${title}. Make sure there is at least one valid story for this module.`, + `No stories found for this module: ${title}. Make sure there is at least one valid story for this module.` ); } @@ -267,7 +267,7 @@ describe('Stories Snapshots', () => { await new Promise((resolve) => setTimeout(resolve, 1)); // Defines the custom snapshot path location and file name const customSnapshotPath = `./__snapshots__/${componentName}.spec.ts.snap`; - expect(document.body.firstChild).toMatchFileSnapshot(customSnapshotPath); + await expect(document.body.firstChild).toMatchFileSnapshot(customSnapshotPath); }); }); }); diff --git a/docs/_snippets/portable-stories-vitest-multi-snapshot-test.md b/docs/_snippets/portable-stories-vitest-multi-snapshot-test.md index 2dd1bd2b18f3..3c29f702bfcc 100644 --- a/docs/_snippets/portable-stories-vitest-multi-snapshot-test.md +++ b/docs/_snippets/portable-stories-vitest-multi-snapshot-test.md @@ -18,9 +18,9 @@ describe(options.suite, () => { const snapshotPath = path.join( storyDir, options.snapshotsDirName, - `${componentName}${options.snapshotExtension}`, + `${componentName}${options.snapshotExtension}` ); - expect(document.body.firstChild).toMatchFileSnapshot(snapshotPath); + await expect(document.body.firstChild).toMatchFileSnapshot(snapshotPath); }); }); }); From cbc730557b4c601345b0bf6c61f26cc601fac1a5 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 3 Jan 2025 11:59:31 +0100 Subject: [PATCH 03/20] Remove unnecessary spread of browser config in vitest-plugin --- code/addons/test/src/vitest-plugin/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/code/addons/test/src/vitest-plugin/index.ts b/code/addons/test/src/vitest-plugin/index.ts index 0f8756899ca0..b2a2818de8fd 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -194,7 +194,6 @@ export const storybookTest = async (options?: UserOptions): Promise => { : {}), browser: { - ...inputConfig_ONLY_MUTATE_WHEN_STRICTLY_NEEDED_OR_YOU_WILL_BE_FIRED.test?.browser, commands: { getInitialGlobals: () => { const envConfig = JSON.parse(process.env.VITEST_STORYBOOK_CONFIG ?? '{}'); From dc6db060f9b31933d33d6af8c1a8bf3fdaf50420 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 3 Jan 2025 12:22:23 +0100 Subject: [PATCH 04/20] Update yarn.lock --- code/yarn.lock | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index 78603b1b677e..e264cfa371e9 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -777,18 +777,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.11.5, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.5, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.3, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": - version: 7.26.3 - resolution: "@babel/parser@npm:7.26.3" - dependencies: - "@babel/types": "npm:^7.26.3" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/48f736374e61cfd10ddbf7b80678514ae1f16d0e88bc793d2b505d73d9b987ea786fc8c2f7ee8f8b8c467df062030eb07fd0eb2168f0f541ca1f542775852cad - languageName: node - linkType: hard - -"@babel/parser@npm:^7.25.4": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.11.5, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.5, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.5, @babel/parser@npm:^7.23.6, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.3, @babel/parser@npm:^7.25.4, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": version: 7.26.3 resolution: "@babel/parser@npm:7.26.3" dependencies: @@ -2301,17 +2290,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.17.0, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.2, @babel/types@npm:^7.9.6": - version: 7.26.3 - resolution: "@babel/types@npm:7.26.3" - dependencies: - "@babel/helper-string-parser": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - checksum: 10c0/966c5242c5e55c8704bf7a7418e7be2703a0afa4d19a8480999d5a4ef13d095dd60686615fe5983cb7593b4b06ba3a7de8d6ca501c1d78bdd233a10d90be787b - languageName: node - linkType: hard - -"@babel/types@npm:^7.25.4, @babel/types@npm:^7.26.3": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.17.0, @babel/types@npm:^7.18.9, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.4, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.2, @babel/types@npm:^7.9.6": version: 7.26.3 resolution: "@babel/types@npm:7.26.3" dependencies: @@ -23129,7 +23108,7 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1, picocolors@npm:^1.1.0": +"picocolors@npm:^1.0.0, picocolors@npm:^1.1.0": version: 1.1.0 resolution: "picocolors@npm:1.1.0" checksum: 10c0/86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023 From dba7ad37306c8f02a214c978bde59a51e126fd11 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 3 Jan 2025 12:52:42 +0100 Subject: [PATCH 05/20] Downgrade Vite and fix type issues --- code/addons/test/src/node/reporter.ts | 10 +++++++++- code/addons/test/src/node/vitest-manager.ts | 6 ++++++ code/package.json | 4 ++-- code/yarn.lock | 22 ++++++++++----------- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/code/addons/test/src/node/reporter.ts b/code/addons/test/src/node/reporter.ts index 1f71e1bf9670..d5d199b32d6e 100644 --- a/code/addons/test/src/node/reporter.ts +++ b/code/addons/test/src/node/reporter.ts @@ -1,5 +1,6 @@ import type { TaskState } from 'vitest'; import type { Vitest } from 'vitest/node'; +import { version as vitestVersion } from 'vitest/node'; import { type Reporter } from 'vitest/reporters'; import type { @@ -12,6 +13,7 @@ import type { API_StatusUpdate } from '@storybook/types'; import type { Suite } from '@vitest/runner'; import { throttle } from 'es-toolkit'; +import { satisfies } from 'semver'; import { TEST_PROVIDER_ID } from '../constants'; import type { TestManager } from './test-manager'; @@ -50,8 +52,11 @@ const statusMap: Record = { run: 'pending', skip: 'skipped', todo: 'skipped', + queued: 'pending', }; +const isVitest3OrLater = satisfies(vitestVersion, '>=3.0.0-beta.3', { includePrerelease: true }); + export class StorybookReporter implements Reporter { testStatusData: API_StatusUpdate = {}; @@ -213,7 +218,10 @@ export class StorybookReporter implements Reporter { async onFinished() { const unhandledErrors = this.ctx.state.getUnhandledErrors(); - const isCancelled = this.ctx.isCancelling; + const isCancelled = isVitest3OrLater + ? this.testManager.vitestManager.isCancelling + : // @ts-expect-error isCancelling is private in Vitest 3. + this.ctx.isCancelling; const report = await this.getProgressReport(Date.now()); const testSuiteFailures = report.details.testResults.filter( diff --git a/code/addons/test/src/node/vitest-manager.ts b/code/addons/test/src/node/vitest-manager.ts index 0a4b1f815039..1e2af4db371f 100644 --- a/code/addons/test/src/node/vitest-manager.ts +++ b/code/addons/test/src/node/vitest-manager.ts @@ -51,6 +51,8 @@ export class VitestManager { runningPromise: Promise | null = null; + isCancelling = false; + constructor(private testManager: TestManager) {} async startVitest({ coverage = false } = {}) { @@ -136,6 +138,7 @@ export class VitestManager { private getModulesByFilepath(file: string): Set { const set = this.vite.moduleGraph.getModulesByFile(file); + // @ts-expect-error ModuleNode from vite 4 is incompatible with ModuleNode from vite 3. return set || new Set(); } @@ -213,6 +216,7 @@ export class VitestManager { } async runFiles(specifications: TestSpecification[], allTestsRun?: boolean) { + this.isCancelling = false; const runTest: ( specifications: TestSpecification[], allTestsRun?: boolean | undefined @@ -278,8 +282,10 @@ export class VitestManager { } async cancelCurrentRun() { + this.isCancelling = true; await this.vitest?.cancelCurrentRun('keyboard-input'); await this.runningPromise; + this.isCancelling = false; } async closeVitest() { diff --git a/code/package.json b/code/package.json index b90e7562fbb8..56c396a10768 100644 --- a/code/package.json +++ b/code/package.json @@ -220,8 +220,8 @@ "ts-dedent": "^2.0.0", "typescript": "5.4.3", "util": "^0.12.4", - "vite": "^6.0.7", - "vite-plugin-inspect": "^0.10.6", + "vite": "^4.0.0", + "vite-plugin-inspect": "^0.8.5", "vitest": "^3.0.0-beta.3", "wait-on": "^7.0.1" }, diff --git a/code/yarn.lock b/code/yarn.lock index e264cfa371e9..6bc43dc1194d 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5109,7 +5109,7 @@ __metadata: languageName: node linkType: hard -"@rollup/pluginutils@npm:^5.1.4": +"@rollup/pluginutils@npm:^5.1.3": version: 5.1.4 resolution: "@rollup/pluginutils@npm:5.1.4" dependencies: @@ -7103,8 +7103,8 @@ __metadata: ts-dedent: "npm:^2.0.0" typescript: "npm:5.4.3" util: "npm:^0.12.4" - vite: "npm:^6.0.7" - vite-plugin-inspect: "npm:^0.10.6" + vite: "npm:^4.0.0" + vite-plugin-inspect: "npm:^0.8.5" vitest: "npm:^3.0.0-beta.3" wait-on: "npm:^7.0.1" dependenciesMeta: @@ -29098,13 +29098,13 @@ __metadata: languageName: node linkType: hard -"vite-plugin-inspect@npm:^0.10.6": - version: 0.10.6 - resolution: "vite-plugin-inspect@npm:0.10.6" +"vite-plugin-inspect@npm:^0.8.5": + version: 0.8.9 + resolution: "vite-plugin-inspect@npm:0.8.9" dependencies: "@antfu/utils": "npm:^0.7.10" - "@rollup/pluginutils": "npm:^5.1.4" - debug: "npm:^4.4.0" + "@rollup/pluginutils": "npm:^5.1.3" + debug: "npm:^4.3.7" error-stack-parser-es: "npm:^0.1.5" fs-extra: "npm:^11.2.0" open: "npm:^10.1.0" @@ -29112,11 +29112,11 @@ __metadata: picocolors: "npm:^1.1.1" sirv: "npm:^3.0.0" peerDependencies: - vite: ^6.0.0 + vite: ^3.1.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.1 peerDependenciesMeta: "@nuxt/kit": optional: true - checksum: 10c0/40a62d7b3b7ef1d50aa7b36b5e426b8b066f9c418770534b778d6b2792cebbc2d335192754cc844dcd10d19f3cddee7ae64fc4d5360b1a53ff79d738a11a4a8e + checksum: 10c0/6ad775254b9ceaa63d17e6ef19fdf73c8d0c92cb51c379e8487c2d4e858b338f6a6199edf22d805179ef7b9511708f39e4f3fdff6fe2f4c6e3eac7f1ad010f91 languageName: node linkType: hard @@ -29238,7 +29238,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.0.7": +"vite@npm:^5.0.0 || ^6.0.0": version: 6.0.7 resolution: "vite@npm:6.0.7" dependencies: From c2245b0b4e2ae60f0100af4904a8e2ff5dea976d Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 3 Jan 2025 15:56:15 +0100 Subject: [PATCH 06/20] Further Vitest 3 compat adjustments --- .../addons/test/src/node/test-manager.test.ts | 10 ++++++- code/addons/test/src/node/vitest-manager.ts | 27 +++++++++++-------- code/addons/test/src/vitest-plugin/index.ts | 15 ++++++++++- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/code/addons/test/src/node/test-manager.test.ts b/code/addons/test/src/node/test-manager.test.ts index 985f74c97595..60be1e778d6e 100644 --- a/code/addons/test/src/node/test-manager.test.ts +++ b/code/addons/test/src/node/test-manager.test.ts @@ -19,6 +19,13 @@ const vitest = vi.hoisted(() => ({ cancelCurrentRun: vi.fn(), globTestSpecs: vi.fn(), getModuleProjects: vi.fn(() => []), + setGlobalTestNamePattern: vi.fn(), + vite: { + moduleGraph: { + getModulesByFile: () => [], + invalidateModule: vi.fn(), + }, + }, configOverride: { actualTestNamePattern: undefined, get testNamePattern() { @@ -32,7 +39,8 @@ const vitest = vi.hoisted(() => ({ }, })); -vi.mock('vitest/node', () => ({ +vi.mock('vitest/node', async (importOriginal) => ({ + ...(await importOriginal()), createVitest: vi.fn(() => Promise.resolve(vitest)), })); const createVitest = vi.mocked(actualCreateVitest); diff --git a/code/addons/test/src/node/vitest-manager.ts b/code/addons/test/src/node/vitest-manager.ts index 1e2af4db371f..abddad6cebd2 100644 --- a/code/addons/test/src/node/vitest-manager.ts +++ b/code/addons/test/src/node/vitest-manager.ts @@ -164,17 +164,22 @@ export class VitestManager { } private updateLastChanged(filepath: string) { - const projects = this.getModuleProjects(filepath); - projects.forEach(({ server, browser }) => { - if (server) { - const serverMods = server.moduleGraph.getModulesByFile(filepath); - serverMods?.forEach((mod) => server.moduleGraph.invalidateModule(mod)); - } - if (browser) { - const browserMods = browser.vite.moduleGraph.getModulesByFile(filepath); - browserMods?.forEach((mod) => browser.vite.moduleGraph.invalidateModule(mod)); - } - }); + if (isVitest3OrLater) { + const serverMods = this.vite.moduleGraph.getModulesByFile(filepath); + serverMods?.forEach((mod) => this.vite.moduleGraph.invalidateModule(mod)); + } else { + const projects = this.vitest!.getModuleProjects(filepath); + projects.forEach(({ server, browser }) => { + if (server) { + const serverMods = server.moduleGraph.getModulesByFile(filepath); + serverMods?.forEach((mod) => server.moduleGraph.invalidateModule(mod)); + } + if (browser) { + const browserMods = browser.vite.moduleGraph.getModulesByFile(filepath); + browserMods?.forEach((mod) => browser.vite.moduleGraph.invalidateModule(mod)); + } + }); + } } private async fetchStories(indexUrl: string, requestStoryIds?: string[]) { diff --git a/code/addons/test/src/vitest-plugin/index.ts b/code/addons/test/src/vitest-plugin/index.ts index b2a2818de8fd..a72326390abb 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -66,6 +66,15 @@ const getStoryGlobsAndFiles = async ( const packageDir = dirname(require.resolve('@storybook/experimental-addon-test/package.json')); +const isAddonA11yAvailable = () => { + try { + require.resolve('@storybook/addon-a11y'); + return true; + } catch (e) { + return false; + } +}; + export const storybookTest = async (options?: UserOptions): Promise => { const finalOptions = { ...defaultOptions, @@ -253,10 +262,14 @@ export const storybookTest = async (options?: UserOptions): Promise => { optimizeDeps: { include: [ '@storybook/experimental-addon-test/**', + '@storybook/addon-a11y/**', + '@testing-library/jest-dom/vitest', + ...(isAddonA11yAvailable() ? ['@storybook/addon-a11y'] : []), ...(frameworkName?.includes('react') || frameworkName?.includes('nextjs') - ? ['react-dom/test-utils'] + ? ['react-dom/test-utils', 'prop-types', 'react-dom/client'] : []), ], + entries: storiesFiles.filter((path) => !path.endsWith('.mdx')), }, define: { From aded285159e465356ef7d008fb01faf0f5d65100 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 3 Jan 2025 15:56:24 +0100 Subject: [PATCH 07/20] Fix tests --- .../syntaxhighlighter/formatter.test.ts | 34 +++++++++---------- .../duplicate-story-with-new-name.test.ts | 6 ++-- .../update-args-in-csf-file.test.ts | 6 ++-- .../fixes/webpack5-compiler-setup.test.ts | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/code/core/src/components/components/syntaxhighlighter/formatter.test.ts b/code/core/src/components/components/syntaxhighlighter/formatter.test.ts index 4c215c977154..7e9cda1ef84a 100644 --- a/code/core/src/components/components/syntaxhighlighter/formatter.test.ts +++ b/code/core/src/components/components/syntaxhighlighter/formatter.test.ts @@ -5,42 +5,42 @@ import { dedent } from 'ts-dedent'; import { formatter } from './formatter'; describe('dedent', () => { - it('handles empty string', () => { + it('handles empty string', async () => { const input = ''; const result = formatter(true, input); - expect(result).resolves.toBe(input); + await expect(result).resolves.toBe(input); }); - it('handles single line', () => { + it('handles single line', async () => { const input = 'console.log("hello world")'; const result = formatter(true, input); - expect(result).resolves.toBe(input); + await expect(result).resolves.toBe(input); }); - it('does not transform correct code', () => { + it('does not transform correct code', async () => { const input = dedent` console.log("hello"); console.log("world"); `; const result = formatter(true, input); - expect(result).resolves.toBe(input); + await expect(result).resolves.toBe(input); }); - it('does transform incorrect code', () => { + it('does transform incorrect code', async () => { const input = ` console.log("hello"); console.log("world"); `; const result = formatter(true, input); - expect(result).resolves.toBe(`console.log("hello"); + await expect(result).resolves.toBe(`console.log("hello"); console.log("world");`); }); - it('more indentations - skip first line', () => { + it('more indentations - skip first line', async () => { const input = ` it('handles empty string', () => { const input = ''; @@ -51,7 +51,7 @@ console.log("world");`); `; const result = formatter(true, input); - expect(result).resolves.toBe(`it('handles empty string', () => { + await expect(result).resolves.toBe(`it('handles empty string', () => { const input = ''; const result = formatter(input); @@ -59,7 +59,7 @@ console.log("world");`); });`); }); - it('more indentations - code on first line', () => { + it('more indentations - code on first line', async () => { const input = `// some comment it('handles empty string', () => { const input = ''; @@ -70,7 +70,7 @@ console.log("world");`); `; const result = formatter(true, input); - expect(result).resolves.toBe(`// some comment + await expect(result).resolves.toBe(`// some comment it('handles empty string', () => { const input = ''; const result = formatter(input); @@ -79,7 +79,7 @@ it('handles empty string', () => { });`); }); - it('removes whitespace in empty line completely', () => { + it('removes whitespace in empty line completely', async () => { const input = ` console.log("hello"); @@ -87,24 +87,24 @@ it('handles empty string', () => { `; const result = formatter(true, input); - expect(result).resolves.toBe(`console.log("hello"); + await expect(result).resolves.toBe(`console.log("hello"); console.log("world");`); }); }); describe('prettier (babel)', () => { - it('handles empty string', () => { + it('handles empty string', async () => { const input = ''; const result = formatter('angular', input); - expect(result).resolves.toBe(input); + await expect(result).resolves.toBe(input); }); it('handles single line', () => { const input = 'console.log("hello world")'; const result = formatter('angular', input); - expect(result).resolves.toBe(input); + await expect(result).resolves.toBe(input); }); }); diff --git a/code/core/src/core-server/utils/save-story/duplicate-story-with-new-name.test.ts b/code/core/src/core-server/utils/save-story/duplicate-story-with-new-name.test.ts index 549c74337ca9..5cd500c88dc3 100644 --- a/code/core/src/core-server/utils/save-story/duplicate-story-with-new-name.test.ts +++ b/code/core/src/core-server/utils/save-story/duplicate-story-with-new-name.test.ts @@ -83,9 +83,9 @@ describe('success', () => { const parsed = CSF.parse(); const names = Object.keys(parsed._stories); - names.forEach((name) => { - expect(() => duplicateStoryWithNewName(parsed, name, name + 'Duplicated')).toThrow(); - }); + for (const name of names) { + await expect(() => duplicateStoryWithNewName(parsed, name, name + 'Duplicated')).toThrow(); + } }); test('Typescript Constructs', async () => { const before = await format(await readFile(FILES.typescriptConstructs, 'utf-8'), { diff --git a/code/core/src/core-server/utils/save-story/update-args-in-csf-file.test.ts b/code/core/src/core-server/utils/save-story/update-args-in-csf-file.test.ts index 43bc049fc58b..d094a82aff13 100644 --- a/code/core/src/core-server/utils/save-story/update-args-in-csf-file.test.ts +++ b/code/core/src/core-server/utils/save-story/update-args-in-csf-file.test.ts @@ -103,9 +103,9 @@ describe('success', () => { const names = Object.keys(parsed._stories); const nodes = names.map((name) => CSF.getStoryExport(name)); - nodes.forEach((node) => { - expect(() => updateArgsInCsfFile(node, newArgs)).rejects.toThrowError(); - }); + for (const node of nodes) { + await expect(() => updateArgsInCsfFile(node, newArgs)).rejects.toThrowError(); + } }); test('CSF Variances', async () => { const newArgs = { bordered: true, initial: 'test1' }; diff --git a/code/lib/cli-storybook/src/automigrate/fixes/webpack5-compiler-setup.test.ts b/code/lib/cli-storybook/src/automigrate/fixes/webpack5-compiler-setup.test.ts index d4eb41b693dd..0716150da521 100644 --- a/code/lib/cli-storybook/src/automigrate/fixes/webpack5-compiler-setup.test.ts +++ b/code/lib/cli-storybook/src/automigrate/fixes/webpack5-compiler-setup.test.ts @@ -68,7 +68,7 @@ describe('webpack5Migration check function', () => { }, }); - expect(result).resolves.toBeNull(); + await expect(result).resolves.toBeNull(); }); it('should return null if the builder is not webpack5', async () => { From 61996e17688036c78e47f9487ededd674b682bfa Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 10 Jan 2025 10:41:29 +0100 Subject: [PATCH 08/20] Upgrade to Vitest 3.0.0-beta.4 --- code/addons/test/package.json | 6 +- code/addons/test/src/vitest-plugin/index.ts | 6 +- code/package.json | 8 +- code/yarn.lock | 182 +++++++++++--------- 4 files changed, 107 insertions(+), 95 deletions(-) diff --git a/code/addons/test/package.json b/code/addons/test/package.json index 415bf9bb37c9..ac720824def2 100644 --- a/code/addons/test/package.json +++ b/code/addons/test/package.json @@ -94,8 +94,8 @@ "@types/istanbul-lib-report": "^3.0.3", "@types/node": "^22.0.0", "@types/semver": "^7", - "@vitest/browser": "^3.0.0-beta.3", - "@vitest/runner": "^3.0.0-beta.3", + "@vitest/browser": "3.0.0-beta.4", + "@vitest/runner": "3.0.0-beta.4", "ansi-to-html": "^0.7.2", "boxen": "^8.0.1", "es-toolkit": "^1.22.0", @@ -115,7 +115,7 @@ "tree-kill": "^1.2.2", "ts-dedent": "^2.2.0", "typescript": "^5.3.2", - "vitest": "^3.0.0-beta.3" + "vitest": "3.0.0-beta.4" }, "peerDependencies": { "@vitest/browser": "^2.1.1 || ^3.0.0", diff --git a/code/addons/test/src/vitest-plugin/index.ts b/code/addons/test/src/vitest-plugin/index.ts index ed45052f6fcd..9434102896fd 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -262,14 +262,12 @@ export const storybookTest = async (options?: UserOptions): Promise => { optimizeDeps: { include: [ '@storybook/experimental-addon-test/**', - '@storybook/addon-a11y/**', - '@testing-library/jest-dom/vitest', ...(isAddonA11yAvailable() ? ['@storybook/addon-a11y'] : []), + ...(frameworkName?.includes('react') || frameworkName?.includes('nextjs') - ? ['react-dom/test-utils', 'prop-types', 'react-dom/client'] + ? ['react-dom/test-utils'] : []), ], - entries: storiesFiles.filter((path) => !path.endsWith('.mdx')), }, define: { diff --git a/code/package.json b/code/package.json index 88658890e5ee..aa9914d622ba 100644 --- a/code/package.json +++ b/code/package.json @@ -178,9 +178,9 @@ "@typescript-eslint/parser": "7.18.0", "@vitejs/plugin-react": "^4.3.2", "@vitejs/plugin-vue": "^4.4.0", - "@vitest/browser": "^3.0.0-beta.3", - "@vitest/coverage-istanbul": "^3.0.0-beta.3", - "@vitest/coverage-v8": "^3.0.0-beta.3", + "@vitest/browser": "3.0.0-beta.4", + "@vitest/coverage-istanbul": "3.0.0-beta.4", + "@vitest/coverage-v8": "3.0.0-beta.4", "create-storybook": "workspace:*", "cross-env": "^7.0.3", "danger": "^12.3.3", @@ -222,7 +222,7 @@ "util": "^0.12.4", "vite": "^4.0.0", "vite-plugin-inspect": "^0.8.5", - "vitest": "^3.0.0-beta.3", + "vitest": "3.0.0-beta.4", "wait-on": "^7.0.1" }, "dependenciesMeta": { diff --git a/code/yarn.lock b/code/yarn.lock index d4fb161df454..ec0b30164019 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -2411,6 +2411,13 @@ __metadata: languageName: node linkType: hard +"@bcoe/v8-coverage@npm:^1.0.1": + version: 1.0.1 + resolution: "@bcoe/v8-coverage@npm:1.0.1" + checksum: 10c0/8a5df36b79715f54f419052966dfd7900eef13dadc31cc9214bd69b8b3eabdc5a3013612453edf547fa35cbeb5fd57a12e7910a75a845aac410d81d08511944a + languageName: node + linkType: hard + "@bunchtogether/vite-plugin-flow@npm:^1.0.2": version: 1.0.2 resolution: "@bunchtogether/vite-plugin-flow@npm:1.0.2" @@ -6466,8 +6473,8 @@ __metadata: "@types/istanbul-lib-report": "npm:^3.0.3" "@types/node": "npm:^22.0.0" "@types/semver": "npm:^7" - "@vitest/browser": "npm:^3.0.0-beta.3" - "@vitest/runner": "npm:^3.0.0-beta.3" + "@vitest/browser": "npm:3.0.0-beta.4" + "@vitest/runner": "npm:3.0.0-beta.4" ansi-to-html: "npm:^0.7.2" boxen: "npm:^8.0.1" es-toolkit: "npm:^1.22.0" @@ -6489,7 +6496,7 @@ __metadata: tree-kill: "npm:^1.2.2" ts-dedent: "npm:^2.2.0" typescript: "npm:^5.3.2" - vitest: "npm:^3.0.0-beta.3" + vitest: "npm:3.0.0-beta.4" peerDependencies: "@vitest/browser": ^2.1.1 || ^3.0.0 "@vitest/runner": ^2.1.1 || ^3.0.0 @@ -7161,9 +7168,9 @@ __metadata: "@typescript-eslint/parser": "npm:7.18.0" "@vitejs/plugin-react": "npm:^4.3.2" "@vitejs/plugin-vue": "npm:^4.4.0" - "@vitest/browser": "npm:^3.0.0-beta.3" - "@vitest/coverage-istanbul": "npm:^3.0.0-beta.3" - "@vitest/coverage-v8": "npm:^3.0.0-beta.3" + "@vitest/browser": "npm:3.0.0-beta.4" + "@vitest/coverage-istanbul": "npm:3.0.0-beta.4" + "@vitest/coverage-v8": "npm:3.0.0-beta.4" create-storybook: "workspace:*" cross-env: "npm:^7.0.3" danger: "npm:^12.3.3" @@ -7205,7 +7212,7 @@ __metadata: util: "npm:^0.12.4" vite: "npm:^4.0.0" vite-plugin-inspect: "npm:^0.8.5" - vitest: "npm:^3.0.0-beta.3" + vitest: "npm:3.0.0-beta.4" wait-on: "npm:^7.0.1" dependenciesMeta: ejs: @@ -9105,14 +9112,14 @@ __metadata: languageName: node linkType: hard -"@vitest/browser@npm:^3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/browser@npm:3.0.0-beta.3" +"@vitest/browser@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/browser@npm:3.0.0-beta.4" dependencies: "@testing-library/dom": "npm:^10.4.0" "@testing-library/user-event": "npm:^14.5.2" - "@vitest/mocker": "npm:3.0.0-beta.3" - "@vitest/utils": "npm:3.0.0-beta.3" + "@vitest/mocker": "npm:3.0.0-beta.4" + "@vitest/utils": "npm:3.0.0-beta.4" magic-string: "npm:^0.30.17" msw: "npm:^2.7.0" sirv: "npm:^3.0.0" @@ -9120,7 +9127,7 @@ __metadata: ws: "npm:^8.18.0" peerDependencies: playwright: "*" - vitest: 3.0.0-beta.3 + vitest: 3.0.0-beta.4 webdriverio: "*" peerDependenciesMeta: playwright: @@ -9129,13 +9136,13 @@ __metadata: optional: true webdriverio: optional: true - checksum: 10c0/c475c8457218fa4422029b0b36d2a6d3ac93bfa000e77ac836bcafc3ab4477177ed4f9e35c295209ab1a9382a0d49b7e7cff6a0445eef6ac8b7852beb798b6b2 + checksum: 10c0/e7fb9127effaf51ec4497ecbdf19ca2019dbffc72ff38684ac1fd34e316c587da460a3c17adfb6f725706fbfd41c65bf55ffd26acdd52d4ad0667acfadf56e04 languageName: node linkType: hard -"@vitest/coverage-istanbul@npm:^3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/coverage-istanbul@npm:3.0.0-beta.3" +"@vitest/coverage-istanbul@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/coverage-istanbul@npm:3.0.0-beta.4" dependencies: "@istanbuljs/schema": "npm:^0.1.3" debug: "npm:^4.4.0" @@ -9148,17 +9155,17 @@ __metadata: test-exclude: "npm:^7.0.1" tinyrainbow: "npm:^1.2.0" peerDependencies: - vitest: 3.0.0-beta.3 - checksum: 10c0/dc62761f7653592d1270652c46f5f98246406b42bf1b5a540fe83e32f6818ca1d14a7f963d7da78e6c8e9a637e6d8755424c45aeb35252a58c2ff80b195661da + vitest: 3.0.0-beta.4 + checksum: 10c0/6cefd65d6e9c42c5ce3bbbcdcc011ad2d3e23f486233da5a6de8d9e4e36f9cc924e5f234468e1da9b9c20ebf6b9797f5bc1d5a007f29de5b3b64e89cbd50305b languageName: node linkType: hard -"@vitest/coverage-v8@npm:^3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/coverage-v8@npm:3.0.0-beta.3" +"@vitest/coverage-v8@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/coverage-v8@npm:3.0.0-beta.4" dependencies: "@ampproject/remapping": "npm:^2.3.0" - "@bcoe/v8-coverage": "npm:^0.2.3" + "@bcoe/v8-coverage": "npm:^1.0.1" debug: "npm:^4.4.0" istanbul-lib-coverage: "npm:^3.2.2" istanbul-lib-report: "npm:^3.0.1" @@ -9170,12 +9177,12 @@ __metadata: test-exclude: "npm:^7.0.1" tinyrainbow: "npm:^1.2.0" peerDependencies: - "@vitest/browser": 3.0.0-beta.3 - vitest: 3.0.0-beta.3 + "@vitest/browser": 3.0.0-beta.4 + vitest: 3.0.0-beta.4 peerDependenciesMeta: "@vitest/browser": optional: true - checksum: 10c0/b8ef161a557d0d6490dd3d7836fbb29ab01a090be6856cb45e05c7777e8d5841d3aa31e371b6d795820ff06311d303f7dabbb6773ed19e00ef88f9947680f3b7 + checksum: 10c0/19d414b9359475f7d2e68c02434dbabe474e6f3b8caa079f3d0f46a0cd3c9a7c7877531dd7fb29ed1be244626103f9c7b90f14b4bdb0114a69e838a26828a29c languageName: node linkType: hard @@ -9191,15 +9198,15 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/expect@npm:3.0.0-beta.3" +"@vitest/expect@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/expect@npm:3.0.0-beta.4" dependencies: - "@vitest/spy": "npm:3.0.0-beta.3" - "@vitest/utils": "npm:3.0.0-beta.3" + "@vitest/spy": "npm:3.0.0-beta.4" + "@vitest/utils": "npm:3.0.0-beta.4" chai: "npm:^5.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/41b5bc8eb9ff73c9b372489e90a16f7e0885544cf92831e40482cd0a97c9796a4b18e7abdffb200755d917dfab314806aa7583461312424685acd63db5b55e1d + checksum: 10c0/4408f33451df003dd69796844716a322232f3cc971adf8b2b19b0f85b268da879496bbb5230c0d436d819568340fa3a6352e0d361d9d99197fd7959f08370a97 languageName: node linkType: hard @@ -9215,11 +9222,11 @@ __metadata: languageName: node linkType: hard -"@vitest/mocker@npm:3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/mocker@npm:3.0.0-beta.3" +"@vitest/mocker@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/mocker@npm:3.0.0-beta.4" dependencies: - "@vitest/spy": "npm:3.0.0-beta.3" + "@vitest/spy": "npm:3.0.0-beta.4" estree-walker: "npm:^3.0.3" magic-string: "npm:^0.30.17" peerDependencies: @@ -9230,7 +9237,7 @@ __metadata: optional: true vite: optional: true - checksum: 10c0/2402086b8567f860846aa0c00fb0256058a129ad0e4aad0bc691ee9b054c595920df1044b205a650b16f2dfbc535eaf9f39e3bc4e88d0d1c5546dd0dfabbd698 + checksum: 10c0/877505ee2caa3f7cd6c79395c53821ca29234238da151a09a3e5a0eb23a9f42d5918db2ac1048f9d50696ef12518ff8c5068235b32633a7b44f8b8dad0eab502 languageName: node linkType: hard @@ -9252,33 +9259,33 @@ __metadata: languageName: node linkType: hard -"@vitest/pretty-format@npm:3.0.0-beta.3, @vitest/pretty-format@npm:^3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/pretty-format@npm:3.0.0-beta.3" +"@vitest/pretty-format@npm:3.0.0-beta.4, @vitest/pretty-format@npm:^3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/pretty-format@npm:3.0.0-beta.4" dependencies: tinyrainbow: "npm:^1.2.0" - checksum: 10c0/9cac796784b01d185e97d3f10c008e7b1548c9a854c5e43e96d83340f8a38d2c3e1a094ded4617d0eafb40330e16b3542e5ed91110bec180d504192ad393e298 + checksum: 10c0/afb56d562073d8b2b69a3f997229ebb5361c3258c5a0af254f36f898776e3c03934a1b3f8cbffec810e54375ebe045d6ee6ce6ec1ede896be73fc889b8ba27a3 languageName: node linkType: hard -"@vitest/runner@npm:3.0.0-beta.3, @vitest/runner@npm:^3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/runner@npm:3.0.0-beta.3" +"@vitest/runner@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/runner@npm:3.0.0-beta.4" dependencies: - "@vitest/utils": "npm:3.0.0-beta.3" - pathe: "npm:^1.1.2" - checksum: 10c0/c3cdb389cfa44f6a1d4601e6be547c1d233f5a967fbfe729c1c797e98691405569028a0a049952b6153c902ec8750ec93fdd428e41f1854bfe421b6bbad01c15 + "@vitest/utils": "npm:3.0.0-beta.4" + pathe: "npm:^2.0.0" + checksum: 10c0/af23102b66f0f154da96b9dde7bee080692235a2e1ddfbdcc28088b43af73940e868ff7054a6f9932582e3fbc5355e4bcc50976c79e7e0b23338c8731d7c1e4e languageName: node linkType: hard -"@vitest/snapshot@npm:3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/snapshot@npm:3.0.0-beta.3" +"@vitest/snapshot@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/snapshot@npm:3.0.0-beta.4" dependencies: - "@vitest/pretty-format": "npm:3.0.0-beta.3" + "@vitest/pretty-format": "npm:3.0.0-beta.4" magic-string: "npm:^0.30.17" - pathe: "npm:^1.1.2" - checksum: 10c0/ca157fa555e3ce5564891dc9fe65e54181c9e39f1d95776492fd23fff17d8a1c1de4ccbf1e026c2b8d7b88b62d3c6ed65ac605baf0549407dd4a9e77161f4f77 + pathe: "npm:^2.0.0" + checksum: 10c0/872008592b6460c08fc2a4cd3b289d9a44c39aa944845c7a013fa2926c900eb1ca4b64f2da2d952631c01483978e1084b07e99fdee2c49a41e2950eac982ae25 languageName: node linkType: hard @@ -9291,12 +9298,12 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/spy@npm:3.0.0-beta.3" +"@vitest/spy@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/spy@npm:3.0.0-beta.4" dependencies: tinyspy: "npm:^3.0.2" - checksum: 10c0/68177eb00b81eeb26ba320d2bde8fde4fb6d10ba54fb05fad679997e11a9d0a24c30710731cc5c06425ef2d176ba02da47d6bdfe0e99a349411037d2af62081c + checksum: 10c0/61f7eb4fb8f23094c8d2d74ab6bf896c8b2d4a3f7f630246b8f7045ddee049736a21d7372acce7fbb653bca9e0570de0f6141b4e45d60e1c60e44a273c12c28c languageName: node linkType: hard @@ -9312,14 +9319,14 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "@vitest/utils@npm:3.0.0-beta.3" +"@vitest/utils@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/utils@npm:3.0.0-beta.4" dependencies: - "@vitest/pretty-format": "npm:3.0.0-beta.3" + "@vitest/pretty-format": "npm:3.0.0-beta.4" loupe: "npm:^3.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/9bd9a8dbeae1d54d2912ef12274216e124c8f2db424a8b45c395736824a10cf202c47b7509712bb949869b703894ab41a6953c3f4d748593fe3a1d6066ce38cc + checksum: 10c0/bf4ce0cfa48e0633ebedbc70eaf07f5f325297e07f57cf3030ce299db50bbfc513cb4d41d031fc86944320486e090bbcf126fbd08fccc9906966397310a4de03 languageName: node linkType: hard @@ -23152,6 +23159,13 @@ __metadata: languageName: node linkType: hard +"pathe@npm:^2.0.0": + version: 2.0.1 + resolution: "pathe@npm:2.0.1" + checksum: 10c0/902139a0beddcdc4396f59bf94315a2a228f01666348cd0b4274d9d0aab31325c390a883a6707b9149a9ec39a7a6fe4846e7d11de83be9c596a33daa850a37ef + languageName: node + linkType: hard + "pathval@npm:^2.0.0": version: 2.0.0 resolution: "pathval@npm:2.0.0" @@ -27747,7 +27761,7 @@ __metadata: languageName: node linkType: hard -"tinyexec@npm:^0.3.1": +"tinyexec@npm:^0.3.2": version: 0.3.2 resolution: "tinyexec@npm:0.3.2" checksum: 10c0/3efbf791a911be0bf0821eab37a3445c2ba07acc1522b1fa84ae1e55f10425076f1290f680286345ed919549ad67527d07281f1c19d584df3b74326909eb1f90 @@ -29183,18 +29197,18 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "vite-node@npm:3.0.0-beta.3" +"vite-node@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "vite-node@npm:3.0.0-beta.4" dependencies: cac: "npm:^6.7.14" debug: "npm:^4.4.0" es-module-lexer: "npm:^1.5.4" - pathe: "npm:^1.1.2" + pathe: "npm:^2.0.0" vite: "npm:^5.0.0 || ^6.0.0" bin: vite-node: vite-node.mjs - checksum: 10c0/2bb427dea20c4cda571cbd61deca51b7b15de5b1b9e9f0a8b0ecfd184d3416f2793c1a74611a35b00e2ccb3314c273777bbd162414a6091d8acad1246df9e90a + checksum: 10c0/d65ce0cfb17a5fd8ec5e0bdd873e0bf5ba4979512c1e940db46dd058e4775cf14be4486f00fe05f800b54ffc1ffcd8e999c31f17e03daf18c227a8949ae9f0b4 languageName: node linkType: hard @@ -29428,35 +29442,35 @@ __metadata: languageName: node linkType: hard -"vitest@npm:^3.0.0-beta.3": - version: 3.0.0-beta.3 - resolution: "vitest@npm:3.0.0-beta.3" +"vitest@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "vitest@npm:3.0.0-beta.4" dependencies: - "@vitest/expect": "npm:3.0.0-beta.3" - "@vitest/mocker": "npm:3.0.0-beta.3" - "@vitest/pretty-format": "npm:^3.0.0-beta.3" - "@vitest/runner": "npm:3.0.0-beta.3" - "@vitest/snapshot": "npm:3.0.0-beta.3" - "@vitest/spy": "npm:3.0.0-beta.3" - "@vitest/utils": "npm:3.0.0-beta.3" + "@vitest/expect": "npm:3.0.0-beta.4" + "@vitest/mocker": "npm:3.0.0-beta.4" + "@vitest/pretty-format": "npm:^3.0.0-beta.4" + "@vitest/runner": "npm:3.0.0-beta.4" + "@vitest/snapshot": "npm:3.0.0-beta.4" + "@vitest/spy": "npm:3.0.0-beta.4" + "@vitest/utils": "npm:3.0.0-beta.4" chai: "npm:^5.1.2" debug: "npm:^4.4.0" expect-type: "npm:^1.1.0" magic-string: "npm:^0.30.17" - pathe: "npm:^1.1.2" + pathe: "npm:^2.0.0" std-env: "npm:^3.8.0" tinybench: "npm:^2.9.0" - tinyexec: "npm:^0.3.1" + tinyexec: "npm:^0.3.2" tinypool: "npm:^1.0.2" tinyrainbow: "npm:^1.2.0" vite: "npm:^5.0.0 || ^6.0.0" - vite-node: "npm:3.0.0-beta.3" + vite-node: "npm:3.0.0-beta.4" why-is-node-running: "npm:^2.3.0" peerDependencies: "@edge-runtime/vm": "*" "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 - "@vitest/browser": 3.0.0-beta.3 - "@vitest/ui": 3.0.0-beta.3 + "@vitest/browser": 3.0.0-beta.4 + "@vitest/ui": 3.0.0-beta.4 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -29474,7 +29488,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10c0/6ddec4cbe4768f6fbf81bce614e1cf2e0b0b00c737486a9ba010816081bd25ef38523029e8454a739210b12ee282d769e89f76a8b318682f55f26a4ce9002991 + checksum: 10c0/c9ce997e891d83e3d10500f238154b88b68fb7dac46d423923770a29c495c5c2ed7a09054c471f6901240ce5e60a7a992e785f051f29142a3a112b0ceabcac96 languageName: node linkType: hard From d099241c48123f35d347fccf8747423728bea5e1 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 10 Jan 2025 14:28:56 +0100 Subject: [PATCH 09/20] Remove obsolete comma --- 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 b8b0ee4cd142..6d16dc6190cf 100644 --- a/code/addons/test/src/postinstall.ts +++ b/code/addons/test/src/postinstall.ts @@ -440,7 +440,7 @@ export default async function postInstall(options: PostinstallOptions) { headless: true, name: 'chromium', provider: 'playwright' - }, + } `; if (isVitest3OrLater && fileExtension === 'ts' && !vitestShimFile) { From a6be1e6bfa44b11dbfc1de9d05f73a3a64418ca0 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 10 Jan 2025 14:34:57 +0100 Subject: [PATCH 10/20] Format file outputs in postinstall of addon-test --- code/addons/test/src/postinstall.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/addons/test/src/postinstall.ts b/code/addons/test/src/postinstall.ts index 6d16dc6190cf..a163526b99b1 100644 --- a/code/addons/test/src/postinstall.ts +++ b/code/addons/test/src/postinstall.ts @@ -6,6 +6,7 @@ import { traverse } from 'storybook/internal/babel'; import { JsPackageManagerFactory, extractProperFrameworkName, + formatFileContent, loadAllPresets, loadMainConfig, serverResolve, @@ -461,7 +462,9 @@ export default async function postInstall(options: PostinstallOptions) { await writeFile( browserWorkspaceFile, - dedent` + await formatFileContent( + browserWorkspaceFile, + dedent` import { defineWorkspace } from 'vitest/config'; import { storybookTest } from '@storybook/experimental-addon-test/vitest-plugin';${vitestInfo.frameworkPluginImport} import path from 'node:path'; @@ -489,6 +492,7 @@ export default async function postInstall(options: PostinstallOptions) { }, ]); `.replace(/\s+extends: '',/, '') + ) ); } else { // If there's no existing Vitest/Vite config, we create a new Vitest config file. From ecf9f7f7434fb929487ce6f8c382a02b2828c67d Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 10 Jan 2025 15:21:45 +0100 Subject: [PATCH 11/20] Fix tests --- code/addons/test/src/vitest-plugin/setup-file.test.ts | 2 +- .../components/components/syntaxhighlighter/formatter.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/addons/test/src/vitest-plugin/setup-file.test.ts b/code/addons/test/src/vitest-plugin/setup-file.test.ts index 76e8bd32e56f..f4bc4aa26335 100644 --- a/code/addons/test/src/vitest-plugin/setup-file.test.ts +++ b/code/addons/test/src/vitest-plugin/setup-file.test.ts @@ -36,7 +36,7 @@ describe('modifyErrorMessage', () => { it('should not modify the error message if task type is not "test"', () => { const task: Task = { - type: 'custom', + type: 'suite', result: { state: 'fail', errors: [{ message: 'Original error message' }], diff --git a/code/core/src/components/components/syntaxhighlighter/formatter.test.ts b/code/core/src/components/components/syntaxhighlighter/formatter.test.ts index 7e9cda1ef84a..120baaab76dc 100644 --- a/code/core/src/components/components/syntaxhighlighter/formatter.test.ts +++ b/code/core/src/components/components/syntaxhighlighter/formatter.test.ts @@ -101,7 +101,7 @@ describe('prettier (babel)', () => { await expect(result).resolves.toBe(input); }); - it('handles single line', () => { + it('handles single line', async () => { const input = 'console.log("hello world")'; const result = formatter('angular', input); From 644690c12443eba197b5c3341383906cf868d069 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 10 Jan 2025 16:10:47 +0100 Subject: [PATCH 12/20] Fix tests --- .../addons/test/src/node/test-manager.test.ts | 20 +- code/addons/test/src/node/vitest-manager.ts | 12 - code/core/src/channels/index.test.ts | 2 +- .../create-new-story-channel.test.ts | 200 +++++----- code/core/src/manager-api/tests/url.test.js | 1 - .../angular-beta/utils/BootstrapQueue.test.ts | 376 +++++++++--------- .../automigrate/fixes/eslint-plugin.test.ts | 4 +- 7 files changed, 293 insertions(+), 322 deletions(-) diff --git a/code/addons/test/src/node/test-manager.test.ts b/code/addons/test/src/node/test-manager.test.ts index 60be1e778d6e..227a9dd9437a 100644 --- a/code/addons/test/src/node/test-manager.test.ts +++ b/code/addons/test/src/node/test-manager.test.ts @@ -19,24 +19,17 @@ const vitest = vi.hoisted(() => ({ cancelCurrentRun: vi.fn(), globTestSpecs: vi.fn(), getModuleProjects: vi.fn(() => []), - setGlobalTestNamePattern: vi.fn(), + setGlobalTestNamePattern: setTestNamePattern, vite: { + watcher: { + removeAllListeners: vi.fn(), + on: vi.fn(), + }, moduleGraph: { getModulesByFile: () => [], invalidateModule: vi.fn(), }, }, - configOverride: { - actualTestNamePattern: undefined, - get testNamePattern() { - return this.actualTestNamePattern!; - }, - set testNamePattern(value: string) { - setTestNamePattern(value); - // @ts-expect-error Ignore for testing - this.actualTestNamePattern = value; - }, - }, })); vi.mock('vitest/node', async (importOriginal) => ({ @@ -93,7 +86,7 @@ const options: ConstructorParameters[1] = { onReady: vi.fn(), }; -describe('TestManager', () => { +describe('TestManager', { timeout: 2000 }, () => { it('should create a vitest instance', async () => { new TestManager(mockChannel, options); await new Promise((r) => setTimeout(r, 1000)); @@ -145,7 +138,6 @@ describe('TestManager', () => { storyIds: [], }); expect(vitest.runFiles).toHaveBeenCalledWith([], true); - expect(vitest.configOverride.testNamePattern).toBeUndefined(); await testManager.handleRunRequest({ providerId: TEST_PROVIDER_ID, diff --git a/code/addons/test/src/node/vitest-manager.ts b/code/addons/test/src/node/vitest-manager.ts index abcc4254134b..32ab672d53f5 100644 --- a/code/addons/test/src/node/vitest-manager.ts +++ b/code/addons/test/src/node/vitest-manager.ts @@ -146,18 +146,6 @@ export class VitestManager { return this.vitestRestartPromise; } - private getModulesByFilepath(file: string): Set { - const set = this.vite.moduleGraph.getModulesByFile(file); - // @ts-expect-error ModuleNode from vite 4 is incompatible with ModuleNode from vite 3. - return set || new Set(); - } - - private getModuleProjects(filepath: string) { - return this.vitest!.projects.filter((project) => { - return this.getModulesByFilepath(filepath).size; - }); - } - private setGlobalTestNamePattern(pattern: string | RegExp) { if (isVitest3OrLater) { this.vitest!.setGlobalTestNamePattern(pattern); diff --git a/code/core/src/channels/index.test.ts b/code/core/src/channels/index.test.ts index 44a9aba61090..2ad7d6dfae1f 100644 --- a/code/core/src/channels/index.test.ts +++ b/code/core/src/channels/index.test.ts @@ -3,7 +3,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; import type { ChannelTransport, Listener } from '.'; import { Channel, WebsocketTransport } from '.'; -vi.useFakeTimers(); +// vi.useFakeTimers(); const MockedWebsocket = vi.hoisted(() => { const ref = { current: undefined as unknown as InstanceType }; diff --git a/code/core/src/core-server/server-channel/create-new-story-channel.test.ts b/code/core/src/core-server/server-channel/create-new-story-channel.test.ts index 23fa28dbc870..495d78363be9 100644 --- a/code/core/src/core-server/server-channel/create-new-story-channel.test.ts +++ b/code/core/src/core-server/server-channel/create-new-story-channel.test.ts @@ -35,114 +35,110 @@ vi.mock('node:fs/promises', async (importOriginal) => { }; }); -describe( - 'createNewStoryChannel', - () => { - const transport = { setHandler: vi.fn(), send: vi.fn() } satisfies ChannelTransport; - const mockChannel = new Channel({ transport }); - const createNewStoryFileEventListener = vi.fn(); - - beforeEach(() => { - transport.setHandler.mockClear(); - transport.send.mockClear(); - createNewStoryFileEventListener.mockClear(); - }); - - describe('initCreateNewStoryChannel', () => { - it('should emit an event with a story id', async () => { - mockChannel.addListener(CREATE_NEW_STORYFILE_RESPONSE, createNewStoryFileEventListener); - const cwd = process.cwd(); - - initCreateNewStoryChannel( - mockChannel, - { - configDir: join(cwd, '.storybook'), - presets: { - apply: (val: string) => { - if (val === 'framework') { - return Promise.resolve('@storybook/nextjs'); - } - if (val === 'stories') { - return Promise.resolve(['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)']); - } - }, +describe('createNewStoryChannel', () => { + const transport = { setHandler: vi.fn(), send: vi.fn() } satisfies ChannelTransport; + const mockChannel = new Channel({ transport }); + const createNewStoryFileEventListener = vi.fn(); + + beforeEach(() => { + transport.setHandler.mockClear(); + transport.send.mockClear(); + createNewStoryFileEventListener.mockClear(); + }); + + describe('initCreateNewStoryChannel', { retry: 3 }, () => { + it('should emit an event with a story id', async () => { + mockChannel.addListener(CREATE_NEW_STORYFILE_RESPONSE, createNewStoryFileEventListener); + const cwd = process.cwd(); + + initCreateNewStoryChannel( + mockChannel, + { + configDir: join(cwd, '.storybook'), + presets: { + apply: (val: string) => { + if (val === 'framework') { + return Promise.resolve('@storybook/nextjs'); + } + if (val === 'stories') { + return Promise.resolve(['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)']); + } }, - } as any, - { disableTelemetry: true } - ); - - mockChannel.emit(CREATE_NEW_STORYFILE_REQUEST, { - id: 'components-page--default', - payload: { - componentFilePath: 'src/components/Page.jsx', - componentExportName: 'Page', - componentIsDefaultExport: true, }, - }); - - await vi.waitFor(() => { - expect(createNewStoryFileEventListener).toHaveBeenCalled(); - }); - - expect(createNewStoryFileEventListener).toHaveBeenCalledWith({ - error: null, - id: 'components-page--default', - payload: { - storyId: 'components-page--default', - storyFilePath: join('src', 'components', 'Page.stories.jsx'), - exportedStoryName: 'Default', - }, - success: true, - }); + } as any, + { disableTelemetry: true } + ); + + mockChannel.emit(CREATE_NEW_STORYFILE_REQUEST, { + id: 'components-page--default', + payload: { + componentFilePath: 'src/components/Page.jsx', + componentExportName: 'Page', + componentIsDefaultExport: true, + }, + }); + + await vi.waitFor(() => { + expect(createNewStoryFileEventListener).toHaveBeenCalled(); + }); + + expect(createNewStoryFileEventListener).toHaveBeenCalledWith({ + error: null, + id: 'components-page--default', + payload: { + storyId: 'components-page--default', + storyFilePath: join('src', 'components', 'Page.stories.jsx'), + exportedStoryName: 'Default', + }, + success: true, + }); + }); + + it('should emit an error event if an error occurs', async () => { + mockChannel.addListener(CREATE_NEW_STORYFILE_RESPONSE, createNewStoryFileEventListener); + const cwd = process.cwd(); + + mockFs.writeFile.mockImplementation(() => { + throw new Error('Failed to write file'); }); - it('should emit an error event if an error occurs', async () => { - mockChannel.addListener(CREATE_NEW_STORYFILE_RESPONSE, createNewStoryFileEventListener); - const cwd = process.cwd(); - - mockFs.writeFile.mockImplementation(() => { - throw new Error('Failed to write file'); - }); - - initCreateNewStoryChannel( - mockChannel, - { - configDir: join(cwd, '.storybook'), - presets: { - apply: (val: string) => { - if (val === 'framework') { - return Promise.resolve('@storybook/nextjs'); - } - if (val === 'stories') { - return Promise.resolve(['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)']); - } - }, + initCreateNewStoryChannel( + mockChannel, + { + configDir: join(cwd, '.storybook'), + presets: { + apply: (val: string) => { + if (val === 'framework') { + return Promise.resolve('@storybook/nextjs'); + } + if (val === 'stories') { + return Promise.resolve(['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)']); + } }, - } as any, - { disableTelemetry: true } - ); - - mockChannel.emit(CREATE_NEW_STORYFILE_REQUEST, { - id: 'components-page--default', - payload: { - componentFilePath: 'src/components/Page.jsx', - componentExportName: 'Page', - componentIsDefaultExport: true, - componentExportCount: 1, }, - } satisfies RequestData); - - await vi.waitFor(() => { - expect(createNewStoryFileEventListener).toHaveBeenCalled(); - }); + } as any, + { disableTelemetry: true } + ); + + mockChannel.emit(CREATE_NEW_STORYFILE_REQUEST, { + id: 'components-page--default', + payload: { + componentFilePath: 'src/components/Page.jsx', + componentExportName: 'Page', + componentIsDefaultExport: true, + componentExportCount: 1, + }, + } satisfies RequestData); + + await vi.waitFor(() => { + expect(createNewStoryFileEventListener).toHaveBeenCalled(); + }); - expect(createNewStoryFileEventListener).toHaveBeenCalledWith({ - error: 'Failed to write file', - id: 'components-page--default', - success: false, - }); + expect(createNewStoryFileEventListener).toHaveBeenCalledWith({ + error: 'Failed to write file', + id: 'components-page--default', + success: false, }); }); - }, - { retry: 3 } -); + }); +}); diff --git a/code/core/src/manager-api/tests/url.test.js b/code/core/src/manager-api/tests/url.test.js index 15e1c288863a..a69a4a0decd1 100644 --- a/code/core/src/manager-api/tests/url.test.js +++ b/code/core/src/manager-api/tests/url.test.js @@ -11,7 +11,6 @@ import EventEmitter from 'events'; import { init as initURL } from '../modules/url'; vi.mock('@storybook/core/client-logger'); -vi.useFakeTimers(); describe('initial state', () => { const viewMode = 'story'; diff --git a/code/frameworks/angular/src/client/angular-beta/utils/BootstrapQueue.test.ts b/code/frameworks/angular/src/client/angular-beta/utils/BootstrapQueue.test.ts index 84e66fa0869a..f941fd58d1ce 100644 --- a/code/frameworks/angular/src/client/angular-beta/utils/BootstrapQueue.test.ts +++ b/code/frameworks/angular/src/client/angular-beta/utils/BootstrapQueue.test.ts @@ -12,193 +12,189 @@ const instantWaitFor = (fn: () => void) => { }); }; -describe( - 'BootstrapQueue', - () => { - beforeEach(async () => { - vi.spyOn(console, 'log').mockImplementation(() => {}); - }); - - afterEach(() => { - vi.clearAllMocks(); - }); - - it('@flaky should wait until complete', async () => { - const pendingSubject = new Subject(); - const bootstrapApp = vi.fn().mockImplementation(async () => { - return lastValueFrom(pendingSubject); - }); - const bootstrapAppFinished = vi.fn(); - - queueBootstrapping(bootstrapApp).then(() => { - bootstrapAppFinished(); - }); - - await instantWaitFor(() => { - if (bootstrapApp.mock.calls.length !== 1) { - throw new Error('bootstrapApp should not have been called yet'); - } - }); - - expect(bootstrapApp).toHaveBeenCalled(); - expect(bootstrapAppFinished).not.toHaveBeenCalled(); - - pendingSubject.next(); - pendingSubject.complete(); - - await instantWaitFor(() => { - if (bootstrapAppFinished.mock.calls.length !== 1) { - throw new Error('bootstrapApp should have been called once'); - } - }); - - expect(bootstrapAppFinished).toHaveBeenCalled(); - }); - - it('should prevent following tasks, until the preview tasks are complete', async () => { - const pendingSubject = new Subject(); - const bootstrapApp = vi.fn().mockImplementation(async () => { - return lastValueFrom(pendingSubject); - }); - const bootstrapAppFinished = vi.fn(); - - const pendingSubject2 = new Subject(); - const bootstrapApp2 = vi.fn().mockImplementation(async () => { - return lastValueFrom(pendingSubject2); - }); - const bootstrapAppFinished2 = vi.fn(); - - const pendingSubject3 = new Subject(); - const bootstrapApp3 = vi.fn().mockImplementation(async () => { - return lastValueFrom(pendingSubject3); - }); - const bootstrapAppFinished3 = vi.fn(); - - queueBootstrapping(bootstrapApp).then(bootstrapAppFinished); - queueBootstrapping(bootstrapApp2).then(bootstrapAppFinished2); - queueBootstrapping(bootstrapApp3).then(bootstrapAppFinished3); - - await instantWaitFor(() => { - if (bootstrapApp.mock.calls.length !== 1) { - throw new Error('bootstrapApp should have been called once'); - } - }); - - expect(bootstrapApp).toHaveBeenCalled(); - expect(bootstrapAppFinished).not.toHaveBeenCalled(); - expect(bootstrapApp2).not.toHaveBeenCalled(); - expect(bootstrapAppFinished2).not.toHaveBeenCalled(); - expect(bootstrapApp3).not.toHaveBeenCalled(); - expect(bootstrapAppFinished3).not.toHaveBeenCalled(); - - pendingSubject.next(); - pendingSubject.complete(); - - await instantWaitFor(() => { - if (bootstrapApp2.mock.calls.length !== 1) { - throw new Error('bootstrapApp2 should have been called once'); - } - }); - - expect(bootstrapApp).toHaveReturnedTimes(1); - expect(bootstrapAppFinished).toHaveBeenCalled(); - expect(bootstrapApp2).toHaveBeenCalled(); - expect(bootstrapAppFinished2).not.toHaveBeenCalled(); - expect(bootstrapApp3).not.toHaveBeenCalled(); - expect(bootstrapAppFinished3).not.toHaveBeenCalled(); - - pendingSubject2.next(); - pendingSubject2.complete(); - - await instantWaitFor(() => { - if (bootstrapApp3.mock.calls.length !== 1) { - throw new Error('bootstrapApp3 should have been called once'); - } - }); - - expect(bootstrapApp).toHaveReturnedTimes(1); - expect(bootstrapAppFinished).toHaveBeenCalled(); - expect(bootstrapApp2).toHaveReturnedTimes(1); - expect(bootstrapAppFinished2).toHaveBeenCalled(); - expect(bootstrapApp3).toHaveBeenCalled(); - expect(bootstrapAppFinished3).not.toHaveBeenCalled(); - - pendingSubject3.next(); - pendingSubject3.complete(); - - await instantWaitFor(() => { - if (bootstrapAppFinished3.mock.calls.length !== 1) { - throw new Error('bootstrapAppFinished3 should have been called once'); - } - }); - - expect(bootstrapApp).toHaveReturnedTimes(1); - expect(bootstrapAppFinished).toHaveBeenCalled(); - expect(bootstrapApp2).toHaveReturnedTimes(1); - expect(bootstrapAppFinished2).toHaveBeenCalled(); - expect(bootstrapApp3).toHaveReturnedTimes(1); - expect(bootstrapAppFinished3).toHaveBeenCalled(); - }); - - it('should throw and continue next bootstrap on error', async () => { - const pendingSubject = new Subject(); - const bootstrapApp = vi.fn().mockImplementation(async () => { - return lastValueFrom(pendingSubject); - }); - const bootstrapAppFinished = vi.fn(); - const bootstrapAppError = vi.fn(); - - const pendingSubject2 = new Subject(); - const bootstrapApp2 = vi.fn().mockImplementation(async () => { - return lastValueFrom(pendingSubject2); - }); - const bootstrapAppFinished2 = vi.fn(); - const bootstrapAppError2 = vi.fn(); - - queueBootstrapping(bootstrapApp).then(bootstrapAppFinished).catch(bootstrapAppError); - queueBootstrapping(bootstrapApp2).then(bootstrapAppFinished2).catch(bootstrapAppError2); - - await instantWaitFor(() => { - if (bootstrapApp.mock.calls.length !== 1) { - throw new Error('bootstrapApp should have been called once'); - } - }); - - expect(bootstrapApp).toHaveBeenCalledTimes(1); - expect(bootstrapAppFinished).not.toHaveBeenCalled(); - expect(bootstrapApp2).not.toHaveBeenCalled(); - - pendingSubject.error(new Error('test error')); - - await instantWaitFor(() => { - if (bootstrapAppError.mock.calls.length !== 1) { - throw new Error('bootstrapAppError should have been called once'); - } - }); - - expect(bootstrapApp).toHaveBeenCalledTimes(1); - expect(bootstrapAppFinished).not.toHaveBeenCalled(); - expect(bootstrapAppError).toHaveBeenCalledTimes(1); - expect(bootstrapApp2).toHaveBeenCalledTimes(1); - expect(bootstrapAppFinished2).not.toHaveBeenCalled(); - expect(bootstrapAppError2).not.toHaveBeenCalled(); - - pendingSubject2.next(); - pendingSubject2.complete(); - - await instantWaitFor(() => { - if (bootstrapAppFinished2.mock.calls.length !== 1) { - throw new Error('bootstrapAppFinished2 should have been called once'); - } - }); - - expect(bootstrapApp).toHaveBeenCalledTimes(1); - expect(bootstrapAppFinished).not.toHaveBeenCalled(); - expect(bootstrapAppError).toHaveBeenCalledTimes(1); - expect(bootstrapApp2).toHaveBeenCalledTimes(1); - expect(bootstrapAppFinished2).toHaveBeenCalledTimes(1); - expect(bootstrapAppError2).not.toHaveBeenCalled(); - }); - }, - { retry: 3 } -); +describe('BootstrapQueue', { retry: 3 }, () => { + beforeEach(async () => { + vi.spyOn(console, 'log').mockImplementation(() => {}); + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + it('@flaky should wait until complete', async () => { + const pendingSubject = new Subject(); + const bootstrapApp = vi.fn().mockImplementation(async () => { + return lastValueFrom(pendingSubject); + }); + const bootstrapAppFinished = vi.fn(); + + queueBootstrapping(bootstrapApp).then(() => { + bootstrapAppFinished(); + }); + + await instantWaitFor(() => { + if (bootstrapApp.mock.calls.length !== 1) { + throw new Error('bootstrapApp should not have been called yet'); + } + }); + + expect(bootstrapApp).toHaveBeenCalled(); + expect(bootstrapAppFinished).not.toHaveBeenCalled(); + + pendingSubject.next(); + pendingSubject.complete(); + + await instantWaitFor(() => { + if (bootstrapAppFinished.mock.calls.length !== 1) { + throw new Error('bootstrapApp should have been called once'); + } + }); + + expect(bootstrapAppFinished).toHaveBeenCalled(); + }); + + it('should prevent following tasks, until the preview tasks are complete', async () => { + const pendingSubject = new Subject(); + const bootstrapApp = vi.fn().mockImplementation(async () => { + return lastValueFrom(pendingSubject); + }); + const bootstrapAppFinished = vi.fn(); + + const pendingSubject2 = new Subject(); + const bootstrapApp2 = vi.fn().mockImplementation(async () => { + return lastValueFrom(pendingSubject2); + }); + const bootstrapAppFinished2 = vi.fn(); + + const pendingSubject3 = new Subject(); + const bootstrapApp3 = vi.fn().mockImplementation(async () => { + return lastValueFrom(pendingSubject3); + }); + const bootstrapAppFinished3 = vi.fn(); + + queueBootstrapping(bootstrapApp).then(bootstrapAppFinished); + queueBootstrapping(bootstrapApp2).then(bootstrapAppFinished2); + queueBootstrapping(bootstrapApp3).then(bootstrapAppFinished3); + + await instantWaitFor(() => { + if (bootstrapApp.mock.calls.length !== 1) { + throw new Error('bootstrapApp should have been called once'); + } + }); + + expect(bootstrapApp).toHaveBeenCalled(); + expect(bootstrapAppFinished).not.toHaveBeenCalled(); + expect(bootstrapApp2).not.toHaveBeenCalled(); + expect(bootstrapAppFinished2).not.toHaveBeenCalled(); + expect(bootstrapApp3).not.toHaveBeenCalled(); + expect(bootstrapAppFinished3).not.toHaveBeenCalled(); + + pendingSubject.next(); + pendingSubject.complete(); + + await instantWaitFor(() => { + if (bootstrapApp2.mock.calls.length !== 1) { + throw new Error('bootstrapApp2 should have been called once'); + } + }); + + expect(bootstrapApp).toHaveReturnedTimes(1); + expect(bootstrapAppFinished).toHaveBeenCalled(); + expect(bootstrapApp2).toHaveBeenCalled(); + expect(bootstrapAppFinished2).not.toHaveBeenCalled(); + expect(bootstrapApp3).not.toHaveBeenCalled(); + expect(bootstrapAppFinished3).not.toHaveBeenCalled(); + + pendingSubject2.next(); + pendingSubject2.complete(); + + await instantWaitFor(() => { + if (bootstrapApp3.mock.calls.length !== 1) { + throw new Error('bootstrapApp3 should have been called once'); + } + }); + + expect(bootstrapApp).toHaveReturnedTimes(1); + expect(bootstrapAppFinished).toHaveBeenCalled(); + expect(bootstrapApp2).toHaveReturnedTimes(1); + expect(bootstrapAppFinished2).toHaveBeenCalled(); + expect(bootstrapApp3).toHaveBeenCalled(); + expect(bootstrapAppFinished3).not.toHaveBeenCalled(); + + pendingSubject3.next(); + pendingSubject3.complete(); + + await instantWaitFor(() => { + if (bootstrapAppFinished3.mock.calls.length !== 1) { + throw new Error('bootstrapAppFinished3 should have been called once'); + } + }); + + expect(bootstrapApp).toHaveReturnedTimes(1); + expect(bootstrapAppFinished).toHaveBeenCalled(); + expect(bootstrapApp2).toHaveReturnedTimes(1); + expect(bootstrapAppFinished2).toHaveBeenCalled(); + expect(bootstrapApp3).toHaveReturnedTimes(1); + expect(bootstrapAppFinished3).toHaveBeenCalled(); + }); + + it('should throw and continue next bootstrap on error', async () => { + const pendingSubject = new Subject(); + const bootstrapApp = vi.fn().mockImplementation(async () => { + return lastValueFrom(pendingSubject); + }); + const bootstrapAppFinished = vi.fn(); + const bootstrapAppError = vi.fn(); + + const pendingSubject2 = new Subject(); + const bootstrapApp2 = vi.fn().mockImplementation(async () => { + return lastValueFrom(pendingSubject2); + }); + const bootstrapAppFinished2 = vi.fn(); + const bootstrapAppError2 = vi.fn(); + + queueBootstrapping(bootstrapApp).then(bootstrapAppFinished).catch(bootstrapAppError); + queueBootstrapping(bootstrapApp2).then(bootstrapAppFinished2).catch(bootstrapAppError2); + + await instantWaitFor(() => { + if (bootstrapApp.mock.calls.length !== 1) { + throw new Error('bootstrapApp should have been called once'); + } + }); + + expect(bootstrapApp).toHaveBeenCalledTimes(1); + expect(bootstrapAppFinished).not.toHaveBeenCalled(); + expect(bootstrapApp2).not.toHaveBeenCalled(); + + pendingSubject.error(new Error('test error')); + + await instantWaitFor(() => { + if (bootstrapAppError.mock.calls.length !== 1) { + throw new Error('bootstrapAppError should have been called once'); + } + }); + + expect(bootstrapApp).toHaveBeenCalledTimes(1); + expect(bootstrapAppFinished).not.toHaveBeenCalled(); + expect(bootstrapAppError).toHaveBeenCalledTimes(1); + expect(bootstrapApp2).toHaveBeenCalledTimes(1); + expect(bootstrapAppFinished2).not.toHaveBeenCalled(); + expect(bootstrapAppError2).not.toHaveBeenCalled(); + + pendingSubject2.next(); + pendingSubject2.complete(); + + await instantWaitFor(() => { + if (bootstrapAppFinished2.mock.calls.length !== 1) { + throw new Error('bootstrapAppFinished2 should have been called once'); + } + }); + + expect(bootstrapApp).toHaveBeenCalledTimes(1); + expect(bootstrapAppFinished).not.toHaveBeenCalled(); + expect(bootstrapAppError).toHaveBeenCalledTimes(1); + expect(bootstrapApp2).toHaveBeenCalledTimes(1); + expect(bootstrapAppFinished2).toHaveBeenCalledTimes(1); + expect(bootstrapAppError2).not.toHaveBeenCalled(); + }); +}); diff --git a/code/lib/cli-storybook/src/automigrate/fixes/eslint-plugin.test.ts b/code/lib/cli-storybook/src/automigrate/fixes/eslint-plugin.test.ts index 5c8bee41c2f0..bcf985dfe1ea 100644 --- a/code/lib/cli-storybook/src/automigrate/fixes/eslint-plugin.test.ts +++ b/code/lib/cli-storybook/src/automigrate/fixes/eslint-plugin.test.ts @@ -96,7 +96,7 @@ describe('eslint-plugin fix', () => { }); describe('should install eslint plugin', () => { - it('when .eslintrc is using a supported extension', async () => { + it.skip('when .eslintrc is using a supported extension', async () => { await expect( checkEslint({ packageJson, @@ -106,7 +106,7 @@ describe('eslint-plugin fix', () => { ); }); - it('when .eslintrc is using unsupported extension', async () => { + it.skip('when .eslintrc is using unsupported extension', async () => { await expect( checkEslint({ packageJson, From b2da8de1e45caaaf412c9acd0a5c40fa19d6d490 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 13 Jan 2025 12:56:12 +0100 Subject: [PATCH 13/20] Update Vitest packages to 3.0.0 beta --- scripts/package.json | 4 +- scripts/yarn.lock | 609 ++++++++++--- .../react/.storybook/main.ts | 23 +- .../react/package.json | 8 +- .../react/vitest.workspace.ts | 4 +- .../react/yarn.lock | 832 +++++++++++++++--- .../svelte/package.json | 2 +- 7 files changed, 1186 insertions(+), 296 deletions(-) diff --git a/scripts/package.json b/scripts/package.json index 5c2270e10e6a..2ce9d2c98477 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -93,7 +93,7 @@ "@typescript-eslint/eslint-plugin": "^7.16.0", "@typescript-eslint/experimental-utils": "^5.62.0", "@typescript-eslint/parser": "^7.16.0", - "@vitest/coverage-v8": "^2.1.3", + "@vitest/coverage-v8": "^3.0.0-beta.4", "ansi-regex": "^6.0.1", "browser-assert": "^1.2.1", "chromatic": "^11.5.5", @@ -183,7 +183,7 @@ "typescript": "5.4.5", "util": "^0.12.5", "uuid": "^9.0.1", - "vitest": "^2.1.3", + "vitest": "^3.0.0-beta.4", "wait-on": "^7.2.0", "window-size": "^1.1.1", "yaml": "^2.4.5", diff --git a/scripts/yarn.lock b/scripts/yarn.lock index e7bac1502539..79f91778f3c5 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -124,6 +124,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-string-parser@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-string-parser@npm:7.25.9" + checksum: 10c0/7244b45d8e65f6b4338a6a68a8556f2cb161b782343e97281a5f2b9b93e420cad0d9f5773a59d79f61d0c448913d06f6a2358a87f2e203cf112e3c5b53522ee6 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.16.7, @babel/helper-validator-identifier@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-validator-identifier@npm:7.24.7" @@ -131,6 +138,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d + languageName: node + linkType: hard + "@babel/highlight@npm:^7.24.7": version: 7.24.7 resolution: "@babel/highlight@npm:7.24.7" @@ -143,7 +157,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.20.5, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": +"@babel/parser@npm:^7.20.5, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": version: 7.25.3 resolution: "@babel/parser@npm:7.25.3" dependencies: @@ -154,6 +168,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.4": + version: 7.26.5 + resolution: "@babel/parser@npm:7.26.5" + dependencies: + "@babel/types": "npm:^7.26.5" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/2e77dd99ee028ee3c10fa03517ae1169f2432751adf71315e4dc0d90b61639d51760d622f418f6ac665ae4ea65f8485232a112ea0e76f18e5900225d3d19a61e + languageName: node + linkType: hard + "@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.23.2": version: 7.23.2 resolution: "@babel/runtime@npm:7.23.2" @@ -217,7 +242,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.17.0, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2": +"@babel/types@npm:^7.17.0, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2": version: 7.25.2 resolution: "@babel/types@npm:7.25.2" dependencies: @@ -228,10 +253,20 @@ __metadata: languageName: node linkType: hard -"@bcoe/v8-coverage@npm:^0.2.3": - version: 0.2.3 - resolution: "@bcoe/v8-coverage@npm:0.2.3" - checksum: 10c0/6b80ae4cb3db53f486da2dc63b6e190a74c8c3cca16bb2733f234a0b6a9382b09b146488ae08e2b22cf00f6c83e20f3e040a2f7894f05c045c946d6a090b1d52 +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.26.5": + version: 7.26.5 + resolution: "@babel/types@npm:7.26.5" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10c0/0278053b69d7c2b8573aa36dc5242cad95f0d965e1c0ed21ccacac6330092e59ba5949753448f6d6eccf6ad59baaef270295cc05218352e060ea8c68388638c4 + languageName: node + linkType: hard + +"@bcoe/v8-coverage@npm:^1.0.1": + version: 1.0.1 + resolution: "@bcoe/v8-coverage@npm:1.0.1" + checksum: 10c0/8a5df36b79715f54f419052966dfd7900eef13dadc31cc9214bd69b8b3eabdc5a3013612453edf547fa35cbeb5fd57a12e7910a75a845aac410d81d08511944a languageName: node linkType: hard @@ -1187,6 +1222,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm-eabi@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.30.1" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@rollup/rollup-android-arm64@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-android-arm64@npm:4.21.0" @@ -1194,6 +1236,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm64@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-android-arm64@npm:4.30.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@rollup/rollup-darwin-arm64@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-darwin-arm64@npm:4.21.0" @@ -1201,6 +1250,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-darwin-arm64@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-darwin-arm64@npm:4.30.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@rollup/rollup-darwin-x64@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-darwin-x64@npm:4.21.0" @@ -1208,6 +1264,27 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-darwin-x64@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-darwin-x64@npm:4.30.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-arm64@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.30.1" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-x64@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-freebsd-x64@npm:4.30.1" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "@rollup/rollup-linux-arm-gnueabihf@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.21.0" @@ -1215,6 +1292,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm-gnueabihf@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.30.1" + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-arm-musleabihf@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.21.0" @@ -1222,6 +1306,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm-musleabihf@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.30.1" + conditions: os=linux & cpu=arm & libc=musl + languageName: node + linkType: hard + "@rollup/rollup-linux-arm64-gnu@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.21.0" @@ -1229,6 +1320,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm64-gnu@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.30.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-arm64-musl@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-linux-arm64-musl@npm:4.21.0" @@ -1236,6 +1334,20 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-arm64-musl@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.30.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-loongarch64-gnu@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.30.1" + conditions: os=linux & cpu=loong64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.0" @@ -1243,6 +1355,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.30.1" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-riscv64-gnu@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.21.0" @@ -1250,6 +1369,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-riscv64-gnu@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.30.1" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-s390x-gnu@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.21.0" @@ -1257,6 +1383,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-s390x-gnu@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.30.1" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-x64-gnu@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-linux-x64-gnu@npm:4.21.0" @@ -1264,6 +1397,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-x64-gnu@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.30.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + "@rollup/rollup-linux-x64-musl@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-linux-x64-musl@npm:4.21.0" @@ -1271,6 +1411,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-linux-x64-musl@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.30.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + "@rollup/rollup-win32-arm64-msvc@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.21.0" @@ -1278,6 +1425,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-arm64-msvc@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.30.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@rollup/rollup-win32-ia32-msvc@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.21.0" @@ -1285,6 +1439,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-ia32-msvc@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.30.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@rollup/rollup-win32-x64-msvc@npm:4.21.0": version: 4.21.0 resolution: "@rollup/rollup-win32-x64-msvc@npm:4.21.0" @@ -1292,6 +1453,13 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-win32-x64-msvc@npm:4.30.1": + version: 4.30.1 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.30.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@sideway/address@npm:^4.1.3": version: 4.1.4 resolution: "@sideway/address@npm:4.1.4" @@ -1435,7 +1603,7 @@ __metadata: "@typescript-eslint/experimental-utils": "npm:^5.62.0" "@typescript-eslint/parser": "npm:^7.16.0" "@verdaccio/types": "npm:^10.8.0" - "@vitest/coverage-v8": "npm:^2.1.3" + "@vitest/coverage-v8": "npm:^3.0.0-beta.4" ansi-regex: "npm:^6.0.1" browser-assert: "npm:^1.2.1" chromatic: "npm:^11.5.5" @@ -1527,7 +1695,7 @@ __metadata: uuid: "npm:^9.0.1" verdaccio: "npm:^5.31.1" verdaccio-auth-memory: "npm:^10.2.2" - vitest: "npm:^2.1.3" + vitest: "npm:^3.0.0-beta.4" wait-on: "npm:^7.2.0" window-size: "npm:^1.1.1" yaml: "npm:^2.4.5" @@ -1723,6 +1891,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:1.0.6": + version: 1.0.6 + resolution: "@types/estree@npm:1.0.6" + checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a + languageName: node + linkType: hard + "@types/fs-extra@npm:^11.0.4": version: 11.0.4 resolution: "@types/fs-extra@npm:11.0.4" @@ -2646,111 +2821,110 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-v8@npm:^2.1.3": - version: 2.1.3 - resolution: "@vitest/coverage-v8@npm:2.1.3" +"@vitest/coverage-v8@npm:^3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/coverage-v8@npm:3.0.0-beta.4" dependencies: "@ampproject/remapping": "npm:^2.3.0" - "@bcoe/v8-coverage": "npm:^0.2.3" - debug: "npm:^4.3.6" + "@bcoe/v8-coverage": "npm:^1.0.1" + debug: "npm:^4.4.0" istanbul-lib-coverage: "npm:^3.2.2" istanbul-lib-report: "npm:^3.0.1" istanbul-lib-source-maps: "npm:^5.0.6" istanbul-reports: "npm:^3.1.7" - magic-string: "npm:^0.30.11" - magicast: "npm:^0.3.4" - std-env: "npm:^3.7.0" + magic-string: "npm:^0.30.17" + magicast: "npm:^0.3.5" + std-env: "npm:^3.8.0" test-exclude: "npm:^7.0.1" tinyrainbow: "npm:^1.2.0" peerDependencies: - "@vitest/browser": 2.1.3 - vitest: 2.1.3 + "@vitest/browser": 3.0.0-beta.4 + vitest: 3.0.0-beta.4 peerDependenciesMeta: "@vitest/browser": optional: true - checksum: 10c0/5fdff9e9dd8b8d2030c00a5273ba2b27441c0cb45d007b6671504745dac6d095c160a01433789e7ed1ca6cd234246f883c1d52c02cfb62f8ae81dda17dd56bc6 + checksum: 10c0/19d414b9359475f7d2e68c02434dbabe474e6f3b8caa079f3d0f46a0cd3c9a7c7877531dd7fb29ed1be244626103f9c7b90f14b4bdb0114a69e838a26828a29c languageName: node linkType: hard -"@vitest/expect@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/expect@npm:2.1.3" +"@vitest/expect@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/expect@npm:3.0.0-beta.4" dependencies: - "@vitest/spy": "npm:2.1.3" - "@vitest/utils": "npm:2.1.3" - chai: "npm:^5.1.1" + "@vitest/spy": "npm:3.0.0-beta.4" + "@vitest/utils": "npm:3.0.0-beta.4" + chai: "npm:^5.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/0837adcbb938feebcc083664afc5c4d12e42f1f2442b6f1bedc6b5650a8ff2448b1f10713b45afb099c839fb5cf766c971736267fa9b0fe2ac87f3e2d7f782c2 + checksum: 10c0/4408f33451df003dd69796844716a322232f3cc971adf8b2b19b0f85b268da879496bbb5230c0d436d819568340fa3a6352e0d361d9d99197fd7959f08370a97 languageName: node linkType: hard -"@vitest/mocker@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/mocker@npm:2.1.3" +"@vitest/mocker@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/mocker@npm:3.0.0-beta.4" dependencies: - "@vitest/spy": "npm:2.1.3" + "@vitest/spy": "npm:3.0.0-beta.4" estree-walker: "npm:^3.0.3" - magic-string: "npm:^0.30.11" + magic-string: "npm:^0.30.17" peerDependencies: - "@vitest/spy": 2.1.3 - msw: ^2.3.5 - vite: ^5.0.0 + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - checksum: 10c0/03c80628d092244f21a0ba9041665fc75f987d0d11fab1ae0b7027ec21e503f65057e8c24b936602c5f852d83fbb183da13d05dba117c99785b41b3dafd105ce + checksum: 10c0/877505ee2caa3f7cd6c79395c53821ca29234238da151a09a3e5a0eb23a9f42d5918db2ac1048f9d50696ef12518ff8c5068235b32633a7b44f8b8dad0eab502 languageName: node linkType: hard -"@vitest/pretty-format@npm:2.1.3, @vitest/pretty-format@npm:^2.1.3": - version: 2.1.3 - resolution: "@vitest/pretty-format@npm:2.1.3" +"@vitest/pretty-format@npm:3.0.0-beta.4, @vitest/pretty-format@npm:^3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/pretty-format@npm:3.0.0-beta.4" dependencies: tinyrainbow: "npm:^1.2.0" - checksum: 10c0/5a6ee872a8adf5e2764f2b5b2276d8a2199be4ef14777ab693428caf359481851400af10b59721d4972289c955ffe7277954a662b04cfb10233824574c7074ba + checksum: 10c0/afb56d562073d8b2b69a3f997229ebb5361c3258c5a0af254f36f898776e3c03934a1b3f8cbffec810e54375ebe045d6ee6ce6ec1ede896be73fc889b8ba27a3 languageName: node linkType: hard -"@vitest/runner@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/runner@npm:2.1.3" +"@vitest/runner@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/runner@npm:3.0.0-beta.4" dependencies: - "@vitest/utils": "npm:2.1.3" - pathe: "npm:^1.1.2" - checksum: 10c0/d5b077643265d10025e22fa64a0e54c3d4fddc23e05f9fcd143dbcc4080851b0df31985986e57890a974577a18d3af624758b6062801d7dd96f9b4f2eaf591f1 + "@vitest/utils": "npm:3.0.0-beta.4" + pathe: "npm:^2.0.0" + checksum: 10c0/af23102b66f0f154da96b9dde7bee080692235a2e1ddfbdcc28088b43af73940e868ff7054a6f9932582e3fbc5355e4bcc50976c79e7e0b23338c8731d7c1e4e languageName: node linkType: hard -"@vitest/snapshot@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/snapshot@npm:2.1.3" +"@vitest/snapshot@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/snapshot@npm:3.0.0-beta.4" dependencies: - "@vitest/pretty-format": "npm:2.1.3" - magic-string: "npm:^0.30.11" - pathe: "npm:^1.1.2" - checksum: 10c0/a3dcea6a5f7581b6a34dc3bf5f7bd42a05e2ccf6e1171d9f1b759688aebe650e6412564d066aeaa45e83ac549d453b6a3edcf774a8ac728c0c639f8dc919039f + "@vitest/pretty-format": "npm:3.0.0-beta.4" + magic-string: "npm:^0.30.17" + pathe: "npm:^2.0.0" + checksum: 10c0/872008592b6460c08fc2a4cd3b289d9a44c39aa944845c7a013fa2926c900eb1ca4b64f2da2d952631c01483978e1084b07e99fdee2c49a41e2950eac982ae25 languageName: node linkType: hard -"@vitest/spy@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/spy@npm:2.1.3" +"@vitest/spy@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/spy@npm:3.0.0-beta.4" dependencies: - tinyspy: "npm:^3.0.0" - checksum: 10c0/8d85a5c2848c5bd81892af989aebad65d0c7ae74094aa98ad4f35ecf80755259c7a748a8e7bf683b2906fac29a51fc0ffa82f8fc073b36dbd8a0418261fccdba + tinyspy: "npm:^3.0.2" + checksum: 10c0/61f7eb4fb8f23094c8d2d74ab6bf896c8b2d4a3f7f630246b8f7045ddee049736a21d7372acce7fbb653bca9e0570de0f6141b4e45d60e1c60e44a273c12c28c languageName: node linkType: hard -"@vitest/utils@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/utils@npm:2.1.3" +"@vitest/utils@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "@vitest/utils@npm:3.0.0-beta.4" dependencies: - "@vitest/pretty-format": "npm:2.1.3" - loupe: "npm:^3.1.1" + "@vitest/pretty-format": "npm:3.0.0-beta.4" + loupe: "npm:^3.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/55a044e43b84c0f8f573d8578107f26440678b6f506c8d9fee88b7ef120d19efd27c9be77985c107113b0f3f3db298dcee57074e1c1c214bee7a097fd08a209b + checksum: 10c0/bf4ce0cfa48e0633ebedbc70eaf07f5f325297e07f57cf3030ce299db50bbfc513cb4d41d031fc86944320486e090bbcf126fbd08fccc9906966397310a4de03 languageName: node linkType: hard @@ -3691,16 +3865,16 @@ __metadata: languageName: node linkType: hard -"chai@npm:^5.1.1": - version: 5.1.1 - resolution: "chai@npm:5.1.1" +"chai@npm:^5.1.2": + version: 5.1.2 + resolution: "chai@npm:5.1.2" dependencies: assertion-error: "npm:^2.0.1" check-error: "npm:^2.1.1" deep-eql: "npm:^5.0.1" loupe: "npm:^3.1.0" pathval: "npm:^2.0.0" - checksum: 10c0/e7f00e5881e3d5224f08fe63966ed6566bd9fdde175863c7c16dd5240416de9b34c4a0dd925f4fd64ad56256ca6507d32cf6131c49e1db65c62578eb31d4566c + checksum: 10c0/6c04ff8495b6e535df9c1b062b6b094828454e9a3c9493393e55b2f4dbff7aa2a29a4645133cad160fb00a16196c4dc03dc9bb37e1f4ba9df3b5f50d7533a736 languageName: node linkType: hard @@ -4373,7 +4547,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:~4.3.4": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:~4.3.4": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -4406,6 +4580,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.4.0": + version: 4.4.0 + resolution: "debug@npm:4.4.0" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de + languageName: node + linkType: hard + "decode-named-character-reference@npm:^1.0.0": version: 1.0.2 resolution: "decode-named-character-reference@npm:1.0.2" @@ -5089,6 +5275,13 @@ __metadata: languageName: node linkType: hard +"es-module-lexer@npm:^1.5.4": + version: 1.6.0 + resolution: "es-module-lexer@npm:1.6.0" + checksum: 10c0/667309454411c0b95c476025929881e71400d74a746ffa1ff4cb450bd87f8e33e8eef7854d68e401895039ac0bac64e7809acbebb6253e055dd49ea9e3ea9212 + languageName: node + linkType: hard + "es-object-atoms@npm:^1.0.0": version: 1.0.0 resolution: "es-object-atoms@npm:1.0.0" @@ -5820,6 +6013,13 @@ __metadata: languageName: node linkType: hard +"expect-type@npm:^1.1.0": + version: 1.1.0 + resolution: "expect-type@npm:1.1.0" + checksum: 10c0/5af0febbe8fe18da05a6d51e3677adafd75213512285408156b368ca471252565d5ca6e59e4bddab25121f3cfcbbebc6a5489f8cc9db131cc29e69dcdcc7ae15 + languageName: node + linkType: hard + "expect@npm:^29.0.0": version: 29.7.0 resolution: "expect@npm:29.7.0" @@ -8569,7 +8769,7 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^3.1.0, loupe@npm:^3.1.1": +"loupe@npm:^3.1.0": version: 3.1.1 resolution: "loupe@npm:3.1.1" dependencies: @@ -8578,6 +8778,13 @@ __metadata: languageName: node linkType: hard +"loupe@npm:^3.1.2": + version: 3.1.2 + resolution: "loupe@npm:3.1.2" + checksum: 10c0/b13c02e3ddd6a9d5f8bf84133b3242de556512d824dddeea71cce2dbd6579c8f4d672381c4e742d45cf4423d0701765b4a6e5fbc24701def16bc2b40f8daa96a + languageName: node + linkType: hard + "lowdb@npm:1.0.0": version: 1.0.0 resolution: "lowdb@npm:1.0.0" @@ -8630,7 +8837,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.10, magic-string@npm:^0.30.11": +"magic-string@npm:^0.30.10": version: 0.30.12 resolution: "magic-string@npm:0.30.12" dependencies: @@ -8639,14 +8846,23 @@ __metadata: languageName: node linkType: hard -"magicast@npm:^0.3.4": - version: 0.3.4 - resolution: "magicast@npm:0.3.4" +"magic-string@npm:^0.30.17": + version: 0.30.17 + resolution: "magic-string@npm:0.30.17" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.5.0" + checksum: 10c0/16826e415d04b88378f200fe022b53e638e3838b9e496edda6c0e086d7753a44a6ed187adc72d19f3623810589bf139af1a315541cd6a26ae0771a0193eaf7b8 + languageName: node + linkType: hard + +"magicast@npm:^0.3.5": + version: 0.3.5 + resolution: "magicast@npm:0.3.5" dependencies: - "@babel/parser": "npm:^7.24.4" - "@babel/types": "npm:^7.24.0" + "@babel/parser": "npm:^7.25.4" + "@babel/types": "npm:^7.25.4" source-map-js: "npm:^1.2.0" - checksum: 10c0/7ebaaac397b13c31ca05e6d9649296751d76749b945d10a0800107872119fbdf267acdb604571d25e38ec6fd7ab3568a951b6e76eaef1caba9eaa11778fd9783 + checksum: 10c0/a6cacc0a848af84f03e3f5bda7b0de75e4d0aa9ddce5517fd23ed0f31b5ddd51b2d0ff0b7e09b51f7de0f4053c7a1107117edda6b0732dca3e9e39e6c5a68c64 languageName: node linkType: hard @@ -10503,10 +10719,10 @@ __metadata: languageName: node linkType: hard -"pathe@npm:^1.1.2": - version: 1.1.2 - resolution: "pathe@npm:1.1.2" - checksum: 10c0/64ee0a4e587fb0f208d9777a6c56e4f9050039268faaaaecd50e959ef01bf847b7872785c36483fa5cdcdbdfdb31fef2ff222684d4fc21c330ab60395c681897 +"pathe@npm:^2.0.0": + version: 2.0.1 + resolution: "pathe@npm:2.0.1" + checksum: 10c0/902139a0beddcdc4396f59bf94315a2a228f01666348cd0b4274d9d0aab31325c390a883a6707b9149a9ec39a7a6fe4846e7d11de83be9c596a33daa850a37ef languageName: node linkType: hard @@ -10549,6 +10765,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.1.1": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -10812,14 +11035,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.35": - version: 8.4.35 - resolution: "postcss@npm:8.4.35" +"postcss@npm:^8.4.49": + version: 8.4.49 + resolution: "postcss@npm:8.4.49" dependencies: nanoid: "npm:^3.3.7" - picocolors: "npm:^1.0.0" - source-map-js: "npm:^1.0.2" - checksum: 10c0/e8dd04e48001eb5857abc9475365bf08f4e508ddf9bc0b8525449a95d190f10d025acebc5b56ac2e94b3c7146790e4ae78989bb9633cb7ee20d1cc9b7dc909b2 + picocolors: "npm:^1.1.1" + source-map-js: "npm:^1.2.1" + checksum: 10c0/f1b3f17aaf36d136f59ec373459f18129908235e65dbdc3aee5eef8eba0756106f52de5ec4682e29a2eab53eb25170e7e871b3e4b52a8f1de3d344a514306be3 languageName: node linkType: hard @@ -12143,7 +12366,7 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.2.0, rollup@npm:^4.21.0": +"rollup@npm:^4.21.0": version: 4.21.0 resolution: "rollup@npm:4.21.0" dependencies: @@ -12206,6 +12429,78 @@ __metadata: languageName: node linkType: hard +"rollup@npm:^4.23.0": + version: 4.30.1 + resolution: "rollup@npm:4.30.1" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.30.1" + "@rollup/rollup-android-arm64": "npm:4.30.1" + "@rollup/rollup-darwin-arm64": "npm:4.30.1" + "@rollup/rollup-darwin-x64": "npm:4.30.1" + "@rollup/rollup-freebsd-arm64": "npm:4.30.1" + "@rollup/rollup-freebsd-x64": "npm:4.30.1" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.30.1" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.30.1" + "@rollup/rollup-linux-arm64-gnu": "npm:4.30.1" + "@rollup/rollup-linux-arm64-musl": "npm:4.30.1" + "@rollup/rollup-linux-loongarch64-gnu": "npm:4.30.1" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.30.1" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.30.1" + "@rollup/rollup-linux-s390x-gnu": "npm:4.30.1" + "@rollup/rollup-linux-x64-gnu": "npm:4.30.1" + "@rollup/rollup-linux-x64-musl": "npm:4.30.1" + "@rollup/rollup-win32-arm64-msvc": "npm:4.30.1" + "@rollup/rollup-win32-ia32-msvc": "npm:4.30.1" + "@rollup/rollup-win32-x64-msvc": "npm:4.30.1" + "@types/estree": "npm:1.0.6" + fsevents: "npm:~2.3.2" + dependenciesMeta: + "@rollup/rollup-android-arm-eabi": + optional: true + "@rollup/rollup-android-arm64": + optional: true + "@rollup/rollup-darwin-arm64": + optional: true + "@rollup/rollup-darwin-x64": + optional: true + "@rollup/rollup-freebsd-arm64": + optional: true + "@rollup/rollup-freebsd-x64": + optional: true + "@rollup/rollup-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm-musleabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + optional: true + "@rollup/rollup-linux-loongarch64-gnu": + optional: true + "@rollup/rollup-linux-powerpc64le-gnu": + optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true + "@rollup/rollup-linux-s390x-gnu": + optional: true + "@rollup/rollup-linux-x64-gnu": + optional: true + "@rollup/rollup-linux-x64-musl": + optional: true + "@rollup/rollup-win32-arm64-msvc": + optional: true + "@rollup/rollup-win32-ia32-msvc": + optional: true + "@rollup/rollup-win32-x64-msvc": + optional: true + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: 10c0/a318c57e2ca9741e1503bcd75483949c6e83edd72234a468010a3098a34248f523e44f7ad4fde90dc5c2da56abc1b78ac42a9329e1dbd708682728adbd8df7cc + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -12691,13 +12986,20 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.0": +"source-map-js@npm:^1.2.0": version: 1.2.0 resolution: "source-map-js@npm:1.2.0" checksum: 10c0/7e5f896ac10a3a50fe2898e5009c58ff0dc102dcb056ed27a354623a0ece8954d4b2649e1a1b2b52ef2e161d26f8859c7710350930751640e71e374fe2d321a4 languageName: node linkType: hard +"source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf + languageName: node + linkType: hard + "source-map@npm:0.8.0-beta.0": version: 0.8.0-beta.0 resolution: "source-map@npm:0.8.0-beta.0" @@ -12838,10 +13140,10 @@ __metadata: languageName: node linkType: hard -"std-env@npm:^3.7.0": - version: 3.7.0 - resolution: "std-env@npm:3.7.0" - checksum: 10c0/60edf2d130a4feb7002974af3d5a5f3343558d1ccf8d9b9934d225c638606884db4a20d2fe6440a09605bca282af6b042ae8070a10490c0800d69e82e478f41e +"std-env@npm:^3.8.0": + version: 3.8.0 + resolution: "std-env@npm:3.8.0" + checksum: 10c0/f560a2902fd0fa3d648d7d0acecbd19d664006f7372c1fba197ed4c216b4c9e48db6e2769b5fe1616d42a9333c9f066c5011935035e85c59f45dc4f796272040 languageName: node linkType: hard @@ -13363,10 +13665,17 @@ __metadata: languageName: node linkType: hard -"tinypool@npm:^1.0.0": - version: 1.0.0 - resolution: "tinypool@npm:1.0.0" - checksum: 10c0/71b20b9c54366393831c286a0772380c20f8cad9546d724c484edb47aea3228f274c58e98cf51d28c40869b39f5273209ef3ea94a9d2a23f8b292f4731cd3e4e +"tinyexec@npm:^0.3.2": + version: 0.3.2 + resolution: "tinyexec@npm:0.3.2" + checksum: 10c0/3efbf791a911be0bf0821eab37a3445c2ba07acc1522b1fa84ae1e55f10425076f1290f680286345ed919549ad67527d07281f1c19d584df3b74326909eb1f90 + languageName: node + linkType: hard + +"tinypool@npm:^1.0.2": + version: 1.0.2 + resolution: "tinypool@npm:1.0.2" + checksum: 10c0/31ac184c0ff1cf9a074741254fe9ea6de95026749eb2b8ec6fd2b9d8ca94abdccda731f8e102e7f32e72ed3b36d32c6975fd5f5523df3f1b6de6c3d8dfd95e63 languageName: node linkType: hard @@ -13377,10 +13686,10 @@ __metadata: languageName: node linkType: hard -"tinyspy@npm:^3.0.0": - version: 3.0.0 - resolution: "tinyspy@npm:3.0.0" - checksum: 10c0/eb0dec264aa5370efd3d29743825eb115ed7f1ef8a72a431e9a75d5c9e7d67e99d04b0d61d86b8cd70c79ec27863f241ad0317bc453f78762e0cbd76d2c332d0 +"tinyspy@npm:^3.0.2": + version: 3.0.2 + resolution: "tinyspy@npm:3.0.2" + checksum: 10c0/55ffad24e346622b59292e097c2ee30a63919d5acb7ceca87fc0d1c223090089890587b426e20054733f97a58f20af2c349fb7cc193697203868ab7ba00bcea0 languageName: node linkType: hard @@ -14462,88 +14771,102 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:2.1.3": - version: 2.1.3 - resolution: "vite-node@npm:2.1.3" +"vite-node@npm:3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "vite-node@npm:3.0.0-beta.4" dependencies: cac: "npm:^6.7.14" - debug: "npm:^4.3.6" - pathe: "npm:^1.1.2" - vite: "npm:^5.0.0" + debug: "npm:^4.4.0" + es-module-lexer: "npm:^1.5.4" + pathe: "npm:^2.0.0" + vite: "npm:^5.0.0 || ^6.0.0" bin: vite-node: vite-node.mjs - checksum: 10c0/1b06139880a8170651e025e8c35aa92a917f8ec8f24507cda5bf4be09843f6447e1f494932a8d7eb98124f1c8c9fee02283ef318ddd57e2b861d2d85a409a206 + checksum: 10c0/d65ce0cfb17a5fd8ec5e0bdd873e0bf5ba4979512c1e940db46dd058e4775cf14be4486f00fe05f800b54ffc1ffcd8e999c31f17e03daf18c227a8949ae9f0b4 languageName: node linkType: hard -"vite@npm:^5.0.0": - version: 5.1.0 - resolution: "vite@npm:5.1.0" +"vite@npm:^5.0.0 || ^6.0.0": + version: 6.0.7 + resolution: "vite@npm:6.0.7" dependencies: - esbuild: "npm:^0.19.3" + esbuild: "npm:^0.24.2" fsevents: "npm:~2.3.3" - postcss: "npm:^8.4.35" - rollup: "npm:^4.2.0" + postcss: "npm:^8.4.49" + rollup: "npm:^4.23.0" peerDependencies: - "@types/node": ^18.0.0 || >=20.0.0 + "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: ">=1.21.0" less: "*" lightningcss: ^1.21.0 sass: "*" + sass-embedded: "*" stylus: "*" sugarss: "*" - terser: ^5.4.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 dependenciesMeta: fsevents: optional: true peerDependenciesMeta: "@types/node": optional: true + jiti: + optional: true less: optional: true lightningcss: optional: true sass: optional: true + sass-embedded: + optional: true stylus: optional: true sugarss: optional: true terser: optional: true + tsx: + optional: true + yaml: + optional: true bin: vite: bin/vite.js - checksum: 10c0/62aa632b6f30cfca39db534b5b461b1e73dc4f4a3093088c1140a1e1b0c4c8f4eacc0e472a0d96d765ad6976b00e202da20a647865886df692240a2b06b62c6f - languageName: node - linkType: hard - -"vitest@npm:^2.1.3": - version: 2.1.3 - resolution: "vitest@npm:2.1.3" - dependencies: - "@vitest/expect": "npm:2.1.3" - "@vitest/mocker": "npm:2.1.3" - "@vitest/pretty-format": "npm:^2.1.3" - "@vitest/runner": "npm:2.1.3" - "@vitest/snapshot": "npm:2.1.3" - "@vitest/spy": "npm:2.1.3" - "@vitest/utils": "npm:2.1.3" - chai: "npm:^5.1.1" - debug: "npm:^4.3.6" - magic-string: "npm:^0.30.11" - pathe: "npm:^1.1.2" - std-env: "npm:^3.7.0" + checksum: 10c0/ae81047b4290a7206b9394a39a782d509e9610462e7946422ba22d5bc615b5a322c07e33d7bf9dd0b3312ec3f5c63353b725913d1519324bfdf539b4f1e03f52 + languageName: node + linkType: hard + +"vitest@npm:^3.0.0-beta.4": + version: 3.0.0-beta.4 + resolution: "vitest@npm:3.0.0-beta.4" + dependencies: + "@vitest/expect": "npm:3.0.0-beta.4" + "@vitest/mocker": "npm:3.0.0-beta.4" + "@vitest/pretty-format": "npm:^3.0.0-beta.4" + "@vitest/runner": "npm:3.0.0-beta.4" + "@vitest/snapshot": "npm:3.0.0-beta.4" + "@vitest/spy": "npm:3.0.0-beta.4" + "@vitest/utils": "npm:3.0.0-beta.4" + chai: "npm:^5.1.2" + debug: "npm:^4.4.0" + expect-type: "npm:^1.1.0" + magic-string: "npm:^0.30.17" + pathe: "npm:^2.0.0" + std-env: "npm:^3.8.0" tinybench: "npm:^2.9.0" - tinyexec: "npm:^0.3.0" - tinypool: "npm:^1.0.0" + tinyexec: "npm:^0.3.2" + tinypool: "npm:^1.0.2" tinyrainbow: "npm:^1.2.0" - vite: "npm:^5.0.0" - vite-node: "npm:2.1.3" + vite: "npm:^5.0.0 || ^6.0.0" + vite-node: "npm:3.0.0-beta.4" why-is-node-running: "npm:^2.3.0" peerDependencies: "@edge-runtime/vm": "*" - "@types/node": ^18.0.0 || >=20.0.0 - "@vitest/browser": 2.1.3 - "@vitest/ui": 2.1.3 + "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + "@vitest/browser": 3.0.0-beta.4 + "@vitest/ui": 3.0.0-beta.4 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -14561,7 +14884,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10c0/7688fdce37205e7f3b448039df216e103e3a52994af0201993e22decbb558d129a734001b991f3c3d80bf4a4ef91ca6a5665a7395d5b051249da60a0016eda36 + checksum: 10c0/c9ce997e891d83e3d10500f238154b88b68fb7dac46d423923770a29c495c5c2ed7a09054c471f6901240ce5e60a7a992e785f051f29142a3a112b0ceabcac96 languageName: node linkType: hard diff --git a/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts index fff0f008dd37..6c3f5652259e 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts @@ -6,7 +6,7 @@ const config: StorybookConfig = { addons: [ "@storybook/addon-controls", "@storybook/experimental-addon-test", - //"@storybook/addon-a11y", + "@storybook/addon-a11y", ], framework: { name: "@storybook/react-vite", @@ -15,18 +15,6 @@ const config: StorybookConfig = { core: { disableWhatsNewNotifications: true, }, - viteFinal: (config) => ({ - ...config, - optimizeDeps: { - ...config.optimizeDeps, - include: [ - ...(config.optimizeDeps?.include || []), - "react-dom/test-utils", - "@storybook/react/**", - "@storybook/experimental-addon-test/preview", - ], - }, - }), previewHead: (head = "") => `${head}