From 61996e17688036c78e47f9487ededd674b682bfa Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 10 Jan 2025 10:41:29 +0100 Subject: [PATCH] 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