From 82e0c629f25ca39d94e4437e2540b4dee0512534 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 3 Dec 2024 20:39:04 +0100 Subject: [PATCH 01/25] ugprade vitest dependencies to 2.1.6 --- code/addons/test/package.json | 6 +- code/lib/instrumenter/package.json | 2 +- code/lib/test/package.json | 4 +- code/package.json | 8 +- code/yarn.lock | 488 ++++++++------- scripts/package.json | 4 +- .../react/package.json | 5 +- .../react/yarn.lock | 589 ++++++++++-------- 8 files changed, 600 insertions(+), 506 deletions(-) diff --git a/code/addons/test/package.json b/code/addons/test/package.json index bcbf9acf0512..0e28c4846757 100644 --- a/code/addons/test/package.json +++ b/code/addons/test/package.json @@ -95,8 +95,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": "^2.1.6", + "@vitest/runner": "^2.1.6", "ansi-to-html": "^0.7.2", "boxen": "^8.0.1", "es-toolkit": "^1.22.0", @@ -113,7 +113,7 @@ "strip-ansi": "^7.1.0", "ts-dedent": "^2.2.0", "typescript": "^5.3.2", - "vitest": "^2.1.3" + "vitest": "^2.1.6" }, "peerDependencies": { "@vitest/browser": "^2.1.1", diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index 9a2469f72610..5ceea9e3e8f7 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -44,7 +44,7 @@ }, "dependencies": { "@storybook/global": "^5.0.0", - "@vitest/utils": "^2.1.1" + "@vitest/utils": "^2.1.6" }, "devDependencies": { "typescript": "^5.3.2" diff --git a/code/lib/test/package.json b/code/lib/test/package.json index 045e54b02cff..8543c6965633 100644 --- a/code/lib/test/package.json +++ b/code/lib/test/package.json @@ -49,8 +49,8 @@ "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.5.0", "@testing-library/user-event": "14.5.2", - "@vitest/expect": "2.0.5", - "@vitest/spy": "2.0.5" + "@vitest/expect": "2.1.6", + "@vitest/spy": "2.1.6" }, "devDependencies": { "chai": "^5.1.1", diff --git a/code/package.json b/code/package.json index b7eb230b10d9..cd7193b61aa6 100644 --- a/code/package.json +++ b/code/package.json @@ -178,9 +178,9 @@ "@typescript-eslint/parser": "^6.18.1", "@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": "^2.1.6", + "@vitest/coverage-istanbul": "^2.1.6", + "@vitest/coverage-v8": "^2.1.6", "create-storybook": "workspace:*", "cross-env": "^7.0.3", "danger": "^12.3.3", @@ -221,7 +221,7 @@ "util": "^0.12.4", "vite": "^4.0.0", "vite-plugin-inspect": "^0.8.5", - "vitest": "^2.1.3", + "vitest": "^2.1.6", "wait-on": "^7.0.1" }, "dependenciesMeta": { diff --git a/code/yarn.lock b/code/yarn.lock index 1bada105b2f1..63ac4045dd4c 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -927,7 +927,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2": +"@babel/parser@npm:^7.25.4, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2": version: 7.26.2 resolution: "@babel/parser@npm:7.26.2" dependencies: @@ -2477,7 +2477,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0": +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0": version: 7.26.0 resolution: "@babel/types@npm:7.26.0" dependencies: @@ -2511,12 +2511,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 @@ -3961,50 +3961,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.0.2 + resolution: "@inquirer/confirm@npm:5.0.2" dependencies: - "@inquirer/core": "npm:^9.0.8" - "@inquirer/type": "npm:^1.5.1" - checksum: 10c0/5cf4c15c194932a6c97c7efa89266e585be70d209993eafdcf0b91a6f1219fe232c7485706b314af3befb0d579051218d9c7f82df6970d9d59b95879dd1abdfd + "@inquirer/core": "npm:^10.1.0" + "@inquirer/type": "npm:^3.0.1" + peerDependencies: + "@types/node": ">=18" + checksum: 10c0/c121cfb0557b42dd6570b54dce707a048d85f328481d5230d21fede195902012ede06887aa478875cc83afa064c2e30953eb2cab0744f832195867b418865115 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.0": + version: 10.1.0 + resolution: "@inquirer/core@npm:10.1.0" 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.8" + "@inquirer/type": "npm:^3.0.1" 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/ffd187edb210426c3e25ed564f7aa8844468c28dd2ba3c53dbe28d3359b519cdfae987b31bf927c1dd2e9f70a914fdefe319abe4c5f384e5e08410d11e0a7ce2 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.8": + version: 1.0.8 + resolution: "@inquirer/figures@npm:1.0.8" + checksum: 10c0/34d287ff1fd16476c58bbd5b169db315f8319b5ffb09f81a1bb9aabd4165114e7406b1f418d021fd9cd48923008446e3eec274bb818f378ea132a0450bbc91d4 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.1": + version: 3.0.1 + resolution: "@inquirer/type@npm:3.0.1" + peerDependencies: + "@types/node": ">=18" + checksum: 10c0/c8612362d382114a318dbb523de7b1f54dc6bc6d3016c6eaf299b6a32486b92b0dfb1b4cfc6fe9d99496d15fbb721873a1bd66819f796c8bb09853a3b808812d languageName: node linkType: hard @@ -4250,9 +4248,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.3 + resolution: "@mswjs/interceptors@npm:0.37.3" dependencies: "@open-draft/deferred-promise": "npm:^2.2.0" "@open-draft/logger": "npm:^0.3.0" @@ -4260,7 +4258,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/5a8d9ab7c491d14dff996f23bda0fa7b7059f68a1d4981b804b6114f1c0c0490bc35860df135ed36da1720984323878b1a9d13dbc80936bbfa67b3d3c3476f6c languageName: node linkType: hard @@ -6615,8 +6613,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:^2.1.6" + "@vitest/runner": "npm:^2.1.6" ansi-to-html: "npm:^0.7.2" boxen: "npm:^8.0.1" es-toolkit: "npm:^1.22.0" @@ -6635,7 +6633,7 @@ __metadata: strip-ansi: "npm:^7.1.0" ts-dedent: "npm:^2.2.0" typescript: "npm:^5.3.2" - vitest: "npm:^2.1.3" + vitest: "npm:^2.1.6" peerDependencies: "@vitest/browser": ^2.1.1 "@vitest/runner": ^2.1.1 @@ -6757,7 +6755,7 @@ __metadata: resolution: "@storybook/instrumenter@workspace:lib/instrumenter" dependencies: "@storybook/global": "npm:^5.0.0" - "@vitest/utils": "npm:^2.1.1" + "@vitest/utils": "npm:^2.1.6" typescript: "npm:^5.3.2" peerDependencies: storybook: "workspace:^" @@ -7308,9 +7306,9 @@ __metadata: "@typescript-eslint/parser": "npm:^6.18.1" "@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:^2.1.6" + "@vitest/coverage-istanbul": "npm:^2.1.6" + "@vitest/coverage-v8": "npm:^2.1.6" create-storybook: "workspace:*" cross-env: "npm:^7.0.3" danger: "npm:^12.3.3" @@ -7351,7 +7349,7 @@ __metadata: util: "npm:^0.12.4" vite: "npm:^4.0.0" vite-plugin-inspect: "npm:^0.8.5" - vitest: "npm:^2.1.3" + vitest: "npm:^2.1.6" wait-on: "npm:^7.0.1" dependenciesMeta: ejs: @@ -7536,8 +7534,8 @@ __metadata: "@testing-library/dom": "npm:10.4.0" "@testing-library/jest-dom": "npm:6.5.0" "@testing-library/user-event": "npm:14.5.2" - "@vitest/expect": "npm:2.0.5" - "@vitest/spy": "npm:2.0.5" + "@vitest/expect": "npm:2.1.6" + "@vitest/spy": "npm:2.1.6" chai: "npm:^5.1.1" tinyspy: "npm:^3.0.0" ts-dedent: "npm:^2.2.0" @@ -8506,15 +8504,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" @@ -8878,13 +8867,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" @@ -9178,22 +9160,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:^2.1.6": + version: 2.1.8 + resolution: "@vitest/browser@npm:2.1.8" 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:2.1.8" + "@vitest/utils": "npm:2.1.8" + magic-string: "npm:^0.30.12" + msw: "npm:^2.6.4" + sirv: "npm:^3.0.0" tinyrainbow: "npm:^1.2.0" ws: "npm:^8.18.0" peerDependencies: playwright: "*" - vitest: 2.1.3 + vitest: 2.1.8 webdriverio: "*" peerDependenciesMeta: playwright: @@ -9202,189 +9184,175 @@ __metadata: optional: true webdriverio: optional: true - checksum: 10c0/428a8d62ffcc2d637363fc7eb986d6beaeda7681b032d785f2bc475f8d105a14c674610e22a0a0c74e4ee10774b3709b11bc359e0458c6867c3d4acdc3f190a6 + checksum: 10c0/00e89e43064654d42dab85ccae5743e350ae91d441563fe3678c6569362cb7527756dddff154ef33120841cc553caef16a82a7df4ca4569563c52dedacc719e9 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:^2.1.6": + version: 2.1.8 + resolution: "@vitest/coverage-istanbul@npm:2.1.8" dependencies: "@istanbuljs/schema": "npm:^0.1.3" - debug: "npm:^4.3.6" + debug: "npm:^4.3.7" 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: 2.1.8 + checksum: 10c0/809eeccebaa7fd0e349d89a8d374e449c65a1d626f46b03b080aa507ac93dfb340c90dd491fe9a08dca896d6832e0f3dcffd6fd7ba3d05c1dc95c7a32aabc50c 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:^2.1.6": + version: 2.1.8 + resolution: "@vitest/coverage-v8@npm:2.1.8" dependencies: "@ampproject/remapping": "npm:^2.3.0" "@bcoe/v8-coverage": "npm:^0.2.3" - debug: "npm:^4.3.6" + debug: "npm:^4.3.7" 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.12" + 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": 2.1.8 + vitest: 2.1.8 peerDependenciesMeta: "@vitest/browser": optional: true - checksum: 10c0/5fdff9e9dd8b8d2030c00a5273ba2b27441c0cb45d007b6671504745dac6d095c160a01433789e7ed1ca6cd234246f883c1d52c02cfb62f8ae81dda17dd56bc6 + checksum: 10c0/b228a23bbaf0eae07ac939399f968b0def2df786091948a12d614919db3f5b6e46db7a1ab4f9d05d5d7f696afd53133a67abc25915f85480cd032442664ac725 languageName: node linkType: hard -"@vitest/expect@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/expect@npm:2.0.5" - dependencies: - "@vitest/spy": "npm:2.0.5" - "@vitest/utils": "npm:2.0.5" - chai: "npm:^5.1.1" - tinyrainbow: "npm:^1.2.0" - checksum: 10c0/08cb1b0f106d16a5b60db733e3d436fa5eefc68571488eb570dfe4f599f214ab52e4342273b03dbe12331cc6c0cdc325ac6c94f651ad254cd62f3aa0e3d185aa - languageName: node - linkType: hard - -"@vitest/expect@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/expect@npm:2.1.3" +"@vitest/expect@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/expect@npm:2.1.6" dependencies: - "@vitest/spy": "npm:2.1.3" - "@vitest/utils": "npm:2.1.3" - chai: "npm:^5.1.1" + "@vitest/spy": "npm:2.1.6" + "@vitest/utils": "npm:2.1.6" + chai: "npm:^5.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/0837adcbb938feebcc083664afc5c4d12e42f1f2442b6f1bedc6b5650a8ff2448b1f10713b45afb099c839fb5cf766c971736267fa9b0fe2ac87f3e2d7f782c2 + checksum: 10c0/86327692f03b2ec6895486b118f25e1a141749c31ba671d253da4e33cf81db81f40755198ac9b46616155a8b74765d0ab15b8080041dbe139c83a9a0690004a2 languageName: node linkType: hard -"@vitest/expect@patch:@vitest/expect@npm%3A2.0.5#~/.yarn/patches/@vitest-expect-npm-2.0.5-8933466cce.patch": - version: 2.0.5 - resolution: "@vitest/expect@patch:@vitest/expect@npm%3A2.0.5#~/.yarn/patches/@vitest-expect-npm-2.0.5-8933466cce.patch::version=2.0.5&hash=368591" +"@vitest/expect@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/expect@npm:2.1.8" dependencies: - "@vitest/spy": "npm:2.0.5" - "@vitest/utils": "npm:2.0.5" - chai: "npm:^5.1.1" + "@vitest/spy": "npm:2.1.8" + "@vitest/utils": "npm:2.1.8" + chai: "npm:^5.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/0834adbe2c7094277adf3a45aa20fece84ca3b381fb3fe118fa424d2d490f20d0365c57dcaf845b413e583e36118f2815afa34bd175e305d6169c947e29576c3 + checksum: 10c0/6fbf4abc2360efe4d3671d3425f8bb6012fe2dd932a88720d8b793030b766ba260494822c721d3fc497afe52373515c7e150635a95c25f6e1b567f86155c5408 languageName: node linkType: hard -"@vitest/mocker@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/mocker@npm:2.1.3" +"@vitest/mocker@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/mocker@npm:2.1.8" dependencies: - "@vitest/spy": "npm:2.1.3" + "@vitest/spy": "npm:2.1.8" estree-walker: "npm:^3.0.3" - magic-string: "npm:^0.30.11" + magic-string: "npm:^0.30.12" peerDependencies: - "@vitest/spy": 2.1.3 - msw: ^2.3.5 + msw: ^2.4.9 vite: ^5.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - checksum: 10c0/03c80628d092244f21a0ba9041665fc75f987d0d11fab1ae0b7027ec21e503f65057e8c24b936602c5f852d83fbb183da13d05dba117c99785b41b3dafd105ce + checksum: 10c0/b4113ed8a57c0f60101d02e1b1769357a346ecd55ded499eab384d52106fd4b12d51e9aaa6db98f47de0d56662477be0ed8d46d6dfa84c235f9e1b234709814e languageName: node linkType: hard -"@vitest/pretty-format@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/pretty-format@npm:2.0.5" +"@vitest/pretty-format@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/pretty-format@npm:2.1.6" dependencies: tinyrainbow: "npm:^1.2.0" - checksum: 10c0/236c0798c5170a0b5ad5d4bd06118533738e820b4dd30079d8fbcb15baee949d41c60f42a9f769906c4a5ce366d7ef11279546070646c0efc03128c220c31f37 + checksum: 10c0/5c82496e5816c0c388bbe18a88ed01b39f5492aaa8e0df90868a65a50ee135105da367e58b4a0bed0dc67201c0518c451a32a5d9b81f56665b76b1c75c550686 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:2.1.8, @vitest/pretty-format@npm:^2.1.8": + version: 2.1.8 + resolution: "@vitest/pretty-format@npm:2.1.8" dependencies: tinyrainbow: "npm:^1.2.0" - checksum: 10c0/5a6ee872a8adf5e2764f2b5b2276d8a2199be4ef14777ab693428caf359481851400af10b59721d4972289c955ffe7277954a662b04cfb10233824574c7074ba + checksum: 10c0/1dc5c9b1c7c7e78e46a2a16033b6b20be05958bbebc5a5b78f29e32718c80252034804fccd23f34db6b3583239db47e68fc5a8e41942c54b8047cc3b4133a052 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/runner@npm:2.1.8, @vitest/runner@npm:^2.1.6": + version: 2.1.8 + resolution: "@vitest/runner@npm:2.1.8" dependencies: - "@vitest/utils": "npm:2.1.3" + "@vitest/utils": "npm:2.1.8" pathe: "npm:^1.1.2" - checksum: 10c0/d5b077643265d10025e22fa64a0e54c3d4fddc23e05f9fcd143dbcc4080851b0df31985986e57890a974577a18d3af624758b6062801d7dd96f9b4f2eaf591f1 + checksum: 10c0/d0826a71494adeafc8c6478257f584d11655145c83e2d8f94c17301d7059c7463ad768a69379e394c50838a7435abcc9255a6b7d8894f5ee06b153e314683a75 languageName: node linkType: hard -"@vitest/snapshot@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/snapshot@npm:2.1.3" +"@vitest/snapshot@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/snapshot@npm:2.1.8" dependencies: - "@vitest/pretty-format": "npm:2.1.3" - magic-string: "npm:^0.30.11" + "@vitest/pretty-format": "npm:2.1.8" + magic-string: "npm:^0.30.12" pathe: "npm:^1.1.2" - checksum: 10c0/a3dcea6a5f7581b6a34dc3bf5f7bd42a05e2ccf6e1171d9f1b759688aebe650e6412564d066aeaa45e83ac549d453b6a3edcf774a8ac728c0c639f8dc919039f + checksum: 10c0/8d7a77a52e128630ea737ee0a0fe746d1d325cac5848326861dbf042844da4d5c1a5145539ae0ed1a3f0b0363506e98d86f2679fadf114ec4b987f1eb616867b languageName: node linkType: hard -"@vitest/spy@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/spy@npm:2.0.5" +"@vitest/spy@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/spy@npm:2.1.6" dependencies: - tinyspy: "npm:^3.0.0" - checksum: 10c0/70634c21921eb271b54d2986c21d7ab6896a31c0f4f1d266940c9bafb8ac36237846d6736638cbf18b958bd98e5261b158a6944352742accfde50b7818ff655e + tinyspy: "npm:^3.0.2" + checksum: 10c0/4d3e965f9096968125dd4f53a66a8afd7a105852a41bd36865288bef5b6a79f3ec6f2056cc1c7be5a0afb2cd86b3b83e354451f452bf049ddd4516005a748f6f languageName: node linkType: hard -"@vitest/spy@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/spy@npm:2.1.3" +"@vitest/spy@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/spy@npm:2.1.8" dependencies: - tinyspy: "npm:^3.0.0" - checksum: 10c0/8d85a5c2848c5bd81892af989aebad65d0c7ae74094aa98ad4f35ecf80755259c7a748a8e7bf683b2906fac29a51fc0ffa82f8fc073b36dbd8a0418261fccdba + tinyspy: "npm:^3.0.2" + checksum: 10c0/9740f10772ede004ea7f9ffb8a6c3011341d75d9d7f2d4d181b123a701c4691e942f38cf1700684a3bb5eea3c78addf753fd8cdf78c51d8eadc3bada6fadf8f2 languageName: node linkType: hard -"@vitest/utils@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/utils@npm:2.0.5" +"@vitest/utils@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/utils@npm:2.1.6" dependencies: - "@vitest/pretty-format": "npm:2.0.5" - estree-walker: "npm:^3.0.3" - loupe: "npm:^3.1.1" + "@vitest/pretty-format": "npm:2.1.6" + loupe: "npm:^3.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/0d1de748298f07a50281e1ba058b05dcd58da3280c14e6f016265e950bd79adab6b97822de8f0ea82d3070f585654801a9b1bcf26db4372e51cf7746bf86d73b + checksum: 10c0/1ec077b9707ec627075348f1a98687c7bb2fcbf9edf6e73dea6842c328d0d51a33663d22679e2a90a75f45afca9246f8fa3ea452447f474ae9d5f4eca4023b91 languageName: node linkType: hard -"@vitest/utils@npm:2.1.3, @vitest/utils@npm:^2.1.1": - version: 2.1.3 - resolution: "@vitest/utils@npm:2.1.3" +"@vitest/utils@npm:2.1.8, @vitest/utils@npm:^2.1.6": + version: 2.1.8 + resolution: "@vitest/utils@npm:2.1.8" dependencies: - "@vitest/pretty-format": "npm:2.1.3" - loupe: "npm:^3.1.1" + "@vitest/pretty-format": "npm:2.1.8" + loupe: "npm:^3.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/55a044e43b84c0f8f573d8578107f26440678b6f506c8d9fee88b7ef120d19efd27c9be77985c107113b0f3f3db298dcee57074e1c1c214bee7a097fd08a209b + checksum: 10c0/d4a29ecd8f6c24c790e4c009f313a044d89e664e331bc9c3cfb57fe1380fb1d2999706dbbfc291f067d6c489602e76d00435309fbc906197c0d01f831ca17d64 languageName: node linkType: hard @@ -11984,6 +11952,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.2.0, chalk@npm:^5.3.0": version: 5.3.0 resolution: "chalk@npm:5.3.0" @@ -12267,7 +12248,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 @@ -12757,10 +12738,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 @@ -13306,7 +13287,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.3.6, debug@npm:^4.3.7": +"debug@npm:^4.3.7": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -14510,6 +14491,13 @@ __metadata: languageName: node linkType: hard +"es-module-lexer@npm:^1.5.4": + version: 1.5.4 + resolution: "es-module-lexer@npm:1.5.4" + checksum: 10c0/300a469488c2f22081df1e4c8398c78db92358496e639b0df7f89ac6455462aaf5d8893939087c1a1cbcbf20eed4610c70e0bcb8f3e4b0d80a5d2611c539408c + languageName: node + linkType: hard + "es-object-atoms@npm:^1.0.0": version: 1.0.0 resolution: "es-object-atoms@npm:1.0.0" @@ -15513,6 +15501,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" @@ -19844,7 +19839,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: @@ -19853,6 +19848,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" @@ -19972,14 +19974,14 @@ __metadata: languageName: node linkType: hard -"magicast@npm:^0.3.4": - version: 0.3.4 - resolution: "magicast@npm:0.3.4" +"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 @@ -21610,15 +21612,16 @@ __metadata: languageName: node linkType: hard -"msw@npm:^2.3.5": - version: 2.4.8 - resolution: "msw@npm:2.4.8" +"msw@npm:^2.6.4": + version: 2.6.6 + resolution: "msw@npm:2.6.6" 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" @@ -21626,10 +21629,10 @@ __metadata: 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" 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" @@ -21638,7 +21641,7 @@ __metadata: optional: true bin: msw: cli/index.js - checksum: 10c0/33a8c5697f7cb003a2af33ff6b259eaf7babf180fadf0697d107d0856ab0d2ff1a80d319e788d9127f289ff091334bee589f348180a1fdd0914bf8c4725830dc + checksum: 10c0/d7f0e0ea6512cfddda5b7695a0c6c6a0ed43b36b62f25925beee8e12daec12a5ef369d00e0976f9dd76d3af779741fda11a3eae812da11a044b03992e697010c languageName: node linkType: hard @@ -21668,13 +21671,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" @@ -22581,7 +22591,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 @@ -26422,6 +26432,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" @@ -26848,10 +26869,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 @@ -27692,17 +27713,17 @@ __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.1 + resolution: "tinyexec@npm:0.3.1" + checksum: 10c0/11e7a7c5d8b3bddf8b5cbe82a9290d70a6fad84d528421d5d18297f165723cb53d2e737d8f58dcce5ca56f2e4aa2d060f02510b1f8971784f97eb3e9aec28f09 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.1": + version: 1.0.2 + resolution: "tinypool@npm:1.0.2" + checksum: 10c0/31ac184c0ff1cf9a074741254fe9ea6de95026749eb2b8ec6fd2b9d8ca94abdccda731f8e102e7f32e72ed3b36d32c6975fd5f5523df3f1b6de6c3d8dfd95e63 languageName: node linkType: hard @@ -27727,6 +27748,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" @@ -29104,17 +29132,18 @@ __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:2.1.8": + version: 2.1.8 + resolution: "vite-node@npm:2.1.8" dependencies: cac: "npm:^6.7.14" - debug: "npm:^4.3.6" + debug: "npm:^4.3.7" + es-module-lexer: "npm:^1.5.4" pathe: "npm:^1.1.2" vite: "npm:^5.0.0" bin: vite-node: vite-node.mjs - checksum: 10c0/1b06139880a8170651e025e8c35aa92a917f8ec8f24507cda5bf4be09843f6447e1f494932a8d7eb98124f1c8c9fee02283ef318ddd57e2b861d2d85a409a206 + checksum: 10c0/cb28027a7425ba29780e216164c07d36a4ff9eb60d83afcad3bc222fd5a5f3e36030071c819edd6d910940f502d49e52f7564743617bc1c5875485b0952c72d5 languageName: node linkType: hard @@ -29254,34 +29283,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:^2.1.6": + version: 2.1.8 + resolution: "vitest@npm:2.1.8" + dependencies: + "@vitest/expect": "npm:2.1.8" + "@vitest/mocker": "npm:2.1.8" + "@vitest/pretty-format": "npm:^2.1.8" + "@vitest/runner": "npm:2.1.8" + "@vitest/snapshot": "npm:2.1.8" + "@vitest/spy": "npm:2.1.8" + "@vitest/utils": "npm:2.1.8" + chai: "npm:^5.1.2" + debug: "npm:^4.3.7" + expect-type: "npm:^1.1.0" + magic-string: "npm:^0.30.12" 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.1" tinyrainbow: "npm:^1.2.0" vite: "npm:^5.0.0" - vite-node: "npm:2.1.3" + vite-node: "npm:2.1.8" 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 + "@vitest/browser": 2.1.8 + "@vitest/ui": 2.1.8 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -29299,7 +29329,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10c0/7688fdce37205e7f3b448039df216e103e3a52994af0201993e22decbb558d129a734001b991f3c3d80bf4a4ef91ca6a5665a7395d5b051249da60a0016eda36 + checksum: 10c0/e70631bad5662d6c60c5cf836a4baf58b890db6654fef1f608fe6a86aa49a2b9f078aac74b719d4d3c87c5c781968cc73590a7935277b48f3d8b6fb9c5b4d276 languageName: node linkType: hard diff --git a/scripts/package.json b/scripts/package.json index e8903525a4f3..8d86035027c7 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -94,7 +94,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": "^2.1.6", "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": "^2.1.6", "wait-on": "^7.2.0", "window-size": "^1.1.1", "yaml": "^2.4.5", diff --git a/test-storybooks/portable-stories-kitchen-sink/react/package.json b/test-storybooks/portable-stories-kitchen-sink/react/package.json index 5af90b56b2e3..4c20025a192b 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react/package.json @@ -108,7 +108,8 @@ "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "@vitejs/plugin-react": "^4.2.1", - "@vitest/browser": "^2.1.3", + "@vitest/browser": "^2.1.6", + "@vitest/coverage-v8": "^2.1.6", "cypress": "^13.6.4", "eslint": "^8.56.0", "eslint-plugin-react-hooks": "^4.6.0", @@ -120,6 +121,6 @@ "storybook": "^8.0.0", "typescript": "^5.2.2", "vite": "^5.1.1", - "vitest": "^2.1.3" + "vitest": "^2.1.6" } } diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index 2041ffe4ec1a..ff334163229a 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -12,7 +12,7 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:^2.2.0": +"@ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.3.0": version: 2.3.0 resolution: "@ampproject/remapping@npm:2.3.0" dependencies: @@ -135,6 +135,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: 10/c28656c52bd48e8c1d9f3e8e68ecafd09d949c57755b0d353739eb4eae7ba4f7e67e92e4036f1cd43378cc1397a2c943ed7bcaf5949b04ab48607def0258b775 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-validator-identifier@npm:7.25.7" @@ -142,6 +149,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: 10/3f9b649be0c2fd457fa1957b694b4e69532a668866b8a0d81eabfa34ba16dbf3107b39e0e7144c55c3c652bf773ec816af8df4a61273a2bb4eb3145ca9cf478e + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.25.7": version: 7.25.7 resolution: "@babel/helper-validator-option@npm:7.25.7" @@ -182,6 +196,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.25.4": + version: 7.26.2 + resolution: "@babel/parser@npm:7.26.2" + dependencies: + "@babel/types": "npm:^7.26.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10/8baee43752a3678ad9f9e360ec845065eeee806f1fdc8e0f348a8a0e13eef0959dabed4a197c978896c493ea205c804d0a1187cc52e4a1ba017c7935bab4983d + languageName: node + linkType: hard + "@babel/plugin-syntax-async-generators@npm:^7.8.4": version: 7.8.4 resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" @@ -437,6 +462,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/types@npm:7.26.0" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10/40780741ecec886ed9edae234b5eb4976968cc70d72b4e5a40d55f83ff2cc457de20f9b0f4fe9d858350e43dab0ea496e7ef62e2b2f08df699481a76df02cd6e + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -444,12 +479,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: 10/c8ef02aa5d3f6c786cfa407e1c93b4af29c600eb09990973f47a7a49e4771c1bec37c8f8e567638bb9cbc41f4e38d065ff1d8eaf9bf91f0c3613a6d60bc82c8c + cookie: "npm:^0.7.2" + checksum: 10/0038a5e82c41bfcd722afedabeb6961a5f15747b3681d7f4b61e35eb1e33130039e10ee9250dc9c9e4d3915ce1aeee717c0fb92225111574f0a030411abc0987 languageName: node linkType: hard @@ -911,58 +946,48 @@ __metadata: languageName: node linkType: hard -"@inquirer/confirm@npm:^3.0.0": - version: 3.2.0 - resolution: "@inquirer/confirm@npm:3.2.0" +"@inquirer/confirm@npm:^5.0.0": + version: 5.0.2 + resolution: "@inquirer/confirm@npm:5.0.2" dependencies: - "@inquirer/core": "npm:^9.1.0" - "@inquirer/type": "npm:^1.5.3" - checksum: 10/6b032a26c64075dc14769558720b17f09bc6784a223bbf2c85ec42e491be6ce4c4b83518433c47e05d7e8836ba680ab1b2f6b9c553410d4326582308a1fd2259 + "@inquirer/core": "npm:^10.1.0" + "@inquirer/type": "npm:^3.0.1" + peerDependencies: + "@types/node": ">=18" + checksum: 10/4e775b80b689adeb0b2852ed79b368ef23a82fe3d5f580a562f4af7cdf002a19e0ec1b3b95acc6d49427a72c0fcb5b6548e0cdcafe2f0d3f3d6a923e04aabd0c languageName: node linkType: hard -"@inquirer/core@npm:^9.1.0": - version: 9.2.1 - resolution: "@inquirer/core@npm:9.2.1" +"@inquirer/core@npm:^10.1.0": + version: 10.1.0 + resolution: "@inquirer/core@npm:10.1.0" dependencies: - "@inquirer/figures": "npm:^1.0.6" - "@inquirer/type": "npm:^2.0.0" - "@types/mute-stream": "npm:^0.0.4" - "@types/node": "npm:^22.5.5" - "@types/wrap-ansi": "npm:^3.0.0" + "@inquirer/figures": "npm:^1.0.8" + "@inquirer/type": "npm:^3.0.1" ansi-escapes: "npm:^4.3.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: 10/bf35e46e70add8ffa9e9d4ae6b528ac660484afca082bca31af95ce8a145a2f8c8d0d07cc7a8627771452e68ade9849c9c9c450a004133ed10ac2d6730900452 + checksum: 10/5d097d0484c1b758f788b792d29395199bdc84af3e8cd4d9273e31de2c5202839b6edf299056956044ba7fb097c4cee7b5c0288e094a380c045082b044f9946e languageName: node linkType: hard -"@inquirer/figures@npm:^1.0.6": - version: 1.0.7 - resolution: "@inquirer/figures@npm:1.0.7" - checksum: 10/ce896860de9d822a7c2a212667bcfd0f04cf2ce86d9a2411cc9c077bb59cd61732cb5f72ac66e88d52912466eec433f005bf8a25efa658f41e1a32f3977080bd - languageName: node - linkType: hard - -"@inquirer/type@npm:^1.5.3": - version: 1.5.5 - resolution: "@inquirer/type@npm:1.5.5" - dependencies: - mute-stream: "npm:^1.0.0" - checksum: 10/bd3f3d7510785af4ad599e042e99e4be6380f52f79f3db140fe6fed0a605acf27b1a0a20fb5cc688eaf7b8aa0c36dacb1d89c7bba4586f38cbf58ba9f159e7b5 +"@inquirer/figures@npm:^1.0.8": + version: 1.0.8 + resolution: "@inquirer/figures@npm:1.0.8" + checksum: 10/0e5e4fbb15e799e818c598fcc3558ef076daf78662149711b046723fd6316381e95f7d5573d6ef0062095ad22c6ac98833033f0948df5c722932107a567fd9c3 languageName: node linkType: hard -"@inquirer/type@npm:^2.0.0": - version: 2.0.0 - resolution: "@inquirer/type@npm:2.0.0" - dependencies: - mute-stream: "npm:^1.0.0" - checksum: 10/e85f359866c28cce06272d2d51cc17788a5c9de9fda7f181c27775dd26821de0dacbc947b521cfe2009cd2965ec54696799035ef3a25a9a5794e47d8e8bdf794 +"@inquirer/type@npm:^3.0.1": + version: 3.0.1 + resolution: "@inquirer/type@npm:3.0.1" + peerDependencies: + "@types/node": ">=18" + checksum: 10/af412f1e7541d43554b02199ae71a2039a1bff5dc51ceefd87de9ece55b199682733b28810fb4b6cb3ed4a159af4cc4a26d4bb29c58dd127e7d9dbda0797d8e7 languageName: node linkType: hard @@ -1239,21 +1264,19 @@ __metadata: languageName: node linkType: hard -"@joshwooding/vite-plugin-react-docgen-typescript@npm:0.3.0": - version: 0.3.0 - resolution: "@joshwooding/vite-plugin-react-docgen-typescript@npm:0.3.0" +"@joshwooding/vite-plugin-react-docgen-typescript@npm:0.4.2": + version: 0.4.2 + resolution: "@joshwooding/vite-plugin-react-docgen-typescript@npm:0.4.2" dependencies: - glob: "npm:^7.2.0" - glob-promise: "npm:^4.2.0" magic-string: "npm:^0.27.0" react-docgen-typescript: "npm:^2.2.2" peerDependencies: typescript: ">= 4.3.x" - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/9237499394b1f5f1320c9a489dbf5db2ba4b1d68081bf767a08895b70d0d0830adb9f0f1e2c5c94202e5bee63fe031ea2b91870a6bc806ed5e370be6b06df2e8 + checksum: 10/0878171c598ee85997a2b9ea452715ea3df4c0faa3c646ffc0be62a772c3f4919986a9045864fe7cf2208b3f577bbe1e029f8ea3f3bf83f509be8d7a064f0396 languageName: node linkType: hard @@ -1289,7 +1312,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": version: 0.3.25 resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: @@ -1311,9 +1334,9 @@ __metadata: languageName: node linkType: hard -"@mswjs/interceptors@npm:^0.35.8": - version: 0.35.9 - resolution: "@mswjs/interceptors@npm:0.35.9" +"@mswjs/interceptors@npm:^0.37.0": + version: 0.37.3 + resolution: "@mswjs/interceptors@npm:0.37.3" dependencies: "@open-draft/deferred-promise": "npm:^2.2.0" "@open-draft/logger": "npm:^0.3.0" @@ -1321,7 +1344,7 @@ __metadata: is-node-process: "npm:^1.2.0" outvariant: "npm:^1.4.3" strict-event-emitter: "npm:^0.5.1" - checksum: 10/9eaf8d7876c9a38c2c9a1259873f8ad27ab41c68a49f7e14a55cd9f596458d9232adb85a5084b044d4eead3be1e7ef5bf54ed6d774d16b02d96caf1e7faa2ab3 + checksum: 10/3d3e2e073feead8702c18dc97e5201785865292b32bd882c4d80461adc3380483b33517c55d7c6c1e53723f5e2ecf50cca0412e6ecd2eb771f4eaabfa2138932 languageName: node linkType: hard @@ -1764,16 +1787,16 @@ __metadata: ts-dedent: "npm:^2.0.0" peerDependencies: storybook: "workspace:^" - vite: ^4.0.0 || ^5.0.0 + vite: ^4.0.0 || ^5.0.0 || ^6.0.0 languageName: node linkType: soft "@storybook/components@file:../../../code/deprecated/components::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.4 - resolution: "@storybook/components@file:../../../code/deprecated/components#../../../code/deprecated/components::hash=60237a&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.15 + resolution: "@storybook/components@file:../../../code/deprecated/components#../../../code/deprecated/components::hash=0be72f&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/0366ac53c8eed65b69aaa174337d27ec2283c446b328811f92ffc9de0a219860afd2e3bdc5f11c30485c43c21d246ff036bca74429ba307dc557917d14a9beba + checksum: 10/744a23254c29518601e7f3ff9e549693c6c17b5bf75fccb532826213860fb78c8b3d9dc1be0e4f6dbaa4f42b439521017f79f0d0d43ddaacddf9938174048ff6 languageName: node linkType: hard @@ -1829,8 +1852,8 @@ __metadata: linkType: hard "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.4 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=6bed1d&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.15 + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=637429&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:^0.1.11" "@storybook/global": "npm:^5.0.0" @@ -1853,7 +1876,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/9d842f824d9891bd19e508d654ce7f9f7cf8c73090588b84f29b2649e68338d13d7cd85a6d4bd92fe6beef276eb12783445bed4a4249563a5986f6f537ccc6d8 + checksum: 10/31d4f67b7bf72037481a896d86e551280692bc3f21edff1e27558657096171f128966e8eda20b19edc109c24098d107956a889e217c9d394c231d173ba3400a0 languageName: node linkType: hard @@ -1879,27 +1902,27 @@ __metadata: resolution: "@storybook/instrumenter@portal:../../../code/lib/instrumenter::locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/global": "npm:^5.0.0" - "@vitest/utils": "npm:^2.1.1" + "@vitest/utils": "npm:^2.1.6" peerDependencies: storybook: "workspace:^" languageName: node linkType: soft "@storybook/manager-api@file:../../../code/deprecated/manager-api::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.4 - resolution: "@storybook/manager-api@file:../../../code/deprecated/manager-api#../../../code/deprecated/manager-api::hash=8c9581&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.15 + resolution: "@storybook/manager-api@file:../../../code/deprecated/manager-api#../../../code/deprecated/manager-api::hash=524260&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/20f439e660e49c2bba2ce4fc73ddb9306c04cea9e6eaa0ddc23fc2047e135b7df4cc0b742dc662cee71013051b0d7e9e9e7a4f28323c1734fc6ad024ac47b9db + checksum: 10/fcef37968ca864618fda44849c4442f89ffa1349239a0107b00c830d289e44bc48602c0f5b1ea90a092939cf3bb51030649ac042f6a8210dfa18ed87efcf4b80 languageName: node linkType: hard "@storybook/preview-api@file:../../../code/deprecated/preview-api::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.4 - resolution: "@storybook/preview-api@file:../../../code/deprecated/preview-api#../../../code/deprecated/preview-api::hash=a7858a&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.15 + resolution: "@storybook/preview-api@file:../../../code/deprecated/preview-api#../../../code/deprecated/preview-api::hash=a4220e&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/29559a5fd2698758e0bcf5442421fb583da5d95344f9740dcdc3615b3bec3dfb105f134fba08423a1fd1a68fbfa2615c91408271c4ef8926d43c0b5c6f8d0bb8 + checksum: 10/7e69d44343f24a1291b9604450d85e11149dccf61755ded28268d9791e887f6a60b3ec05b76df4d9dd9be6b2b30a6d6bb7db1feea27448e0ab904162e5fbb630 languageName: node linkType: hard @@ -1917,7 +1940,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/react-vite@portal:../../../code/frameworks/react-vite::locator=portable-stories-react%40workspace%3A." dependencies: - "@joshwooding/vite-plugin-react-docgen-typescript": "npm:0.3.0" + "@joshwooding/vite-plugin-react-docgen-typescript": "npm:0.4.2" "@rollup/pluginutils": "npm:^5.0.2" "@storybook/builder-vite": "workspace:*" "@storybook/react": "workspace:*" @@ -1930,7 +1953,7 @@ __metadata: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta storybook: "workspace:^" - vite: ^4.0.0 || ^5.0.0 + vite: ^4.0.0 || ^5.0.0 || ^6.0.0 languageName: node linkType: soft @@ -1968,19 +1991,19 @@ __metadata: "@testing-library/dom": "npm:10.4.0" "@testing-library/jest-dom": "npm:6.5.0" "@testing-library/user-event": "npm:14.5.2" - "@vitest/expect": "npm:2.0.5" - "@vitest/spy": "npm:2.0.5" + "@vitest/expect": "npm:2.1.6" + "@vitest/spy": "npm:2.1.6" peerDependencies: storybook: "workspace:^" languageName: node linkType: soft "@storybook/theming@file:../../../code/deprecated/theming::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.4 - resolution: "@storybook/theming@file:../../../code/deprecated/theming#../../../code/deprecated/theming::hash=74a1c8&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.15 + resolution: "@storybook/theming@file:../../../code/deprecated/theming#../../../code/deprecated/theming::hash=6dcd01&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/387dd03f4a10a4a1f6381a9e150a3c4a96a5ce3f6aec4557a954fa3c629630e667a5e60003fed6a5ed31a7844dcd3507bcf996614e1ddb0cda8ad74b6922f3b4 + checksum: 10/070e791f22ca7bb55dffdd43e52d80aa1ae367a64375718d7634b73798536f4f1210820f1547991e7c00f821e2763edb8b30e64f22af5eaf10b4af21b3ad230e languageName: node linkType: hard @@ -2275,16 +2298,6 @@ __metadata: languageName: node linkType: hard -"@types/glob@npm:^7.1.3": - version: 7.2.0 - resolution: "@types/glob@npm:7.2.0" - dependencies: - "@types/minimatch": "npm:*" - "@types/node": "npm:*" - checksum: 10/6ae717fedfdfdad25f3d5a568323926c64f52ef35897bcac8aca8e19bc50c0bd84630bbd063e5d52078b2137d8e7d3c26eabebd1a2f03ff350fff8a91e79fc19 - languageName: node - linkType: hard - "@types/graceful-fs@npm:^4.1.3": version: 4.1.9 resolution: "@types/graceful-fs@npm:4.1.9" @@ -2351,23 +2364,7 @@ __metadata: languageName: node linkType: hard -"@types/minimatch@npm:*": - version: 5.1.2 - resolution: "@types/minimatch@npm:5.1.2" - checksum: 10/94db5060d20df2b80d77b74dd384df3115f01889b5b6c40fa2dfa27cfc03a68fb0ff7c1f2a0366070263eb2e9d6bfd8c87111d4bc3ae93c3f291297c1bf56c85 - 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: 10/af8d83ad7b68ea05d9357985daf81b6c9b73af4feacb2f5c2693c7fd3e13e5135ef1bd083ce8d5bdc8e97acd28563b61bb32dec4e4508a8067fcd31b8a098632 - languageName: node - linkType: hard - -"@types/node@npm:*, @types/node@npm:^22.5.5": +"@types/node@npm:*": version: 22.7.7 resolution: "@types/node@npm:22.7.7" dependencies: @@ -2458,13 +2455,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: 10/8aa644946ca4e859668c36b8e2bcf2ac4bdee59dac760414730ea57be8a93ae9166ebd40a088f2ab714843aaea2a2a67f0e6e6ec11cfc9c8701b2466ca1c4089 - languageName: node - linkType: hard - "@types/yargs-parser@npm:*": version: 21.0.3 resolution: "@types/yargs-parser@npm:21.0.3" @@ -2698,22 +2688,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:^2.1.6": + version: 2.1.8 + resolution: "@vitest/browser@npm:2.1.8" 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:2.1.8" + "@vitest/utils": "npm:2.1.8" + magic-string: "npm:^0.30.12" + msw: "npm:^2.6.4" + sirv: "npm:^3.0.0" tinyrainbow: "npm:^1.2.0" ws: "npm:^8.18.0" peerDependencies: playwright: "*" - vitest: 2.1.3 + vitest: 2.1.8 webdriverio: "*" peerDependenciesMeta: playwright: @@ -2722,131 +2712,155 @@ __metadata: optional: true webdriverio: optional: true - checksum: 10/e639496fa529140fb9e7dce97890c5b75fffbfb41881bee5ef25b194832d3cadcb77490d9b54777bfa968b993f6878649fe4961d6ef312ca1222b9a2fc8d4f12 + checksum: 10/6063e02222440347bbc23b2c54e259078aa83a29869337b9ffd642be5a4321ac3ddf3c0bbe4eac5237eb0bb8b9fa17d21d2c31299376de407716e3c7dd3b704c languageName: node linkType: hard -"@vitest/expect@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/expect@npm:2.0.5" +"@vitest/coverage-v8@npm:^2.1.6": + version: 2.1.8 + resolution: "@vitest/coverage-v8@npm:2.1.8" dependencies: - "@vitest/spy": "npm:2.0.5" - "@vitest/utils": "npm:2.0.5" - chai: "npm:^5.1.1" + "@ampproject/remapping": "npm:^2.3.0" + "@bcoe/v8-coverage": "npm:^0.2.3" + debug: "npm:^4.3.7" + 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.12" + magicast: "npm:^0.3.5" + std-env: "npm:^3.8.0" + test-exclude: "npm:^7.0.1" tinyrainbow: "npm:^1.2.0" - checksum: 10/ca9a218f50254b2259fd16166b2d8c9ccc8ee2cc068905e6b3d6281da10967b1590cc7d34b5fa9d429297f97e740450233745583b4cc12272ff11705faf70a37 + peerDependencies: + "@vitest/browser": 2.1.8 + vitest: 2.1.8 + peerDependenciesMeta: + "@vitest/browser": + optional: true + checksum: 10/2e1e7fe2a20c1eec738f6d84d890bed4aa5138094943dd1229962c2c42428a1a517c8a4ad4fb52637d7494f044440e061e9bc5982a83df95223db185d5a28f4d languageName: node linkType: hard -"@vitest/expect@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/expect@npm:2.1.3" +"@vitest/expect@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/expect@npm:2.1.6" dependencies: - "@vitest/spy": "npm:2.1.3" - "@vitest/utils": "npm:2.1.3" - chai: "npm:^5.1.1" + "@vitest/spy": "npm:2.1.6" + "@vitest/utils": "npm:2.1.6" + chai: "npm:^5.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10/94e61e01f14cfcd9ced0e7ac1bbdeee55ff4bf68f09d8f244fd7d73f97b106f35d10cba3fe7a0132464c312206f2eee9e83b16a8d761101b61da053890062858 + checksum: 10/78d5c3e9781ec4d4954d4d532612fd3f78321214a86ca50413c2507d5ac36b20ceef3a8a401bfd1aae10d13bb0ef8a0f53f1ce3f212908c2458c4fb855d98612 languageName: node linkType: hard -"@vitest/mocker@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/mocker@npm:2.1.3" +"@vitest/expect@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/expect@npm:2.1.8" + dependencies: + "@vitest/spy": "npm:2.1.8" + "@vitest/utils": "npm:2.1.8" + chai: "npm:^5.1.2" + tinyrainbow: "npm:^1.2.0" + checksum: 10/3594149dd67dfac884a90f8b6a35687cdddd2f5f764562819bf7b66ae2eacfd4aa5e8914155deb4082fbe5a3792dced2fd7e59a948ffafe67acba4d2229dfe5f + languageName: node + linkType: hard + +"@vitest/mocker@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/mocker@npm:2.1.8" dependencies: - "@vitest/spy": "npm:2.1.3" + "@vitest/spy": "npm:2.1.8" estree-walker: "npm:^3.0.3" - magic-string: "npm:^0.30.11" + magic-string: "npm:^0.30.12" peerDependencies: - "@vitest/spy": 2.1.3 - msw: ^2.3.5 + msw: ^2.4.9 vite: ^5.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - checksum: 10/84be8830d6e965109730257d7a84b3d7594db0998ae55decdbfc304857c1c7d29b49f1f5b23f2addcbce1bd7e8bb33832407737a9bb3f95cb3bf7bb312db4d9d + checksum: 10/f04060f42102caa4cca72059e63c1ecae8b8e091aaa61a2d4a914b129fc711ada4ad117eb0184e49e363757784ed1117fdbf9f4a81a45fe575fd92769740a970 languageName: node linkType: hard -"@vitest/pretty-format@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/pretty-format@npm:2.0.5" +"@vitest/pretty-format@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/pretty-format@npm:2.1.6" dependencies: tinyrainbow: "npm:^1.2.0" - checksum: 10/70bf452dd0b8525e658795125b3f11110bd6baadfaa38c5bb91ca763bded35ec6dc80e27964ad4e91b91be6544d35e18ea7748c1997693988f975a7283c3e9a0 + checksum: 10/be0dea81e14b2e32f9843d96d5c72915acbabe7f06155d396b97f2fc4bef8f88866221ae215820f69674aec58a18ddd43d85aedf6db7d6aa3024ff2813ae1c08 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:2.1.8, @vitest/pretty-format@npm:^2.1.8": + version: 2.1.8 + resolution: "@vitest/pretty-format@npm:2.1.8" dependencies: tinyrainbow: "npm:^1.2.0" - checksum: 10/d9382ee93f0f32e2ef8fe03bda818e5277f052a50ddb05b6a6cf0864b2ccb228484f12f130c05faf62dc2140292ffafc213f2941b0fa24058b3ee2943daa286c + checksum: 10/f0f60c007424194887ad398d202867d58d850154de327993925041e2972357544eea95a22e0bb3a62a470b006ff8de5f691d2078708dcd7f625e24f8a06b26e7 languageName: node linkType: hard -"@vitest/runner@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/runner@npm:2.1.3" +"@vitest/runner@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/runner@npm:2.1.8" dependencies: - "@vitest/utils": "npm:2.1.3" + "@vitest/utils": "npm:2.1.8" pathe: "npm:^1.1.2" - checksum: 10/cdf9b82d388c1cc148753f4a8632dfcadf9c4a1c0e065fdcd485d5af824af62507fd7eab9efb21244009775c05773ccb59547043af522a5ab6d216433321066e + checksum: 10/27f265a3ab1e20297b948b06232bfa4dc9fda44d1f9bb6206baa9e6fa643b71143ebfd2d1771570296b7ee74a12d684e529a830f545ad61235cefb454e94a8e9 languageName: node linkType: hard -"@vitest/snapshot@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/snapshot@npm:2.1.3" +"@vitest/snapshot@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/snapshot@npm:2.1.8" dependencies: - "@vitest/pretty-format": "npm:2.1.3" - magic-string: "npm:^0.30.11" + "@vitest/pretty-format": "npm:2.1.8" + magic-string: "npm:^0.30.12" pathe: "npm:^1.1.2" - checksum: 10/2c0c4ad8abb758f2f76d1d6094f8928360437e09d0a59e0c6a85a544c892cc41a5324ebbc5657a66c8a3793e51cbf58e357c7f71e899f4e5c5eb76e8c9745abf + checksum: 10/71edf4f574d317579c605ed0a7ecab7ee96fddcebc777bd130774a770ddc692c538f9f5b3dfde89af83ecb36f7338fe880943c83cede58f55e3556768a1a0749 languageName: node linkType: hard -"@vitest/spy@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/spy@npm:2.0.5" +"@vitest/spy@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/spy@npm:2.1.6" dependencies: - tinyspy: "npm:^3.0.0" - checksum: 10/ed19f4c3bb4d3853241e8070979615138e24403ce4c137fa48c903b3af2c8b3ada2cc26aca9c1aa323bb314a457a8130a29acbb18dafd4e42737deefb2abf1ca + tinyspy: "npm:^3.0.2" + checksum: 10/4a926126bfb6ea6f0a2496b2aaa395dd8246de9dcadb5f143aa43bcff310e6eef567f5f05a350ff906b4dcf298790c25ccd961d5a851f47d0c8244f1141dd2b2 languageName: node linkType: hard -"@vitest/spy@npm:2.1.3": - version: 2.1.3 - resolution: "@vitest/spy@npm:2.1.3" +"@vitest/spy@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/spy@npm:2.1.8" dependencies: - tinyspy: "npm:^3.0.0" - checksum: 10/94d6f1bc34da5d0c973d9382c133b938e555fcf2d238edf0aaad3de1a98dd57ebf7c104ba229c6beec48122d2e6f55386d8d2cf96a5804dc95ac683a54754cc7 + tinyspy: "npm:^3.0.2" + checksum: 10/9a1cb9cf6b23c122681469b5890d91ca26fc8d74953b3d46d293a5d2a4944490106891f6a178cd732ab7a8abbda339f43681c81d1594565ecc3bf3e7f9b7735f languageName: node linkType: hard -"@vitest/utils@npm:2.0.5": - version: 2.0.5 - resolution: "@vitest/utils@npm:2.0.5" +"@vitest/utils@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/utils@npm:2.1.6" dependencies: - "@vitest/pretty-format": "npm:2.0.5" - estree-walker: "npm:^3.0.3" - loupe: "npm:^3.1.1" + "@vitest/pretty-format": "npm:2.1.6" + loupe: "npm:^3.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10/d631d56d29c33bc8de631166b2b6691c470187a345469dfef7048befe6027e1c6ff9552f2ee11c8a247522c325c4a64bfcc73f8f0f0c525da39cb9f190f119f8 + checksum: 10/7da93c871f2c0d5242caf65236b40f041e8820cfadddf9b68721e54eda5230c3dd8ed26a43600498930d922ee324dd3a65939e71b6db0906fe81bcf41c4bf040 languageName: node linkType: hard -"@vitest/utils@npm:2.1.3, @vitest/utils@npm:^2.1.1": - version: 2.1.3 - resolution: "@vitest/utils@npm:2.1.3" +"@vitest/utils@npm:2.1.8, @vitest/utils@npm:^2.1.6": + version: 2.1.8 + resolution: "@vitest/utils@npm:2.1.8" dependencies: - "@vitest/pretty-format": "npm:2.1.3" - loupe: "npm:^3.1.1" + "@vitest/pretty-format": "npm:2.1.8" + loupe: "npm:^3.1.2" tinyrainbow: "npm:^1.2.0" - checksum: 10/f064e6634cb84c925a17d8937df7441d150c3e24fa5bbd6304151d11dab6cdeb0cb3d5a95a9aacb8b416c87fb0d9aa8c6b9cc5e174191784231e8345948d6d18 + checksum: 10/be1f4254347199fb5c1d9de8e4537dad4af3f434c033e7cd023165bd4b7e9de16fa0f86664256ab331120585df95ed6be8eea58b209b510651b49f6482051733 languageName: node linkType: hard @@ -3450,16 +3464,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: 10/ee67279a5613bd36dc1dc13660042429ae2f1dc5a9030a6abcf381345866dfb5bce7bc10b9d74c8de86b6f656489f654bbbef3f3361e06925591e6a00c72afff + checksum: 10/e8c2bbc83cb5a2f87130d93056d4cfbbe04106e12aa798b504816dbe3fa538a9f68541b472e56cbf0f54558b501d7e31867d74b8218abcd5a8cc8ba536fba46c languageName: node linkType: hard @@ -3683,10 +3697,10 @@ __metadata: languageName: node linkType: hard -"cookie@npm:^0.5.0": - version: 0.5.0 - resolution: "cookie@npm:0.5.0" - checksum: 10/aae7911ddc5f444a9025fbd979ad1b5d60191011339bce48e555cb83343d0f98b865ff5c4d71fecdfb8555a5cafdc65632f6fce172f32aaf6936830a883a0380 +"cookie@npm:^0.7.2": + version: 0.7.2 + resolution: "cookie@npm:0.7.2" + checksum: 10/24b286c556420d4ba4e9bc09120c9d3db7d28ace2bd0f8ccee82422ce42322f73c8312441271e5eefafbead725980e5996cc02766dbb89a90ac7f5636ede608f languageName: node linkType: hard @@ -3841,7 +3855,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.6": +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.7": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -4162,6 +4176,13 @@ __metadata: languageName: node linkType: hard +"es-module-lexer@npm:^1.5.4": + version: 1.5.4 + resolution: "es-module-lexer@npm:1.5.4" + checksum: 10/f29c7c97a58eb17640dcbd71bd6ef754ad4f58f95c3073894573d29dae2cad43ecd2060d97ed5b866dfb7804d5590fb7de1d2c5339a5fceae8bd60b580387fc5 + languageName: node + linkType: hard + "esbuild-register@npm:^3.5.0": version: 3.6.0 resolution: "esbuild-register@npm:3.6.0" @@ -4622,6 +4643,13 @@ __metadata: languageName: node linkType: hard +"expect-type@npm:^1.1.0": + version: 1.1.0 + resolution: "expect-type@npm:1.1.0" + checksum: 10/05fca80ddc7d493a89361f783c6b000750fa04a8226bc24701f3b90adb0efc2fb467f2a0baaed4015a02d8b9034ef5bb87521df9dba980f50b1105bd596ef833 + languageName: node + linkType: hard + "expect@npm:^29.7.0": version: 29.7.0 resolution: "expect@npm:29.7.0" @@ -5018,18 +5046,7 @@ __metadata: languageName: node linkType: hard -"glob-promise@npm:^4.2.0": - version: 4.2.2 - resolution: "glob-promise@npm:4.2.2" - dependencies: - "@types/glob": "npm:^7.1.3" - peerDependencies: - glob: ^7.1.6 - checksum: 10/c1a3d95f7c8393e4151d4899ec4e42bb2e8237160f840ad1eccbe9247407da8b6c13e28f463022e011708bc40862db87b9b77236d35afa3feb8aa86d518f2dfe - languageName: node - linkType: hard - -"glob@npm:^10.2.2, glob@npm:^10.3.10": +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1": version: 10.4.5 resolution: "glob@npm:10.4.5" dependencies: @@ -5045,7 +5062,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.2.0": +"glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -5725,7 +5742,7 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0, istanbul-lib-coverage@npm:^3.2.2": version: 3.2.2 resolution: "istanbul-lib-coverage@npm:3.2.2" checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 @@ -5758,7 +5775,7 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-report@npm:^3.0.0": +"istanbul-lib-report@npm:^3.0.0, istanbul-lib-report@npm:^3.0.1": version: 3.0.1 resolution: "istanbul-lib-report@npm:3.0.1" dependencies: @@ -5780,7 +5797,18 @@ __metadata: languageName: node linkType: hard -"istanbul-reports@npm:^3.1.3": +"istanbul-lib-source-maps@npm:^5.0.6": + version: 5.0.6 + resolution: "istanbul-lib-source-maps@npm:5.0.6" + dependencies: + "@jridgewell/trace-mapping": "npm:^0.3.23" + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + checksum: 10/569dd0a392ee3464b1fe1accbaef5cc26de3479eacb5b91d8c67ebb7b425d39fd02247d85649c3a0e9c29b600809fa60b5af5a281a75a89c01f385b1e24823a2 + languageName: node + linkType: hard + +"istanbul-reports@npm:^3.1.3, istanbul-reports@npm:^3.1.7": version: 3.1.7 resolution: "istanbul-reports@npm:3.1.7" dependencies: @@ -6585,7 +6613,7 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^3.1.0, loupe@npm:^3.1.1": +"loupe@npm:^3.1.0, loupe@npm:^3.1.2": version: 3.1.2 resolution: "loupe@npm:3.1.2" checksum: 10/8f5734e53fb64cd914aa7d986e01b6d4c2e3c6c56dcbd5428d71c2703f0ab46b5ab9f9eeaaf2b485e8a1c43f865bdd16ec08ae1a661c8f55acdbd9f4d59c607a @@ -6626,7 +6654,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.0, magic-string@npm:^0.30.11": +"magic-string@npm:^0.30.0": version: 0.30.12 resolution: "magic-string@npm:0.30.12" dependencies: @@ -6635,6 +6663,26 @@ __metadata: languageName: node linkType: hard +"magic-string@npm:^0.30.12": + version: 0.30.14 + resolution: "magic-string@npm:0.30.14" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.5.0" + checksum: 10/8ca0f8937c2824e48ebc70e7e065a193c467713639cc6e5972aaba0fa5417b375a6f62c383410a19a66e618c386bb7253fbd3ccbfb0144bb310f0ba772121f12 + 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: 10/3a2dba6b0bdde957797361d09c7931ebdc1b30231705360eeb40ed458d28e1c3112841c3ed4e1b87ceb28f741e333c7673cd961193aa9fdb4f4946b202e6205a + languageName: node + linkType: hard + "make-dir@npm:^4.0.0": version: 4.0.0 resolution: "make-dir@npm:4.0.0" @@ -6884,15 +6932,16 @@ __metadata: languageName: node linkType: hard -"msw@npm:^2.3.5": - version: 2.4.11 - resolution: "msw@npm:2.4.11" +"msw@npm:^2.6.4": + version: 2.6.6 + resolution: "msw@npm:2.6.6" 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.8" + "@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" @@ -6912,14 +6961,14 @@ __metadata: optional: true bin: msw: cli/index.js - checksum: 10/d073ede4bfc7f1f41f7a0cb05b3d20d9befc1658e53faacd3f217a7cb78e3e748a3ee8e937e2a4d93fd09f16b35cba00d71df767736dd567ac15fd8e01aa7d6e + checksum: 10/7762ba5f1570789328af27167e03c2b8eb4981faa476ae47d74c125c90ddc1792bc28b9ce1100bbc4e105b55e3e7d65e7cae8d27fa7677b6516e42a63c38b7a3 languageName: node linkType: hard -"mute-stream@npm:^1.0.0": - version: 1.0.0 - resolution: "mute-stream@npm:1.0.0" - checksum: 10/36fc968b0e9c9c63029d4f9dc63911950a3bdf55c9a87f58d3a266289b67180201cade911e7699f8b2fa596b34c9db43dad37649e3f7fdd13c3bb9edb0017ee7 +"mute-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "mute-stream@npm:2.0.0" + checksum: 10/d2e4fd2f5aa342b89b98134a8d899d8ef9b0a6d69274c4af9df46faa2d97aeb1f2ce83d867880d6de63643c52386579b99139801e24e7526c3b9b0a6d1e18d6c languageName: node linkType: hard @@ -7370,7 +7419,8 @@ __metadata: "@typescript-eslint/eslint-plugin": "npm:^6.21.0" "@typescript-eslint/parser": "npm:^6.21.0" "@vitejs/plugin-react": "npm:^4.2.1" - "@vitest/browser": "npm:^2.1.3" + "@vitest/browser": "npm:^2.1.6" + "@vitest/coverage-v8": "npm:^2.1.6" cypress: "npm:^13.6.4" eslint: "npm:^8.56.0" eslint-plugin-react-hooks: "npm:^4.6.0" @@ -7384,7 +7434,7 @@ __metadata: storybook: "npm:^8.0.0" typescript: "npm:^5.2.2" vite: "npm:^5.1.1" - vitest: "npm:^2.1.3" + vitest: "npm:^2.1.6" languageName: unknown linkType: soft @@ -7982,14 +8032,14 @@ __metadata: languageName: node linkType: hard -"sirv@npm:^2.0.4": - version: 2.0.4 - resolution: "sirv@npm:2.0.4" +"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: 10/24f42cf06895017e589c9d16fc3f1c6c07fe8b0dbafce8a8b46322cfba67b7f2498610183954cb0e9d089c8cb60002a7ee7e8bca6a91a0d7042bfbc3473c95c3 + checksum: 10/94dbd5df7cf4965f7c5941767117cbf9709e1d25de1d619a114c3f77fc63c124b5a5255717af2a0de637bb83d0b0defd0822d01420764b56432b53281b1d675d languageName: node linkType: hard @@ -8057,7 +8107,7 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.2.1": +"source-map-js@npm:^1.2.0, source-map-js@npm:^1.2.1": version: 1.2.1 resolution: "source-map-js@npm:1.2.1" checksum: 10/ff9d8c8bf096d534a5b7707e0382ef827b4dd360a577d3f34d2b9f48e12c9d230b5747974ee7c607f0df65113732711bb701fe9ece3c7edbd43cb2294d707df3 @@ -8148,10 +8198,10 @@ __metadata: languageName: node linkType: hard -"std-env@npm:^3.7.0": - version: 3.7.0 - resolution: "std-env@npm:3.7.0" - checksum: 10/6ee0cca1add3fd84656b0002cfbc5bfa20340389d9ba4720569840f1caa34bce74322aef4c93f046391583e50649d0cf81a5f8fe1d411e50b659571690a45f12 +"std-env@npm:^3.8.0": + version: 3.8.0 + resolution: "std-env@npm:3.8.0" + checksum: 10/034176196cfcaaab16dbdd96fc9e925a9544799fb6dc5a3e36fe43270f3a287c7f779d785b89edaf22cef2b5f1dcada2aae67430b8602e785ee74bdb3f671768 languageName: node linkType: hard @@ -8350,6 +8400,17 @@ __metadata: languageName: node linkType: hard +"test-exclude@npm:^7.0.1": + version: 7.0.1 + resolution: "test-exclude@npm:7.0.1" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^10.4.1" + minimatch: "npm:^9.0.4" + checksum: 10/e6f6f4e1df2e7810e082e8d7dfc53be51a931e6e87925f5e1c2ef92cc1165246ba3bf2dae6b5d86251c16925683dba906bd41e40169ebc77120a2d1b5a0dbbe0 + languageName: node + linkType: hard + "text-table@npm:^0.2.0": version: 0.2.0 resolution: "text-table@npm:0.2.0" @@ -8385,17 +8446,17 @@ __metadata: languageName: node linkType: hard -"tinyexec@npm:^0.3.0": +"tinyexec@npm:^0.3.1": version: 0.3.1 resolution: "tinyexec@npm:0.3.1" checksum: 10/0537c70590d52d354f40c0255ff0f654a3d18ddb3812b440ddf9d436edf516c8057838ad5a38744c0c59670ec03e3cf23fbe04ae3d49f031d948274e99002569 languageName: node linkType: hard -"tinypool@npm:^1.0.0": - version: 1.0.1 - resolution: "tinypool@npm:1.0.1" - checksum: 10/eaceb93784b8e27e60c0e3e2c7d11c29e1e79b2a025b2c232215db73b90fe22bd4753ad53fc8e801c2b5a63b94a823af549555d8361272bc98271de7dd4a9925 +"tinypool@npm:^1.0.1": + version: 1.0.2 + resolution: "tinypool@npm:1.0.2" + checksum: 10/6109322f14b3763f65c8fa49fddab72cd3edd96b82dd50e05e63de74867329ff5353bff4377281ec963213d9314f37f4a353e9ee34bbac85fd4c1e4a568d6076 languageName: node linkType: hard @@ -8406,7 +8467,7 @@ __metadata: languageName: node linkType: hard -"tinyspy@npm:^3.0.0": +"tinyspy@npm:^3.0.2": version: 3.0.2 resolution: "tinyspy@npm:3.0.2" checksum: 10/5db671b2ff5cd309de650c8c4761ca945459d7204afb1776db9a04fb4efa28a75f08517a8620c01ee32a577748802231ad92f7d5b194dc003ee7f987a2a06337 @@ -8750,17 +8811,18 @@ __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:2.1.8": + version: 2.1.8 + resolution: "vite-node@npm:2.1.8" dependencies: cac: "npm:^6.7.14" - debug: "npm:^4.3.6" + debug: "npm:^4.3.7" + es-module-lexer: "npm:^1.5.4" pathe: "npm:^1.1.2" vite: "npm:^5.0.0" bin: vite-node: vite-node.mjs - checksum: 10/8ba6b145cbb02a492c7bb1f0490d02383000462f234ed61d24f650547163825c16f14e6908ee1eb661403bd0a7a3fb3cdbedf116cc015b1e5cdf7bb992872a01 + checksum: 10/0ff0ed7a6fb234d3ddc4946e4c1150229980cac9f34fb4bd7f443aab0aae2da5b73ac20ff68af1df476545807dc23189247194e8cea0dcdfa394311c73f04429 languageName: node linkType: hard @@ -8807,34 +8869,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:^2.1.6": + version: 2.1.8 + resolution: "vitest@npm:2.1.8" + dependencies: + "@vitest/expect": "npm:2.1.8" + "@vitest/mocker": "npm:2.1.8" + "@vitest/pretty-format": "npm:^2.1.8" + "@vitest/runner": "npm:2.1.8" + "@vitest/snapshot": "npm:2.1.8" + "@vitest/spy": "npm:2.1.8" + "@vitest/utils": "npm:2.1.8" + chai: "npm:^5.1.2" + debug: "npm:^4.3.7" + expect-type: "npm:^1.1.0" + magic-string: "npm:^0.30.12" 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.1" tinyrainbow: "npm:^1.2.0" vite: "npm:^5.0.0" - vite-node: "npm:2.1.3" + vite-node: "npm:2.1.8" 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 + "@vitest/browser": 2.1.8 + "@vitest/ui": 2.1.8 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -8852,7 +8915,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10/f6079a88583045b551e6526c08774aeac4a9cf85b132793a03f9470c013326abd7fce3985e3c2217dc0dac2fadeee3506e3dc51e215f10862b2fe9da9289af0f + checksum: 10/c2552c068f6faac82eb4e6debb9ed505c0e8016fd6e0a0f0e0dbb5b5417922fbcde80c54af0d3b5a5503a5d6ad6862b6e95b9b59b8b7e98bb553217b9c6fc227 languageName: node linkType: hard From 1373b3600162f56f3088297726ff0de1241e503d Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 3 Dec 2024 20:39:41 +0100 Subject: [PATCH 02/25] improve type-safety in coverage reporter --- code/addons/test/src/node/coverage-reporter.ts | 4 ++-- code/addons/test/src/node/vitest-manager.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/addons/test/src/node/coverage-reporter.ts b/code/addons/test/src/node/coverage-reporter.ts index 452643cd9d60..cc1dd548000f 100644 --- a/code/addons/test/src/node/coverage-reporter.ts +++ b/code/addons/test/src/node/coverage-reporter.ts @@ -8,7 +8,7 @@ import type { TestManager } from './test-manager'; export type StorybookCoverageReporterOptions = { testManager: TestManager; - coverageOptions: ResolvedCoverageOptions<'v8'>; + coverageOptions: ResolvedCoverageOptions<'v8'> | undefined; }; export default class StorybookCoverageReporter extends ReportBase implements Partial { @@ -32,7 +32,7 @@ export default class StorybookCoverageReporter extends ReportBase implements Par // Fallback to Vitest's default watermarks https://vitest.dev/config/#coverage-watermarks const [lowWatermark = 50, highWatermark = 80] = - this.#coverageOptions.watermarks?.statements ?? []; + this.#coverageOptions?.watermarks?.statements ?? []; const coverageDetails: Details['coverageSummary'] = { percentage, diff --git a/code/addons/test/src/node/vitest-manager.ts b/code/addons/test/src/node/vitest-manager.ts index 59aba03e7c71..f8be340cace3 100644 --- a/code/addons/test/src/node/vitest-manager.ts +++ b/code/addons/test/src/node/vitest-manager.ts @@ -45,7 +45,7 @@ export class VitestManager { '@storybook/experimental-addon-test/internal/coverage-reporter', { testManager: this.testManager, - coverageOptions: this.vitest?.config?.coverage as ResolvedCoverageOptions<'v8'>, + coverageOptions: this.vitest?.config?.coverage as ResolvedCoverageOptions<'v8'> | undefined, }, ]; const coverageOptions = ( From e111a2d8c6b8ff890a54bf56093ec6661c7f7cf4 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 3 Dec 2024 21:24:34 +0100 Subject: [PATCH 03/25] add coverage E2E test, a11y labels to coverage UI --- .../src/components/TestProviderRender.tsx | 7 ++- .../react/e2e-tests/component-testing.spec.ts | 52 +++++++++++++++++++ .../react/yarn.lock | 4 +- 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/code/addons/test/src/components/TestProviderRender.tsx b/code/addons/test/src/components/TestProviderRender.tsx index 16197a7c7ced..d5091a4d5c67 100644 --- a/code/addons/test/src/components/TestProviderRender.tsx +++ b/code/addons/test/src/components/TestProviderRender.tsx @@ -204,6 +204,7 @@ export const TestProviderRender: FC< href={'/coverage/index.html'} // @ts-expect-error ListItem doesn't include all anchor attributes in types, but it is an achor element target="_blank" + aria-label="Open coverage report" icon={ } - right={`${coverageSummary.percentage}%`} + right={ + + {coverageSummary.percentage} % + + } /> ) : ( { ); await expect(sidebarItems).toHaveCount(1); }); + + test("should collect coverage to testing module and HTML report", async ({ + page, + browserName, + }) => { + test.skip(browserName !== "chromium", `Skipping tests for ${browserName}`); + // Arrange - Prepare Storybook + await setForceFailureFlag(false); + + const sbPage = new SbPage(page, expect); + await sbPage.navigateToStory("addons/test", "Expected Failure"); + + const expandButton = await page.getByLabel('Expand testing module') + await expandButton.click(); + + const storyElement = sbPage + .getCanvasBodyElement() + .getByRole("button", { name: "test" }); + await expect(storyElement).toBeVisible({ timeout: 30000 }); + + // Assert - No coverage report initially + await expect(page.getByLabel("Open coverage report")).toHaveCount(0); + + // Act - Enable coverage and run tests + await page.getByLabel("Open settings for Component tests").click(); + await page.getByLabel("Coverage").click(); + await expect(page.getByText("Settings updated")).toBeVisible({ timeout: 3000 }); + await page.getByLabel("Close settings for Component tests").click(); + // Potentially wait for Vitest to have (re)started + await page.waitForTimeout(2000); + + await page.getByLabel("Start Component tests").click(); + + // Assert - Coverage report is collected and shown + await expect(page.getByLabel("Open coverage report")).toBeVisible({ timeout: 30000 }); + const sbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); + expect(sbPercentageText).toMatch(/^\d+\s%$/); + const sbPercentage = Number.parseInt(sbPercentageText!.replace(' %', '') ?? ''); + expect(sbPercentage).toBeGreaterThanOrEqual(0); + expect(sbPercentage).toBeLessThanOrEqual(100); + + // Act - Open HTML coverage report + const coverageReportLink = await page.getByLabel("Open coverage report"); + // Remove target="_blank" attribute to open in the same tab + await coverageReportLink.evaluate((elem) => elem.removeAttribute("target")); + await page.getByLabel("Open coverage report").click(); + + // Assert - HTML coverage report is accessible and reports the same coverage percentage as Storybook + const htmlPercentageText = await page.locator('span:has(+ :text("Statements"))').first().textContent() ?? ''; + const htmlPercentage = Number.parseFloat(htmlPercentageText.replace('% ', '')); + expect(Math.round(htmlPercentage)).toBe(sbPercentage); + }); }); diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index ff334163229a..88771208ddf2 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -1853,7 +1853,7 @@ __metadata: "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": version: 8.5.0-alpha.15 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=637429&locator=portable-stories-react%40workspace%3A." + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=8c5acc&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:^0.1.11" "@storybook/global": "npm:^5.0.0" @@ -1876,7 +1876,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/31d4f67b7bf72037481a896d86e551280692bc3f21edff1e27558657096171f128966e8eda20b19edc109c24098d107956a889e217c9d394c231d173ba3400a0 + checksum: 10/0dca94606557f8b58c5d09621e7b9b1360ee9d5f80ffb349fbf0cbe1233d839318a6eecf9e8430440e391127bd2ee9ebe96b7d1a25bb213522ac171437533e74 languageName: node linkType: hard From c91f6043927387e66ef25e8ac4b0cace63caf90c Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 5 Dec 2024 11:41:53 +0100 Subject: [PATCH 04/25] commit stuff - not done --- code/addons/test/src/vitest-plugin/index.ts | 9 +- .../react/.storybook/main.ts | 6 + .../react/.storybook/preview-head.html | 5 + .../react/e2e-tests/component-testing.spec.ts | 212 ++++++++++++++++-- .../react/package.json | 2 + .../react/stories/AddonTest.stories.tsx | 26 ++- .../react/stories/Button.playwright.tsx | 2 +- .../react/stories/OtherComponent.stories.tsx | 24 ++ .../react/vitest.workspace.ts | 10 +- .../react/yarn.lock | 95 ++++++-- 10 files changed, 349 insertions(+), 42 deletions(-) create mode 100644 test-storybooks/portable-stories-kitchen-sink/react/.storybook/preview-head.html create mode 100644 test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx diff --git a/code/addons/test/src/vitest-plugin/index.ts b/code/addons/test/src/vitest-plugin/index.ts index 05bf16e82ba6..aadd83680e07 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -79,14 +79,17 @@ export const storybookTest = (options?: UserOptions): Plugin => { name: 'vite-plugin-storybook-test', enforce: 'pre', async transformIndexHtml(html) { + console.log('LOG: transformIndexHtml'); const presets = await presetPromise; const headHtmlSnippet = await presets.apply('previewHead'); const bodyHtmlSnippet = await presets.apply('previewBody'); - html - .replace(/<\/head>/, `${headHtmlSnippet}`) - .replace(//, `${bodyHtmlSnippet}`); + const result = html + .replace('', `${headHtmlSnippet ?? ''}`) + .replace('', `${bodyHtmlSnippet ?? ''}`); + console.log('LOG: result', result); + return result; }, async config(input) { let config = input; 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 9a2664c6e951..99ed3c65c752 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts @@ -13,5 +13,11 @@ const config: StorybookConfig = { core: { disableWhatsNewNotifications: true }, + previewHead: (head = '') => `${head} + `, }; export default config; diff --git a/test-storybooks/portable-stories-kitchen-sink/react/.storybook/preview-head.html b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/preview-head.html new file mode 100644 index 000000000000..61252d019910 --- /dev/null +++ b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/preview-head.html @@ -0,0 +1,5 @@ + diff --git a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts index 5a79c80a313a..9aa8751b60ca 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts @@ -6,16 +6,13 @@ import { expect, test } from "@playwright/test"; import { SbPage } from "../../../../code/e2e-tests/util"; -const storybookUrl = "http://localhost:6006"; -const testStoryPath = path.resolve( - __dirname, - "..", - "stories/AddonTest.stories.tsx" -); +const STORYBOOK_URL = "http://localhost:6006"; +const TEST_STORY_PATH = path.resolve(__dirname, "..", "stories", "AddonTest.stories.tsx"); +const BUTTON_COMPONENT_PATH = path.resolve(__dirname, "..", "stories", "Button.tsx"); const setForceFailureFlag = async (value: boolean) => { // Read the story file content asynchronously - const storyContent = (await fs.readFile(testStoryPath)).toString(); + const storyContent = (await fs.readFile(TEST_STORY_PATH)).toString(); // Create a regex to match 'forceFailure: true' or 'forceFailure: false' const forceFailureRegex = /forceFailure:\s*(true|false)/; @@ -27,7 +24,7 @@ const setForceFailureFlag = async (value: boolean) => { ); // Write the updated content back to the file asynchronously - await fs.writeFile(testStoryPath, updatedContent); + await fs.writeFile(TEST_STORY_PATH, updatedContent); }; test.describe("component testing", () => { @@ -35,7 +32,7 @@ test.describe("component testing", () => { test.beforeEach(async ({ page }) => { const sbPage = new SbPage(page, expect); - await page.goto(storybookUrl); + await page.goto(STORYBOOK_URL); await page.evaluate(() => window.sessionStorage.clear()); await sbPage.waitUntilLoaded(); }); @@ -47,7 +44,7 @@ test.describe("component testing", () => { test.skip(browserName !== "chromium", `Skipping tests for ${browserName}`); const sbPage = new SbPage(page, expect); - await sbPage.navigateToStory("addons/test", "Mismatch Failure"); + await sbPage.navigateToStory("addons/group/test", "Mismatch Failure"); const expandButton = await page.getByLabel('Expand testing module') await expandButton.click(); @@ -97,7 +94,7 @@ test.describe("component testing", () => { ); // Assert discrepancy: CLI fail + Browser pass - await sbPage.navigateToStory("addons/test", "Mismatch Success"); + await sbPage.navigateToStory("addons/group/test", "Mismatch Success"); const successfulStoryElement = page.locator( '[data-item-id="addons-test--mismatch-success"] [role="status"]' ); @@ -118,7 +115,7 @@ test.describe("component testing", () => { await setForceFailureFlag(true); const sbPage = new SbPage(page, expect); - await sbPage.navigateToStory("addons/test", "Expected Failure"); + await sbPage.navigateToStory("addons/group/test", "Expected Failure"); const expandButton = await page.getByLabel('Expand testing module') await expandButton.click(); @@ -189,7 +186,7 @@ test.describe("component testing", () => { await setForceFailureFlag(false); const sbPage = new SbPage(page, expect); - await sbPage.navigateToStory("addons/test", "Expected Failure"); + await sbPage.navigateToStory("addons/group/test", "Expected Failure"); const expandButton = await page.getByLabel('Expand testing module') await expandButton.click(); @@ -247,7 +244,7 @@ test.describe("component testing", () => { await setForceFailureFlag(false); const sbPage = new SbPage(page, expect); - await sbPage.navigateToStory("addons/test", "Expected Failure"); + await sbPage.navigateToStory("addons/group/test", "Expected Failure"); const expandButton = await page.getByLabel('Expand testing module') await expandButton.click(); @@ -265,7 +262,7 @@ test.describe("component testing", () => { await page.getByLabel("Coverage").click(); await expect(page.getByText("Settings updated")).toBeVisible({ timeout: 3000 }); await page.getByLabel("Close settings for Component tests").click(); - // Potentially wait for Vitest to have (re)started + // Wait for Vitest to have (re)started await page.waitForTimeout(2000); await page.getByLabel("Start Component tests").click(); @@ -288,5 +285,190 @@ test.describe("component testing", () => { const htmlPercentageText = await page.locator('span:has(+ :text("Statements"))').first().textContent() ?? ''; const htmlPercentage = Number.parseFloat(htmlPercentageText.replace('% ', '')); expect(Math.round(htmlPercentage)).toBe(sbPercentage); + + // Cleanup - Disable coverage again + await page.getByLabel("Open settings for Component tests").click(); + await page.getByLabel("Coverage").click(); + await expect(page.getByText("Settings updated")).toBeVisible({ timeout: 3000 }); + }); + + test("should run focused test for a single story", async ({ + page, + browserName, + }) => { + test.skip(browserName !== "chromium", `Skipping tests for ${browserName}`); + // Arrange - Prepare Storybook + await setForceFailureFlag(false); + + const sbPage = new SbPage(page, expect); + await sbPage.navigateToStory("addons/group/test", "Expected Failure"); + + const expandButton = await page.getByLabel('Expand testing module') + await expandButton.click(); + + const storyElement = sbPage + .getCanvasBodyElement() + .getByRole("button", { name: "test" }); + await expect(storyElement).toBeVisible({ timeout: 30000 }); + + // Act - Open sidebar context menu and start focused test + await page.locator('[data-item-id="addons-group-test--expected-failure"]').hover(); + await page.locator('[data-item-id="addons-group-test--expected-failure"] div[data-testid="context-menu"] button').click(); + const sidebarContextMenu = page.getByTestId('tooltip'); + await sidebarContextMenu.getByLabel('Start Component tests').click(); + + // Assert - Only one test is running and reported + await expect(sidebarContextMenu.locator('#testing-module-description')).toHaveText('Testing... 0/1'); + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test'); + await expect(sidebarContextMenu.getByLabel('status: passed')).toHaveCount(1); + await page.click('body'); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(1); }); + + test("should run focused test for a component", async ({ + page, + browserName, + }) => { + test.skip(browserName !== "chromium", `Skipping tests for ${browserName}`); + // Arrange - Prepare Storybook + await setForceFailureFlag(false); + + const sbPage = new SbPage(page, expect); + await sbPage.navigateToStory("addons/group/test", "Expected Failure"); + + const expandButton = await page.getByLabel('Expand testing module') + await expandButton.click(); + + const storyElement = sbPage + .getCanvasBodyElement() + .getByRole("button", { name: "test" }); + await expect(storyElement).toBeVisible({ timeout: 30000 }); + + // Act - Open sidebar context menu and start focused test + await page.locator('[data-item-id="addons-group-test"]').hover(); + await page.locator('[data-item-id="addons-group-test"] div[data-testid="context-menu"] button').click(); + const sidebarContextMenu = page.getByTestId('tooltip'); + await sidebarContextMenu.getByLabel('Start Component tests').click(); + + // Assert - 5 tests are running and reported + await expect(sidebarContextMenu.locator('#testing-module-description')).toHaveText('Testing... 0/5'); + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 5 test'); + // Assert - 1 failing test shows as a failed status + await expect(sidebarContextMenu.getByText('1 story with errors')).toBeVisible(); + await expect(sidebarContextMenu.getByLabel('status: failed')).toHaveCount(1); + + await page.click('body'); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(4); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(1); + }); + + test("should run focused test for a group", async ({ + page, + browserName, + }) => { + test.skip(browserName !== "chromium", `Skipping tests for ${browserName}`); + // Arrange - Prepare Storybook + await setForceFailureFlag(false); + + const sbPage = new SbPage(page, expect); + await sbPage.navigateToStory("addons/group/test", "Expected Failure"); + + const expandButton = await page.getByLabel('Expand testing module') + await expandButton.click(); + + const storyElement = sbPage + .getCanvasBodyElement() + .getByRole("button", { name: "test" }); + await expect(storyElement).toBeVisible({ timeout: 30000 }); + + // Act - Open sidebar context menu and start focused test + await page.locator('[data-item-id="addons-group"]').hover(); + await page.locator('[data-item-id="addons-group"] div[data-testid="context-menu"] button').click(); + const sidebarContextMenu = page.getByTestId('tooltip'); + await sidebarContextMenu.getByLabel('Start Component tests').click(); + + // Assert - 5 tests are running and reported + await expect(sidebarContextMenu.locator('#testing-module-description')).toHaveText('Testing... 0/7'); + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 7 test'); + // Assert - 1 failing test shows as a failed status + await expect(sidebarContextMenu.getByText('2 story with errors')).toBeVisible(); + await expect(sidebarContextMenu.getByLabel('status: failed')).toHaveCount(1); + + await page.click('body'); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(4); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(1); + }); + + test("should run focused tests without coverage, even when enabled", async ({ + page, + browserName, + }) => { + test.skip(browserName !== "chromium", `Skipping tests for ${browserName}`); + // Arrange - Prepare Storybook + await setForceFailureFlag(false); + + const sbPage = new SbPage(page, expect); + await sbPage.navigateToStory("example/button", "CSF 3 Primary"); + + const expandButton = await page.getByLabel('Expand testing module') + await expandButton.click(); + + const storyElement = sbPage + .getCanvasBodyElement() + .getByRole("button", { name: "test" }); + await expect(storyElement).toBeVisible({ timeout: 30000 }); + + // Act - Enable coverage and run ALL tests + await page.getByLabel("Open settings for Component tests").click(); + await page.getByLabel("Coverage").click(); + await expect(page.getByText("Settings updated")).toBeVisible({ timeout: 3000 }); + await page.getByLabel("Close settings for Component tests").click(); + // Wait for Vitest to have (re)started + await page.waitForTimeout(2000); + + await page.getByLabel("Start Component tests").click(); + + // Assert - Coverage report is collected and shown + await expect(page.getByLabel("Open coverage report")).toBeVisible({ timeout: 30000 }); + const firstSbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); + expect(firstSbPercentageText).toMatch(/^\d+\s%$/); + const firstSbPercentage = Number.parseInt(firstSbPercentageText!.replace(' %', '') ?? ''); + + // Arrange - Add uncovered lines to Button.tsx to force coverage to drop + const initialButtonContent = (await fs.readFile(BUTTON_COMPONENT_PATH)).toString(); + await fs.writeFile(BUTTON_COMPONENT_PATH, [initialButtonContent, + `export const uncovered = () => { + ${Array.from({ length: 300 }).map(() => 'void;').join('\n')} + };`].join('\n')); +//TODO: CLEANUP + // Act - Open sidebar context menu and start focused test + await page.locator('[data-item-id="example-button--csf-3-primary"]').hover(); + await page.locator('[data-item-id="example-button--csf-3-primary"] div[data-testid="context-menu"] button').click(); + const sidebarContextMenu = page.getByTestId('tooltip'); + await sidebarContextMenu.getByLabel('Start Component tests').click(); + + // Arrange - Wait for test to finish and unfocus sidebar context menu + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test'); + await page.click('body'); + + // Assert - Coverage percentage is unchanged + console.log('LOG: firstSbPercentageText', firstSbPercentageText); + console.log('LOG: secondSbPercentageText', await page.getByLabel(/percent coverage$/).textContent()); + expect(await page.getByLabel(/percent coverage$/).textContent()).toEqual(firstSbPercentageText); + + // Act - Run ALL tests again + await page.getByLabel("Start Component tests").click(); + + // Arrange - Wait for tests to finish + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText(/Ran \d{2,} tests/); + + // Assert - Coverage percentage is updated to reflect the new coverage + const updatedSbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); + expect(updatedSbPercentageText).toMatch(/^\d+\s%$/); + const updatedSbPercentage = Number.parseInt(updatedSbPercentageText!.replace(' %', '') ?? ''); + expect(updatedSbPercentage).toBeGreaterThanOrEqual(0); + expect(updatedSbPercentage).toBeLessThan(firstSbPercentage); + + }); + }); diff --git a/test-storybooks/portable-stories-kitchen-sink/react/package.json b/test-storybooks/portable-stories-kitchen-sink/react/package.json index 4c20025a192b..e7d4dae6cd83 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react/package.json @@ -11,6 +11,7 @@ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "playwright-ct": "playwright test -c playwright-ct.config.ts", "playwright-e2e": "playwright test -c playwright-e2e.config.ts", + "vitest-non-failing-tests": "SKIP_FAIL_ON_PURPOSE=true vitest run", "preview": "vite preview", "storybook": "storybook dev -p 6006", "vitest": "echo 'not running'" @@ -110,6 +111,7 @@ "@vitejs/plugin-react": "^4.2.1", "@vitest/browser": "^2.1.6", "@vitest/coverage-v8": "^2.1.6", + "@vitest/ui": "2.1.8", "cypress": "^13.6.4", "eslint": "^8.56.0", "eslint-plugin-react-hooks": "^4.6.0", diff --git a/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx b/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx index 365ed4da0e6b..8a61b2b89f1d 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx +++ b/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx @@ -1,19 +1,24 @@ -import { Meta } from '@storybook/react' +import { expect } from '@storybook/test'; +import { Meta, type StoryObj } from '@storybook/react' import { instrument } from '@storybook/instrumenter' import type { StoryAnnotations } from 'storybook/internal/types'; declare global { - // eslint-disable-next-line no-var, @typescript-eslint/naming-convention + // eslint-disable-next-line no-var var __vitest_browser__: boolean; } const Component = () => -export default { - title: 'Addons/Test', +const meta = { + title: 'Addons/Group/Test', component: Component, } as Meta; +export default meta; + +type Story = StoryObj; + const { pass } = instrument({ pass: async () => {}, }, { intercept: true }) @@ -57,5 +62,16 @@ export const MismatchSuccess = { if(globalThis.__vitest_browser__) { throw new Error('Unexpected success'); } + }, + tags: ['fail-on-purpose'], +} satisfies StoryAnnotations; + +export const PreviewHeadTest: Story = { + play: async () => { + const styles = window.getComputedStyle(document.body); + // set in preview-head.html + expect(styles.backgroundColor).toBe('rgb(250, 250, 210)'); + // set in main.js#previewHead + expect(styles.borderColor).toBe('rgb(255, 0, 0)'); } -} satisfies StoryAnnotations; \ No newline at end of file +}; diff --git a/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.playwright.tsx b/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.playwright.tsx index db4590c82fab..ee201e587159 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.playwright.tsx +++ b/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.playwright.tsx @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ + import { createTest } from '@storybook/react/experimental-playwright'; import { test as base, expect } from '@playwright/experimental-ct-react'; import stories, { SingleComposedStory, WithSpanishGlobal } from './Button.stories.playwright'; diff --git a/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx b/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx new file mode 100644 index 000000000000..98ef7e00065a --- /dev/null +++ b/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx @@ -0,0 +1,24 @@ +import { Meta } from '@storybook/react' +import type { StoryAnnotations } from 'storybook/internal/types'; + +declare global { + // eslint-disable-next-line no-var + var __vitest_browser__: boolean; +} + +const Component = () => + +export default { + title: 'Addons/Group/Other', + component: Component, +} as Meta; + +export const Passes = { +} satisfies StoryAnnotations; + +export const Fails = { + play: async () => { + throw new Error('Expected failure'); + }, + tags: ['fail-on-purpose'], +} satisfies StoryAnnotations; diff --git a/test-storybooks/portable-stories-kitchen-sink/react/vitest.workspace.ts b/test-storybooks/portable-stories-kitchen-sink/react/vitest.workspace.ts index f1657f3acddd..fdc40b556029 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/vitest.workspace.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/vitest.workspace.ts @@ -5,13 +5,17 @@ export default defineWorkspace([ { extends: "vite.config.ts", plugins: [ - storybookTest(), + storybookTest(process.env.SKIP_FAIL_ON_PURPOSE ? { + tags: { + exclude: ["fail-on-purpose"], + } + } : undefined), ], test: { name: "storybook", pool: "threads", include: [ - "stories/AddonTest.stories.?(c|m)[jt]s?(x)", + "stories/*.stories.?(c|m)[jt]s?(x)", ], deps: { optimizer: { @@ -30,4 +34,4 @@ export default defineWorkspace([ environment: "happy-dom", }, }, -]); \ No newline at end of file +]); diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index 88771208ddf2..6aeacc4f54b3 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -1792,11 +1792,11 @@ __metadata: linkType: soft "@storybook/components@file:../../../code/deprecated/components::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.15 - resolution: "@storybook/components@file:../../../code/deprecated/components#../../../code/deprecated/components::hash=0be72f&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.17 + resolution: "@storybook/components@file:../../../code/deprecated/components#../../../code/deprecated/components::hash=88319a&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/744a23254c29518601e7f3ff9e549693c6c17b5bf75fccb532826213860fb78c8b3d9dc1be0e4f6dbaa4f42b439521017f79f0d0d43ddaacddf9938174048ff6 + checksum: 10/d3e6ae03a1f331ae8e67e593d9f18f40fb2e3a8be4d8c8c495826ccb7b052775f68824371c514daaa87484182685007a636de76796ac1e5c26009407a7e6a64d languageName: node linkType: hard @@ -1852,8 +1852,8 @@ __metadata: linkType: hard "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.15 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=8c5acc&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.17 + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=769cd0&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:^0.1.11" "@storybook/global": "npm:^5.0.0" @@ -1876,7 +1876,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/0dca94606557f8b58c5d09621e7b9b1360ee9d5f80ffb349fbf0cbe1233d839318a6eecf9e8430440e391127bd2ee9ebe96b7d1a25bb213522ac171437533e74 + checksum: 10/b78c23be02c5622a4ef5afc4229a92cd6cbe0c1bb60b739d7b2d823c6313db6f95642d5581ebee7fbf9b0f4da437cf88d97f5240901c1c5a98890edde6500396 languageName: node linkType: hard @@ -1909,20 +1909,20 @@ __metadata: linkType: soft "@storybook/manager-api@file:../../../code/deprecated/manager-api::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.15 - resolution: "@storybook/manager-api@file:../../../code/deprecated/manager-api#../../../code/deprecated/manager-api::hash=524260&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.17 + resolution: "@storybook/manager-api@file:../../../code/deprecated/manager-api#../../../code/deprecated/manager-api::hash=98fa43&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/fcef37968ca864618fda44849c4442f89ffa1349239a0107b00c830d289e44bc48602c0f5b1ea90a092939cf3bb51030649ac042f6a8210dfa18ed87efcf4b80 + checksum: 10/7276107e58c3598282d0359fce675b0eb95dd11792d2ec944caffcd5eb254b32b61d1900a74fd318ecc158959347aabae2642a3be6715f2ddcc9290a6468c05f languageName: node linkType: hard "@storybook/preview-api@file:../../../code/deprecated/preview-api::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.15 - resolution: "@storybook/preview-api@file:../../../code/deprecated/preview-api#../../../code/deprecated/preview-api::hash=a4220e&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.17 + resolution: "@storybook/preview-api@file:../../../code/deprecated/preview-api#../../../code/deprecated/preview-api::hash=a9de97&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/7e69d44343f24a1291b9604450d85e11149dccf61755ded28268d9791e887f6a60b3ec05b76df4d9dd9be6b2b30a6d6bb7db1feea27448e0ab904162e5fbb630 + checksum: 10/ac50a70d12304ab0661fdfdf7591d31d1dd943ac79f59cd554cff31f8dcc93de817256dabfff8f6d81db404d7ffcc46453e0cd2ef1983152f2668da618ebc4c9 languageName: node linkType: hard @@ -1950,10 +1950,14 @@ __metadata: resolve: "npm:^1.22.8" tsconfig-paths: "npm:^4.2.0" peerDependencies: + "@storybook/test": "workspace:*" react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta storybook: "workspace:^" vite: ^4.0.0 || ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + "@storybook/test": + optional: true languageName: node linkType: soft @@ -1999,11 +2003,11 @@ __metadata: linkType: soft "@storybook/theming@file:../../../code/deprecated/theming::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.15 - resolution: "@storybook/theming@file:../../../code/deprecated/theming#../../../code/deprecated/theming::hash=6dcd01&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.17 + resolution: "@storybook/theming@file:../../../code/deprecated/theming#../../../code/deprecated/theming::hash=6cb022&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/070e791f22ca7bb55dffdd43e52d80aa1ae367a64375718d7634b73798536f4f1210820f1547991e7c00f821e2763edb8b30e64f22af5eaf10b4af21b3ad230e + checksum: 10/4b59447f28ca2682e24ab2cf62976fdaaea63c1aa97e687ec6da9e7865716d13439b8ea259aa742c8a0ede23f52025f57c7562f9acf794cddbe7c9a054bea069 languageName: node linkType: hard @@ -2842,6 +2846,23 @@ __metadata: languageName: node linkType: hard +"@vitest/ui@npm:2.1.8": + version: 2.1.8 + resolution: "@vitest/ui@npm:2.1.8" + dependencies: + "@vitest/utils": "npm:2.1.8" + fflate: "npm:^0.8.2" + flatted: "npm:^3.3.1" + pathe: "npm:^1.1.2" + sirv: "npm:^3.0.0" + tinyglobby: "npm:^0.2.10" + tinyrainbow: "npm:^1.2.0" + peerDependencies: + vitest: 2.1.8 + checksum: 10/7ff0532b3b0e3f93c037cad3528b8fde8a93188f3222b92faae42e0fdd996e9284b362c4e5e9d725ce0a019870d3b0b7ad80c1874f74b43ffc5a1d703803fdd8 + languageName: node + linkType: hard + "@vitest/utils@npm:2.1.6": version: 2.1.6 resolution: "@vitest/utils@npm:2.1.6" @@ -4769,6 +4790,25 @@ __metadata: languageName: node linkType: hard +"fdir@npm:^6.4.2": + version: 6.4.2 + resolution: "fdir@npm:6.4.2" + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + checksum: 10/5ff80d1d2034e75cc68be175401c9f64c4938a6b2c1e9a0c27f2d211ffbe491fd86d29e4576825d9da8aff9bd465f0283427c2dddc11653457906c46d3bbc448 + languageName: node + linkType: hard + +"fflate@npm:^0.8.2": + version: 0.8.2 + resolution: "fflate@npm:0.8.2" + checksum: 10/2bd26ba6d235d428de793c6a0cd1aaa96a06269ebd4e21b46c8fd1bd136abc631acf27e188d47c3936db090bf3e1ede11d15ce9eae9bffdc4bfe1b9dc66ca9cb + languageName: node + linkType: hard + "figures@npm:^3.2.0": version: 3.2.0 resolution: "figures@npm:3.2.0" @@ -4834,6 +4874,13 @@ __metadata: languageName: node linkType: hard +"flatted@npm:^3.3.1": + version: 3.3.2 + resolution: "flatted@npm:3.3.2" + checksum: 10/ac3c159742e01d0e860a861164bcfd35bb567ccbebb8a0dd041e61cf3c64a435b917dd1e7ed1c380c2ebca85735fb16644485ec33665bc6aafc3b316aa1eed44 + languageName: node + linkType: hard + "for-each@npm:^0.3.3": version: 0.3.3 resolution: "for-each@npm:0.3.3" @@ -7339,6 +7386,13 @@ __metadata: languageName: node linkType: hard +"picomatch@npm:^4.0.2": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: 10/ce617b8da36797d09c0baacb96ca8a44460452c89362d7cb8f70ca46b4158ba8bc3606912de7c818eb4a939f7f9015cef3c766ec8a0c6bfc725fdc078e39c717 + languageName: node + linkType: hard + "pify@npm:^2.2.0": version: 2.3.0 resolution: "pify@npm:2.3.0" @@ -7421,6 +7475,7 @@ __metadata: "@vitejs/plugin-react": "npm:^4.2.1" "@vitest/browser": "npm:^2.1.6" "@vitest/coverage-v8": "npm:^2.1.6" + "@vitest/ui": "npm:2.1.8" cypress: "npm:^13.6.4" eslint: "npm:^8.56.0" eslint-plugin-react-hooks: "npm:^4.6.0" @@ -8453,6 +8508,16 @@ __metadata: languageName: node linkType: hard +"tinyglobby@npm:^0.2.10": + version: 0.2.10 + resolution: "tinyglobby@npm:0.2.10" + dependencies: + fdir: "npm:^6.4.2" + picomatch: "npm:^4.0.2" + checksum: 10/10c976866d849702edc47fc3fef27d63f074c40f75ef17171ecc1452967900699fa1e62373681dd58e673ddff2e3f6094bcd0a2101e3e4b30f4c2b9da41397f2 + languageName: node + linkType: hard + "tinypool@npm:^1.0.1": version: 1.0.2 resolution: "tinypool@npm:1.0.2" From eb1a5261f797119e41cd8f5a9eef510a8ec9f04e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 5 Dec 2024 12:01:38 +0100 Subject: [PATCH 05/25] add an experimentalLoadStorybook api --- code/addons/test/src/vitest-plugin/index.ts | 10 +- code/core/src/core-server/index.ts | 2 + code/core/src/core-server/load.ts | 152 ++++++++++++++++++++ 3 files changed, 158 insertions(+), 6 deletions(-) create mode 100644 code/core/src/core-server/load.ts diff --git a/code/addons/test/src/vitest-plugin/index.ts b/code/addons/test/src/vitest-plugin/index.ts index aadd83680e07..44454556e3eb 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -8,7 +8,7 @@ import { normalizeStories, validateConfigurationFiles, } from 'storybook/internal/common'; -import { StoryIndexGenerator } from 'storybook/internal/core-server'; +import { StoryIndexGenerator, experimental_loadStorybook } from 'storybook/internal/core-server'; import { readConfig, vitestTransform } from 'storybook/internal/csf-tools'; import { MainFileMissingError } from 'storybook/internal/server-errors'; import type { DocsOptions, StoriesEntry } from 'storybook/internal/types'; @@ -68,10 +68,8 @@ export const storybookTest = (options?: UserOptions): Plugin => { const configDir = finalOptions.configDir; - const presetPromise = loadAllPresets({ + const presetPromise = experimental_loadStorybook({ configDir, - corePresets: [], - overridePresets: [], packageJson: {}, }); @@ -80,7 +78,7 @@ export const storybookTest = (options?: UserOptions): Plugin => { enforce: 'pre', async transformIndexHtml(html) { console.log('LOG: transformIndexHtml'); - const presets = await presetPromise; + const { presets } = await presetPromise; const headHtmlSnippet = await presets.apply('previewHead'); const bodyHtmlSnippet = await presets.apply('previewBody'); @@ -103,7 +101,7 @@ export const storybookTest = (options?: UserOptions): Plugin => { }); } - const presets = await presetPromise; + const { presets } = await presetPromise; const workingDir = process.cwd(); const directories = { diff --git a/code/core/src/core-server/index.ts b/code/core/src/core-server/index.ts index 3163e70875ea..d8fe607d203f 100644 --- a/code/core/src/core-server/index.ts +++ b/code/core/src/core-server/index.ts @@ -7,3 +7,5 @@ export * from './build-dev'; export * from './withTelemetry'; export { default as build } from './standalone'; export { StoryIndexGenerator } from './utils/StoryIndexGenerator'; + +export { loadStorybook as experimental_loadStorybook } from './load'; diff --git a/code/core/src/core-server/load.ts b/code/core/src/core-server/load.ts new file mode 100644 index 000000000000..b4d6d155f1db --- /dev/null +++ b/code/core/src/core-server/load.ts @@ -0,0 +1,152 @@ +import { join, relative, resolve } from 'node:path'; + +import { + getConfigInfo, + getProjectRoot, + loadAllPresets, + loadMainConfig, + resolveAddonName, + resolvePathInStorybookCache, + validateFrameworkName, + versions, +} from '@storybook/core/common'; +import { oneWayHash } from '@storybook/core/telemetry'; +import type { BuilderOptions, CLIOptions, LoadOptions, Options } from '@storybook/core/types'; +import { global } from '@storybook/global'; + +import { MissingBuilderError } from '@storybook/core/server-errors'; + +import prompts from 'prompts'; +import invariant from 'tiny-invariant'; + +import { getManagerBuilder, getPreviewBuilder } from './utils/get-builders'; +import { getServerChannelUrl, getServerPort } from './utils/server-address'; +import { updateCheck } from './utils/update-check'; + +export async function loadStorybook( + options: CLIOptions & + LoadOptions & + BuilderOptions & { + storybookVersion?: string; + previewConfigPath?: string; + } +): Promise { + const { packageJson, versionUpdates } = options; + let { storybookVersion, previewConfigPath } = options; + const configDir = resolve(options.configDir); + if (packageJson) { + invariant( + packageJson.version !== undefined, + `Expected package.json#version to be defined in the "${packageJson.name}" package}` + ); + storybookVersion = packageJson.version; + previewConfigPath = getConfigInfo(packageJson, configDir).previewConfig ?? undefined; + } else { + if (!storybookVersion) { + storybookVersion = versions.storybook; + } + } + // updateInfo are cached, so this is typically pretty fast + const [port, versionCheck] = await Promise.all([ + getServerPort(options.port, { exactPort: options.exactPort }), + versionUpdates + ? updateCheck(storybookVersion) + : Promise.resolve({ success: false, cached: false, data: {}, time: Date.now() }), + ]); + + if (!options.ci && !options.smokeTest && options.port != null && port !== options.port) { + const { shouldChangePort } = await prompts({ + type: 'confirm', + initial: true, + name: 'shouldChangePort', + message: `Port ${options.port} is not available. Would you like to run Storybook on port ${port} instead?`, + }); + if (!shouldChangePort) { + process.exit(1); + } + } + + const rootDir = getProjectRoot(); + const cacheKey = oneWayHash(relative(rootDir, configDir)); + + const cacheOutputDir = resolvePathInStorybookCache('public', cacheKey); + let outputDir = resolve(options.outputDir || cacheOutputDir); + if (options.smokeTest) { + outputDir = cacheOutputDir; + } + + options.port = port; + options.versionCheck = versionCheck; + options.configType = 'DEVELOPMENT'; + options.configDir = configDir; + options.cacheKey = cacheKey; + options.outputDir = outputDir; + options.serverChannelUrl = getServerChannelUrl(port, options); + + const config = await loadMainConfig(options); + const { framework } = config; + const corePresets = []; + + let frameworkName = typeof framework === 'string' ? framework : framework?.name; + if (!options.ignorePreview) { + validateFrameworkName(frameworkName); + } + if (frameworkName) { + corePresets.push(join(frameworkName, 'preset')); + } + + frameworkName = frameworkName || 'custom'; + + // Load first pass: We need to determine the builder + // We need to do this because builders might introduce 'overridePresets' which we need to take into account + // We hope to remove this in SB8 + let presets = await loadAllPresets({ + corePresets, + overridePresets: [ + require.resolve('@storybook/core/core-server/presets/common-override-preset'), + ], + ...options, + isCritical: true, + }); + + const { renderer, builder, disableTelemetry } = await presets.apply('core', {}); + + if (!builder) { + throw new MissingBuilderError(); + } + + const builderName = typeof builder === 'string' ? builder : builder.name; + const [previewBuilder, managerBuilder] = await Promise.all([ + getPreviewBuilder(builderName, options.configDir), + getManagerBuilder(), + ]); + + const resolvedRenderer = renderer && resolveAddonName(options.configDir, renderer, options); + + // Load second pass: all presets are applied in order + presets = await loadAllPresets({ + corePresets: [ + require.resolve('@storybook/core/core-server/presets/common-preset'), + ...(managerBuilder.corePresets || []), + ...(previewBuilder.corePresets || []), + ...(resolvedRenderer ? [resolvedRenderer] : []), + ...corePresets, + ], + overridePresets: [ + ...(previewBuilder.overridePresets || []), + require.resolve('@storybook/core/core-server/presets/common-override-preset'), + ], + ...options, + }); + + const features = await presets.apply('features'); + global.FEATURES = features; + + const fullOptions: Options = { + ...options, + presets, + features, + }; + + return fullOptions; +} From 41a0c7a0fbab24b39b862330de312b3eb9284305 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 5 Dec 2024 13:36:34 +0100 Subject: [PATCH 06/25] cleanup --- 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 44454556e3eb..11c5917ba383 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -4,7 +4,6 @@ import { mergeConfig } from 'vitest/config'; import { getInterpretedFile, - loadAllPresets, normalizeStories, validateConfigurationFiles, } from 'storybook/internal/common'; From 6f48ea836b6149414cd0d3e9bc90ca5b0c4a54f8 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 5 Dec 2024 20:41:12 +0100 Subject: [PATCH 07/25] fix coverage+watch test --- .../react/e2e-tests/component-testing.spec.ts | 16 ++++++++++------ .../react/yarn.lock | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts index 9aa8751b60ca..e326620ef600 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts @@ -415,7 +415,7 @@ test.describe("component testing", () => { const storyElement = sbPage .getCanvasBodyElement() - .getByRole("button", { name: "test" }); + .getByRole("button", { name: "foo" }); await expect(storyElement).toBeVisible({ timeout: 30000 }); // Act - Enable coverage and run ALL tests @@ -437,10 +437,12 @@ test.describe("component testing", () => { // Arrange - Add uncovered lines to Button.tsx to force coverage to drop const initialButtonContent = (await fs.readFile(BUTTON_COMPONENT_PATH)).toString(); await fs.writeFile(BUTTON_COMPONENT_PATH, [initialButtonContent, - `export const uncovered = () => { - ${Array.from({ length: 300 }).map(() => 'void;').join('\n')} - };`].join('\n')); -//TODO: CLEANUP + `const voidFn = () => {}; + +export const uncovered = () => { + ${Array.from({ length: 300 }).map(() => 'voidFn();').join('\n ')} +};`].join('\n')); + // Act - Open sidebar context menu and start focused test await page.locator('[data-item-id="example-button--csf-3-primary"]').hover(); await page.locator('[data-item-id="example-button--csf-3-primary"] div[data-testid="context-menu"] button').click(); @@ -460,7 +462,7 @@ test.describe("component testing", () => { await page.getByLabel("Start Component tests").click(); // Arrange - Wait for tests to finish - await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText(/Ran \d{2,} tests/); + await expect(page.locator('#testing-module-description')).toContainText(/Ran \d{2,} tests/, { timeout: 30000 }); // Assert - Coverage percentage is updated to reflect the new coverage const updatedSbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); @@ -469,6 +471,8 @@ test.describe("component testing", () => { expect(updatedSbPercentage).toBeGreaterThanOrEqual(0); expect(updatedSbPercentage).toBeLessThan(firstSbPercentage); + // Cleanup - Remove uncovered lines from Button.tsx + await fs.writeFile(BUTTON_COMPONENT_PATH, initialButtonContent); }); }); diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index 6aeacc4f54b3..972244bee296 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -1853,7 +1853,7 @@ __metadata: "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": version: 8.5.0-alpha.17 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=769cd0&locator=portable-stories-react%40workspace%3A." + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=0b7853&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:^0.1.11" "@storybook/global": "npm:^5.0.0" @@ -1876,7 +1876,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/b78c23be02c5622a4ef5afc4229a92cd6cbe0c1bb60b739d7b2d823c6313db6f95642d5581ebee7fbf9b0f4da437cf88d97f5240901c1c5a98890edde6500396 + checksum: 10/a0daef8f8313e217ce54be97eced7e71d7442f876935df137624056202fe3facc2b1502f0540058a80def68abd1a3657ddcdd8a3bfd91e29ef439403a7c306e4 languageName: node linkType: hard From 269f1a2d49c8be6f5adb0e6a66e27969b9ae6f2d Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 5 Dec 2024 21:18:19 +0100 Subject: [PATCH 08/25] fix tests --- .../react/e2e-tests/component-testing.spec.ts | 105 +++++++++--------- 1 file changed, 53 insertions(+), 52 deletions(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts index e326620ef600..6b76638c669c 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts @@ -83,7 +83,7 @@ test.describe("component testing", () => { // Assert discrepancy: CLI pass + Browser fail const failingStoryElement = page.locator( - '[data-item-id="addons-test--mismatch-failure"] [role="status"]' + '[data-item-id="addons-group-test--mismatch-failure"] [role="status"]' ); await expect(failingStoryElement).toHaveAttribute( "aria-label", @@ -96,7 +96,7 @@ test.describe("component testing", () => { // Assert discrepancy: CLI fail + Browser pass await sbPage.navigateToStory("addons/group/test", "Mismatch Success"); const successfulStoryElement = page.locator( - '[data-item-id="addons-test--mismatch-success"] [role="status"]' + '[data-item-id="addons-group-test--mismatch-success"] [role="status"]' ); await expect(successfulStoryElement).toHaveAttribute( "aria-label", @@ -153,7 +153,7 @@ test.describe("component testing", () => { // Assert for expected success const successfulStoryElement = page.locator( - '[data-item-id="addons-test--expected-success"] [role="status"]' + '[data-item-id="addons-group-test--expected-success"] [role="status"]' ); await expect(successfulStoryElement).toHaveAttribute( "aria-label", @@ -162,7 +162,7 @@ test.describe("component testing", () => { // Assert for expected failure const failingStoryElement = page.locator( - '[data-item-id="addons-test--expected-failure"] [role="status"]' + '[data-item-id="addons-group-test--expected-failure"] [role="status"]' ); await expect(failingStoryElement).toHaveAttribute( "aria-label", @@ -175,7 +175,7 @@ test.describe("component testing", () => { const sidebarItems = page.locator( '.sidebar-item[data-ref-id="storybook_internal"][data-nodetype="component"]' ); - await expect(sidebarItems).toHaveCount(1); + await expect(sidebarItems).toHaveCount(2); }); test("should execute watch mode tests via testing module UI", async ({ @@ -210,7 +210,7 @@ test.describe("component testing", () => { // Assert for expected success const successfulStoryElement = page.locator( - '[data-item-id="addons-test--expected-success"] [role="status"]' + '[data-item-id="addons-group-test--expected-success"] [role="status"]' ); await expect(successfulStoryElement).toHaveAttribute( "aria-label", @@ -219,7 +219,7 @@ test.describe("component testing", () => { // Assert for expected failure const failingStoryElement = page.locator( - '[data-item-id="addons-test--expected-failure"] [role="status"]' + '[data-item-id="addons-group-test--expected-failure"] [role="status"]' ); await expect(failingStoryElement).toHaveAttribute( "aria-label", @@ -287,6 +287,8 @@ test.describe("component testing", () => { expect(Math.round(htmlPercentage)).toBe(sbPercentage); // Cleanup - Disable coverage again + await page.goBack(); + await expandButton.click(); await page.getByLabel("Open settings for Component tests").click(); await page.getByLabel("Coverage").click(); await expect(page.getByText("Settings updated")).toBeVisible({ timeout: 3000 }); @@ -318,7 +320,6 @@ test.describe("component testing", () => { await sidebarContextMenu.getByLabel('Start Component tests').click(); // Assert - Only one test is running and reported - await expect(sidebarContextMenu.locator('#testing-module-description')).toHaveText('Testing... 0/1'); await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test'); await expect(sidebarContextMenu.getByLabel('status: passed')).toHaveCount(1); await page.click('body'); @@ -351,15 +352,14 @@ test.describe("component testing", () => { await sidebarContextMenu.getByLabel('Start Component tests').click(); // Assert - 5 tests are running and reported - await expect(sidebarContextMenu.locator('#testing-module-description')).toHaveText('Testing... 0/5'); - await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 5 test'); + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 6 test'); // Assert - 1 failing test shows as a failed status - await expect(sidebarContextMenu.getByText('1 story with errors')).toBeVisible(); + await expect(sidebarContextMenu.getByText('2 stories with errors')).toBeVisible(); await expect(sidebarContextMenu.getByLabel('status: failed')).toHaveCount(1); await page.click('body'); await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(4); - await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(1); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(2); }); test("should run focused test for a group", async ({ @@ -388,15 +388,14 @@ test.describe("component testing", () => { await sidebarContextMenu.getByLabel('Start Component tests').click(); // Assert - 5 tests are running and reported - await expect(sidebarContextMenu.locator('#testing-module-description')).toHaveText('Testing... 0/7'); - await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 7 test'); + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 8 test', { timeout: 30000 }); // Assert - 1 failing test shows as a failed status - await expect(sidebarContextMenu.getByText('2 story with errors')).toBeVisible(); + await expect(sidebarContextMenu.getByText('3 stories with errors')).toBeVisible(); await expect(sidebarContextMenu.getByLabel('status: failed')).toHaveCount(1); await page.click('body'); await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(4); - await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(1); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(2); }); test("should run focused tests without coverage, even when enabled", async ({ @@ -436,43 +435,45 @@ test.describe("component testing", () => { // Arrange - Add uncovered lines to Button.tsx to force coverage to drop const initialButtonContent = (await fs.readFile(BUTTON_COMPONENT_PATH)).toString(); - await fs.writeFile(BUTTON_COMPONENT_PATH, [initialButtonContent, - `const voidFn = () => {}; - -export const uncovered = () => { + try { + await fs.writeFile(BUTTON_COMPONENT_PATH, [initialButtonContent, + `const voidFn = () => {}; + + export const uncovered = () => { ${Array.from({ length: 300 }).map(() => 'voidFn();').join('\n ')} -};`].join('\n')); - - // Act - Open sidebar context menu and start focused test - await page.locator('[data-item-id="example-button--csf-3-primary"]').hover(); - await page.locator('[data-item-id="example-button--csf-3-primary"] div[data-testid="context-menu"] button').click(); - const sidebarContextMenu = page.getByTestId('tooltip'); - await sidebarContextMenu.getByLabel('Start Component tests').click(); - - // Arrange - Wait for test to finish and unfocus sidebar context menu - await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test'); - await page.click('body'); - - // Assert - Coverage percentage is unchanged - console.log('LOG: firstSbPercentageText', firstSbPercentageText); - console.log('LOG: secondSbPercentageText', await page.getByLabel(/percent coverage$/).textContent()); - expect(await page.getByLabel(/percent coverage$/).textContent()).toEqual(firstSbPercentageText); - - // Act - Run ALL tests again - await page.getByLabel("Start Component tests").click(); - - // Arrange - Wait for tests to finish - await expect(page.locator('#testing-module-description')).toContainText(/Ran \d{2,} tests/, { timeout: 30000 }); - - // Assert - Coverage percentage is updated to reflect the new coverage - const updatedSbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); - expect(updatedSbPercentageText).toMatch(/^\d+\s%$/); - const updatedSbPercentage = Number.parseInt(updatedSbPercentageText!.replace(' %', '') ?? ''); - expect(updatedSbPercentage).toBeGreaterThanOrEqual(0); - expect(updatedSbPercentage).toBeLessThan(firstSbPercentage); - - // Cleanup - Remove uncovered lines from Button.tsx - await fs.writeFile(BUTTON_COMPONENT_PATH, initialButtonContent); + };`].join('\n')); + + // Act - Open sidebar context menu and start focused test + await page.locator('[data-item-id="example-button--csf-3-primary"]').hover(); + await page.locator('[data-item-id="example-button--csf-3-primary"] div[data-testid="context-menu"] button').click(); + const sidebarContextMenu = page.getByTestId('tooltip'); + await sidebarContextMenu.getByLabel('Start Component tests').click(); + + // Arrange - Wait for test to finish and unfocus sidebar context menu + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test', { timeout: 30000 }); + await page.click('body'); + + // Assert - Coverage percentage is unchanged + console.log('LOG: firstSbPercentageText', firstSbPercentageText); + console.log('LOG: secondSbPercentageText', await page.getByLabel(/percent coverage$/).textContent()); + expect(await page.getByLabel(/percent coverage$/).textContent()).toEqual(firstSbPercentageText); + + // Act - Run ALL tests again + await page.getByLabel("Start Component tests").click(); + + // Arrange - Wait for tests to finish + await expect(page.locator('#testing-module-description')).toContainText(/Ran \d{2,} tests/, { timeout: 30000 }); + + // Assert - Coverage percentage is updated to reflect the new coverage + const updatedSbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); + expect(updatedSbPercentageText).toMatch(/^\d+\s%$/); + const updatedSbPercentage = Number.parseInt(updatedSbPercentageText!.replace(' %', '') ?? ''); + expect(updatedSbPercentage).toBeGreaterThanOrEqual(0); + expect(updatedSbPercentage).toBeLessThan(firstSbPercentage); + } finally { + // Cleanup - Remove uncovered lines from Button.tsx + await fs.writeFile(BUTTON_COMPONENT_PATH, initialButtonContent); + } }); }); From bc5235755602ffc358e5aabf815f7f3025bdacd2 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 5 Dec 2024 21:32:15 +0100 Subject: [PATCH 09/25] fix story types --- .../react/stories/AddonTest.stories.tsx | 21 +++++++++---------- .../react/stories/OtherComponent.stories.tsx | 17 ++++++++------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx b/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx index 8a61b2b89f1d..14c5835a11c1 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx +++ b/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx @@ -1,7 +1,6 @@ import { expect } from '@storybook/test'; import { Meta, type StoryObj } from '@storybook/react' import { instrument } from '@storybook/instrumenter' -import type { StoryAnnotations } from 'storybook/internal/types'; declare global { // eslint-disable-next-line no-var @@ -23,7 +22,7 @@ const { pass } = instrument({ pass: async () => {}, }, { intercept: true }) -export const ExpectedFailure = { +export const ExpectedFailure: Story = { args: { forceFailure: false, }, @@ -33,30 +32,30 @@ export const ExpectedFailure = { throw new Error('Expected failure'); } } -} satisfies StoryAnnotations; +}; -export const ExpectedSuccess = { +export const ExpectedSuccess: Story = { play: async () => { await pass(); } -} satisfies StoryAnnotations; +}; -export const LongRunning = { +export const LongRunning: Story = { loaders: [async () => new Promise((resolve) => setTimeout(resolve, 800))], -} satisfies StoryAnnotations; +}; // Tests will pass in browser, but fail in CLI -export const MismatchFailure = { +export const MismatchFailure: Story = { play: async () => { await pass(); if(!globalThis.__vitest_browser__) { throw new Error('Expected failure'); } } -} satisfies StoryAnnotations; +}; // Tests will fail in browser, but pass in CLI -export const MismatchSuccess = { +export const MismatchSuccess: Story = { play: async () => { await pass(); if(globalThis.__vitest_browser__) { @@ -64,7 +63,7 @@ export const MismatchSuccess = { } }, tags: ['fail-on-purpose'], -} satisfies StoryAnnotations; +}; export const PreviewHeadTest: Story = { play: async () => { diff --git a/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx b/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx index 98ef7e00065a..e96da836ecd2 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx +++ b/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx @@ -1,5 +1,4 @@ -import { Meta } from '@storybook/react' -import type { StoryAnnotations } from 'storybook/internal/types'; +import { Meta, type StoryObj } from '@storybook/react' declare global { // eslint-disable-next-line no-var @@ -8,17 +7,21 @@ declare global { const Component = () => -export default { +const meta = { title: 'Addons/Group/Other', component: Component, } as Meta; -export const Passes = { -} satisfies StoryAnnotations; +export default meta; -export const Fails = { +type Story = StoryObj; + +export const Passes: Story = { +}; + +export const Fails: Story = { play: async () => { throw new Error('Expected failure'); }, tags: ['fail-on-purpose'], -} satisfies StoryAnnotations; +}; From 87fa9ba1d37da326b5988b01b8b75954a83d30f5 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 5 Dec 2024 21:34:00 +0100 Subject: [PATCH 10/25] better comments --- .../react/e2e-tests/component-testing.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts index 6b76638c669c..3af1ed632739 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts @@ -453,7 +453,7 @@ test.describe("component testing", () => { await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test', { timeout: 30000 }); await page.click('body'); - // Assert - Coverage percentage is unchanged + // Assert - Coverage percentage is unchanged because Focused Tests shouldn't collect coverage console.log('LOG: firstSbPercentageText', firstSbPercentageText); console.log('LOG: secondSbPercentageText', await page.getByLabel(/percent coverage$/).textContent()); expect(await page.getByLabel(/percent coverage$/).textContent()).toEqual(firstSbPercentageText); @@ -464,7 +464,7 @@ test.describe("component testing", () => { // Arrange - Wait for tests to finish await expect(page.locator('#testing-module-description')).toContainText(/Ran \d{2,} tests/, { timeout: 30000 }); - // Assert - Coverage percentage is updated to reflect the new coverage + // Assert - Coverage percentage is now updated because running all tests automatically re-enables coverage const updatedSbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); expect(updatedSbPercentageText).toMatch(/^\d+\s%$/); const updatedSbPercentage = Number.parseInt(updatedSbPercentageText!.replace(' %', '') ?? ''); From 23f496718b96275cba25d7f783c007ffb7036f2a Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 5 Dec 2024 21:35:39 +0100 Subject: [PATCH 11/25] add non-failing-vitest to ci --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 550dc9e6b994..f3b36dbc216f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -757,6 +757,10 @@ jobs: name: Run E2E tests command: yarn playwright-e2e working_directory: test-storybooks/portable-stories-kitchen-sink/react + - run: + name: Run Vitest + command: yarn vitest-non-failing-tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react - store_test_results: path: test-results - store_artifacts: From d1441aadb8f5c249ae9d9cac4e966d6f11504df7 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 6 Dec 2024 12:51:41 +0100 Subject: [PATCH 12/25] fix vitest/ui dep --- .../portable-stories-kitchen-sink/react/package.json | 2 +- .../portable-stories-kitchen-sink/react/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/package.json b/test-storybooks/portable-stories-kitchen-sink/react/package.json index e7d4dae6cd83..36a84a8515e2 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react/package.json @@ -111,7 +111,7 @@ "@vitejs/plugin-react": "^4.2.1", "@vitest/browser": "^2.1.6", "@vitest/coverage-v8": "^2.1.6", - "@vitest/ui": "2.1.8", + "@vitest/ui": "^2.1.6", "cypress": "^13.6.4", "eslint": "^8.56.0", "eslint-plugin-react-hooks": "^4.6.0", diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index 972244bee296..803ba3f2e727 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -1853,7 +1853,7 @@ __metadata: "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": version: 8.5.0-alpha.17 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=0b7853&locator=portable-stories-react%40workspace%3A." + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=939a10&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:^0.1.11" "@storybook/global": "npm:^5.0.0" @@ -1876,7 +1876,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/a0daef8f8313e217ce54be97eced7e71d7442f876935df137624056202fe3facc2b1502f0540058a80def68abd1a3657ddcdd8a3bfd91e29ef439403a7c306e4 + checksum: 10/2213e98cd698c288428388880ea3cc04ca3722225ae4c2855621326e7770756982b45f7648007e7319773f322d771293ff56c22cf39f6abd517f2ae6b7e5c746 languageName: node linkType: hard @@ -2846,7 +2846,7 @@ __metadata: languageName: node linkType: hard -"@vitest/ui@npm:2.1.8": +"@vitest/ui@npm:^2.1.6": version: 2.1.8 resolution: "@vitest/ui@npm:2.1.8" dependencies: @@ -7475,7 +7475,7 @@ __metadata: "@vitejs/plugin-react": "npm:^4.2.1" "@vitest/browser": "npm:^2.1.6" "@vitest/coverage-v8": "npm:^2.1.6" - "@vitest/ui": "npm:2.1.8" + "@vitest/ui": "npm:^2.1.6" cypress: "npm:^13.6.4" eslint: "npm:^8.56.0" eslint-plugin-react-hooks: "npm:^4.6.0" From b5b65b071479a8d68cd97b2d93c73d31422f5736 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 6 Dec 2024 13:18:51 +0100 Subject: [PATCH 13/25] simplify coverage+focus test --- .../react/e2e-tests/component-testing.spec.ts | 77 +++++++------------ .../react/yarn.lock | 4 +- 2 files changed, 29 insertions(+), 52 deletions(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts index 3af1ed632739..b413a9f3a834 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts @@ -320,7 +320,7 @@ test.describe("component testing", () => { await sidebarContextMenu.getByLabel('Start Component tests').click(); // Assert - Only one test is running and reported - await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test'); + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test', { timeout: 30000 }); await expect(sidebarContextMenu.getByLabel('status: passed')).toHaveCount(1); await page.click('body'); await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(1); @@ -352,7 +352,7 @@ test.describe("component testing", () => { await sidebarContextMenu.getByLabel('Start Component tests').click(); // Assert - 5 tests are running and reported - await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 6 test'); + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 6 test', { timeout: 30000 }); // Assert - 1 failing test shows as a failed status await expect(sidebarContextMenu.getByText('2 stories with errors')).toBeVisible(); await expect(sidebarContextMenu.getByLabel('status: failed')).toHaveCount(1); @@ -417,7 +417,7 @@ test.describe("component testing", () => { .getByRole("button", { name: "foo" }); await expect(storyElement).toBeVisible({ timeout: 30000 }); - // Act - Enable coverage and run ALL tests + // Act - Enable coverage await page.getByLabel("Open settings for Component tests").click(); await page.getByLabel("Coverage").click(); await expect(page.getByText("Settings updated")).toBeVisible({ timeout: 3000 }); @@ -425,55 +425,32 @@ test.describe("component testing", () => { // Wait for Vitest to have (re)started await page.waitForTimeout(2000); + // Act - Open sidebar context menu and start focused test + await page.locator('[data-item-id="example-button--csf-3-primary"]').hover(); + await page.locator('[data-item-id="example-button--csf-3-primary"] div[data-testid="context-menu"] button').click(); + const sidebarContextMenu = page.getByTestId('tooltip'); + await sidebarContextMenu.getByLabel('Start Component tests').click(); + + // Arrange - Wait for test to finish and unfocus sidebar context menu + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test', { timeout: 30000 }); + await page.click('body'); + + // Assert - Coverage is not shown because Focused Tests shouldn't collect coverage + await expect(page.getByLabel("Open coverage report")).not.toBeVisible(); + + // Act - Run ALL tests await page.getByLabel("Start Component tests").click(); - - // Assert - Coverage report is collected and shown + + // Arrange - Wait for tests to finish + await expect(page.locator('#testing-module-description')).toContainText(/Ran \d{2,} tests/, { timeout: 30000 }); + + // Assert - Coverage percentage is now collected and shown because running all tests automatically re-enables coverage await expect(page.getByLabel("Open coverage report")).toBeVisible({ timeout: 30000 }); - const firstSbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); - expect(firstSbPercentageText).toMatch(/^\d+\s%$/); - const firstSbPercentage = Number.parseInt(firstSbPercentageText!.replace(' %', '') ?? ''); - - // Arrange - Add uncovered lines to Button.tsx to force coverage to drop - const initialButtonContent = (await fs.readFile(BUTTON_COMPONENT_PATH)).toString(); - try { - await fs.writeFile(BUTTON_COMPONENT_PATH, [initialButtonContent, - `const voidFn = () => {}; - - export const uncovered = () => { - ${Array.from({ length: 300 }).map(() => 'voidFn();').join('\n ')} - };`].join('\n')); - - // Act - Open sidebar context menu and start focused test - await page.locator('[data-item-id="example-button--csf-3-primary"]').hover(); - await page.locator('[data-item-id="example-button--csf-3-primary"] div[data-testid="context-menu"] button').click(); - const sidebarContextMenu = page.getByTestId('tooltip'); - await sidebarContextMenu.getByLabel('Start Component tests').click(); - - // Arrange - Wait for test to finish and unfocus sidebar context menu - await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 1 test', { timeout: 30000 }); - await page.click('body'); - - // Assert - Coverage percentage is unchanged because Focused Tests shouldn't collect coverage - console.log('LOG: firstSbPercentageText', firstSbPercentageText); - console.log('LOG: secondSbPercentageText', await page.getByLabel(/percent coverage$/).textContent()); - expect(await page.getByLabel(/percent coverage$/).textContent()).toEqual(firstSbPercentageText); - - // Act - Run ALL tests again - await page.getByLabel("Start Component tests").click(); - - // Arrange - Wait for tests to finish - await expect(page.locator('#testing-module-description')).toContainText(/Ran \d{2,} tests/, { timeout: 30000 }); - - // Assert - Coverage percentage is now updated because running all tests automatically re-enables coverage - const updatedSbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); - expect(updatedSbPercentageText).toMatch(/^\d+\s%$/); - const updatedSbPercentage = Number.parseInt(updatedSbPercentageText!.replace(' %', '') ?? ''); - expect(updatedSbPercentage).toBeGreaterThanOrEqual(0); - expect(updatedSbPercentage).toBeLessThan(firstSbPercentage); - } finally { - // Cleanup - Remove uncovered lines from Button.tsx - await fs.writeFile(BUTTON_COMPONENT_PATH, initialButtonContent); - } + const sbPercentageText = await page.getByLabel(/percent coverage$/).textContent(); + expect(sbPercentageText).toMatch(/^\d+\s%$/); + const sbPercentage = Number.parseInt(sbPercentageText!.replace(' %', '') ?? ''); + expect(sbPercentage).toBeGreaterThanOrEqual(0); + expect(sbPercentage).toBeLessThanOrEqual(100); }); }); diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index 803ba3f2e727..4a6ec1318240 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -1853,7 +1853,7 @@ __metadata: "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": version: 8.5.0-alpha.17 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=939a10&locator=portable-stories-react%40workspace%3A." + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=9e5f6a&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:^0.1.11" "@storybook/global": "npm:^5.0.0" @@ -1876,7 +1876,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/2213e98cd698c288428388880ea3cc04ca3722225ae4c2855621326e7770756982b45f7648007e7319773f322d771293ff56c22cf39f6abd517f2ae6b7e5c746 + checksum: 10/73f733600a22ab37cea12e80aa69d42933ff6f75c36306b4d09e7887ba31aeeb35bc6af1fd37fbbfa1f9003d65d4413ed67f49851d899a5f13e5178260570103 languageName: node linkType: hard From 1b86bf39bfdd92050ce9bc0568756562a66f3d44 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 6 Dec 2024 13:29:05 +0100 Subject: [PATCH 14/25] revert vitest upgrades --- code/addons/test/package.json | 10 +- code/lib/instrumenter/package.json | 4 +- code/lib/test/package.json | 6 +- code/package.json | 10 +- code/yarn.lock | 112 +++++++++++------- scripts/package.json | 5 +- scripts/yarn.lock | 8 ++ .../react/package.json | 9 +- .../react/yarn.lock | 81 ++++++------- 9 files changed, 142 insertions(+), 103 deletions(-) diff --git a/code/addons/test/package.json b/code/addons/test/package.json index 4941f6cc58e1..cd7a737260b7 100644 --- a/code/addons/test/package.json +++ b/code/addons/test/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/experimental-addon-test", - "version": "8.5.0-alpha.17", + "version": "8.5.0-alpha.18", "description": "Integrate Vitest with Storybook", "keywords": [ "storybook-addons", @@ -95,15 +95,14 @@ "@types/istanbul-lib-report": "^3.0.3", "@types/node": "^22.0.0", "@types/semver": "^7", - "@vitest/browser": "^2.1.6", - "@vitest/runner": "^2.1.6", + "@vitest/browser": "^2.1.3", + "@vitest/runner": "^2.1.3", "ansi-to-html": "^0.7.2", "boxen": "^8.0.1", "es-toolkit": "^1.22.0", "execa": "^8.0.1", "find-up": "^7.0.0", "formik": "^2.2.9", - "glob": "^10.0.0", "istanbul-lib-report": "^3.0.1", "pathe": "^1.1.2", "picocolors": "^1.1.0", @@ -112,9 +111,10 @@ "semver": "^7.6.3", "slash": "^5.0.0", "strip-ansi": "^7.1.0", + "tinyglobby": "^0.2.10", "ts-dedent": "^2.2.0", "typescript": "^5.3.2", - "vitest": "^2.1.6" + "vitest": "^2.1.3" }, "peerDependencies": { "@vitest/browser": "^2.1.1", diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index 612bf908b6d8..a987140baea3 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/instrumenter", - "version": "8.5.0-alpha.17", + "version": "8.5.0-alpha.18", "description": "", "keywords": [ "storybook" @@ -44,7 +44,7 @@ }, "dependencies": { "@storybook/global": "^5.0.0", - "@vitest/utils": "^2.1.6" + "@vitest/utils": "^2.1.1" }, "devDependencies": { "typescript": "^5.3.2" diff --git a/code/lib/test/package.json b/code/lib/test/package.json index c0c821e62da7..6d044f1b8708 100644 --- a/code/lib/test/package.json +++ b/code/lib/test/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/test", - "version": "8.5.0-alpha.17", + "version": "8.5.0-alpha.18", "description": "", "keywords": [ "storybook" @@ -49,8 +49,8 @@ "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.5.0", "@testing-library/user-event": "14.5.2", - "@vitest/expect": "2.1.6", - "@vitest/spy": "2.1.6" + "@vitest/expect": "2.0.5", + "@vitest/spy": "2.0.5" }, "devDependencies": { "chai": "^5.1.1", diff --git a/code/package.json b/code/package.json index e0c603654a65..5cac1d039ea0 100644 --- a/code/package.json +++ b/code/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/root", - "version": "8.5.0-alpha.17", + "version": "8.5.0-alpha.18", "private": true, "description": "Storybook root", "homepage": "https://storybook.js.org/", @@ -178,9 +178,9 @@ "@typescript-eslint/parser": "^6.18.1", "@vitejs/plugin-react": "^4.3.2", "@vitejs/plugin-vue": "^4.4.0", - "@vitest/browser": "^2.1.6", - "@vitest/coverage-istanbul": "^2.1.6", - "@vitest/coverage-v8": "^2.1.6", + "@vitest/browser": "^2.1.3", + "@vitest/coverage-istanbul": "^2.1.3", + "@vitest/coverage-v8": "^2.1.3", "create-storybook": "workspace:*", "cross-env": "^7.0.3", "danger": "^12.3.3", @@ -221,7 +221,7 @@ "util": "^0.12.4", "vite": "^4.0.0", "vite-plugin-inspect": "^0.8.5", - "vitest": "^2.1.6", + "vitest": "^2.1.3", "wait-on": "^7.0.1" }, "dependenciesMeta": { diff --git a/code/yarn.lock b/code/yarn.lock index 7814cfa6cc79..f9dba44953be 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6613,15 +6613,14 @@ __metadata: "@types/istanbul-lib-report": "npm:^3.0.3" "@types/node": "npm:^22.0.0" "@types/semver": "npm:^7" - "@vitest/browser": "npm:^2.1.6" - "@vitest/runner": "npm:^2.1.6" + "@vitest/browser": "npm:^2.1.3" + "@vitest/runner": "npm:^2.1.3" ansi-to-html: "npm:^0.7.2" boxen: "npm:^8.0.1" es-toolkit: "npm:^1.22.0" execa: "npm:^8.0.1" find-up: "npm:^7.0.0" formik: "npm:^2.2.9" - glob: "npm:^10.0.0" istanbul-lib-report: "npm:^3.0.1" pathe: "npm:^1.1.2" picocolors: "npm:^1.1.0" @@ -6632,9 +6631,10 @@ __metadata: semver: "npm:^7.6.3" slash: "npm:^5.0.0" strip-ansi: "npm:^7.1.0" + tinyglobby: "npm:^0.2.10" ts-dedent: "npm:^2.2.0" typescript: "npm:^5.3.2" - vitest: "npm:^2.1.6" + vitest: "npm:^2.1.3" peerDependencies: "@vitest/browser": ^2.1.1 "@vitest/runner": ^2.1.1 @@ -6756,7 +6756,7 @@ __metadata: resolution: "@storybook/instrumenter@workspace:lib/instrumenter" dependencies: "@storybook/global": "npm:^5.0.0" - "@vitest/utils": "npm:^2.1.6" + "@vitest/utils": "npm:^2.1.1" typescript: "npm:^5.3.2" peerDependencies: storybook: "workspace:^" @@ -7311,9 +7311,9 @@ __metadata: "@typescript-eslint/parser": "npm:^6.18.1" "@vitejs/plugin-react": "npm:^4.3.2" "@vitejs/plugin-vue": "npm:^4.4.0" - "@vitest/browser": "npm:^2.1.6" - "@vitest/coverage-istanbul": "npm:^2.1.6" - "@vitest/coverage-v8": "npm:^2.1.6" + "@vitest/browser": "npm:^2.1.3" + "@vitest/coverage-istanbul": "npm:^2.1.3" + "@vitest/coverage-v8": "npm:^2.1.3" create-storybook: "workspace:*" cross-env: "npm:^7.0.3" danger: "npm:^12.3.3" @@ -7354,7 +7354,7 @@ __metadata: util: "npm:^0.12.4" vite: "npm:^4.0.0" vite-plugin-inspect: "npm:^0.8.5" - vitest: "npm:^2.1.6" + vitest: "npm:^2.1.3" wait-on: "npm:^7.0.1" dependenciesMeta: ejs: @@ -7539,8 +7539,8 @@ __metadata: "@testing-library/dom": "npm:10.4.0" "@testing-library/jest-dom": "npm:6.5.0" "@testing-library/user-event": "npm:14.5.2" - "@vitest/expect": "npm:2.1.6" - "@vitest/spy": "npm:2.1.6" + "@vitest/expect": "npm:2.0.5" + "@vitest/spy": "npm:2.0.5" chai: "npm:^5.1.1" tinyspy: "npm:^3.0.0" ts-dedent: "npm:^2.2.0" @@ -9165,7 +9165,7 @@ __metadata: languageName: node linkType: hard -"@vitest/browser@npm:^2.1.6": +"@vitest/browser@npm:^2.1.3": version: 2.1.8 resolution: "@vitest/browser@npm:2.1.8" dependencies: @@ -9193,7 +9193,7 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-istanbul@npm:^2.1.6": +"@vitest/coverage-istanbul@npm:^2.1.3": version: 2.1.8 resolution: "@vitest/coverage-istanbul@npm:2.1.8" dependencies: @@ -9213,7 +9213,7 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-v8@npm:^2.1.6": +"@vitest/coverage-v8@npm:^2.1.3": version: 2.1.8 resolution: "@vitest/coverage-v8@npm:2.1.8" dependencies: @@ -9239,15 +9239,15 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:2.1.6": - version: 2.1.6 - resolution: "@vitest/expect@npm:2.1.6" +"@vitest/expect@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/expect@npm:2.0.5" dependencies: - "@vitest/spy": "npm:2.1.6" - "@vitest/utils": "npm:2.1.6" - chai: "npm:^5.1.2" + "@vitest/spy": "npm:2.0.5" + "@vitest/utils": "npm:2.0.5" + chai: "npm:^5.1.1" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/86327692f03b2ec6895486b118f25e1a141749c31ba671d253da4e33cf81db81f40755198ac9b46616155a8b74765d0ab15b8080041dbe139c83a9a0690004a2 + checksum: 10c0/08cb1b0f106d16a5b60db733e3d436fa5eefc68571488eb570dfe4f599f214ab52e4342273b03dbe12331cc6c0cdc325ac6c94f651ad254cd62f3aa0e3d185aa languageName: node linkType: hard @@ -9263,6 +9263,18 @@ __metadata: languageName: node linkType: hard +"@vitest/expect@patch:@vitest/expect@npm%3A2.0.5#~/.yarn/patches/@vitest-expect-npm-2.0.5-8933466cce.patch": + version: 2.0.5 + resolution: "@vitest/expect@patch:@vitest/expect@npm%3A2.0.5#~/.yarn/patches/@vitest-expect-npm-2.0.5-8933466cce.patch::version=2.0.5&hash=368591" + dependencies: + "@vitest/spy": "npm:2.0.5" + "@vitest/utils": "npm:2.0.5" + chai: "npm:^5.1.1" + tinyrainbow: "npm:^1.2.0" + checksum: 10c0/0834adbe2c7094277adf3a45aa20fece84ca3b381fb3fe118fa424d2d490f20d0365c57dcaf845b413e583e36118f2815afa34bd175e305d6169c947e29576c3 + languageName: node + linkType: hard + "@vitest/mocker@npm:2.1.8": version: 2.1.8 resolution: "@vitest/mocker@npm:2.1.8" @@ -9282,12 +9294,12 @@ __metadata: languageName: node linkType: hard -"@vitest/pretty-format@npm:2.1.6": - version: 2.1.6 - resolution: "@vitest/pretty-format@npm:2.1.6" +"@vitest/pretty-format@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/pretty-format@npm:2.0.5" dependencies: tinyrainbow: "npm:^1.2.0" - checksum: 10c0/5c82496e5816c0c388bbe18a88ed01b39f5492aaa8e0df90868a65a50ee135105da367e58b4a0bed0dc67201c0518c451a32a5d9b81f56665b76b1c75c550686 + checksum: 10c0/236c0798c5170a0b5ad5d4bd06118533738e820b4dd30079d8fbcb15baee949d41c60f42a9f769906c4a5ce366d7ef11279546070646c0efc03128c220c31f37 languageName: node linkType: hard @@ -9300,7 +9312,7 @@ __metadata: languageName: node linkType: hard -"@vitest/runner@npm:2.1.8, @vitest/runner@npm:^2.1.6": +"@vitest/runner@npm:2.1.8, @vitest/runner@npm:^2.1.3": version: 2.1.8 resolution: "@vitest/runner@npm:2.1.8" dependencies: @@ -9321,12 +9333,12 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:2.1.6": - version: 2.1.6 - resolution: "@vitest/spy@npm:2.1.6" +"@vitest/spy@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/spy@npm:2.0.5" dependencies: - tinyspy: "npm:^3.0.2" - checksum: 10c0/4d3e965f9096968125dd4f53a66a8afd7a105852a41bd36865288bef5b6a79f3ec6f2056cc1c7be5a0afb2cd86b3b83e354451f452bf049ddd4516005a748f6f + tinyspy: "npm:^3.0.0" + checksum: 10c0/70634c21921eb271b54d2986c21d7ab6896a31c0f4f1d266940c9bafb8ac36237846d6736638cbf18b958bd98e5261b158a6944352742accfde50b7818ff655e languageName: node linkType: hard @@ -9339,18 +9351,19 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:2.1.6": - version: 2.1.6 - resolution: "@vitest/utils@npm:2.1.6" +"@vitest/utils@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/utils@npm:2.0.5" dependencies: - "@vitest/pretty-format": "npm:2.1.6" - loupe: "npm:^3.1.2" + "@vitest/pretty-format": "npm:2.0.5" + estree-walker: "npm:^3.0.3" + loupe: "npm:^3.1.1" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/1ec077b9707ec627075348f1a98687c7bb2fcbf9edf6e73dea6842c328d0d51a33663d22679e2a90a75f45afca9246f8fa3ea452447f474ae9d5f4eca4023b91 + checksum: 10c0/0d1de748298f07a50281e1ba058b05dcd58da3280c14e6f016265e950bd79adab6b97822de8f0ea82d3070f585654801a9b1bcf26db4372e51cf7746bf86d73b languageName: node linkType: hard -"@vitest/utils@npm:2.1.8, @vitest/utils@npm:^2.1.6": +"@vitest/utils@npm:2.1.8, @vitest/utils@npm:^2.1.1": version: 2.1.8 resolution: "@vitest/utils@npm:2.1.8" dependencies: @@ -15754,7 +15767,7 @@ __metadata: languageName: node linkType: hard -"fdir@npm:^6.2.0": +"fdir@npm:^6.2.0, fdir@npm:^6.4.2": version: 6.4.2 resolution: "fdir@npm:6.4.2" peerDependencies: @@ -19853,7 +19866,7 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^3.1.2": +"loupe@npm:^3.1.1, loupe@npm:^3.1.2": version: 3.1.2 resolution: "loupe@npm:3.1.2" checksum: 10c0/b13c02e3ddd6a9d5f8bf84133b3242de556512d824dddeea71cce2dbd6579c8f4d672381c4e742d45cf4423d0701765b4a6e5fbc24701def16bc2b40f8daa96a @@ -23203,6 +23216,13 @@ __metadata: languageName: node linkType: hard +"picomatch@npm:^4.0.2": + version: 4.0.2 + resolution: "picomatch@npm:4.0.2" + checksum: 10c0/7c51f3ad2bb42c776f49ebf964c644958158be30d0a510efd5a395e8d49cb5acfed5b82c0c5b365523ce18e6ab85013c9ebe574f60305892ec3fa8eee8304ccc + languageName: node + linkType: hard + "picoquery@npm:^1.4.0": version: 1.4.0 resolution: "picoquery@npm:1.4.0" @@ -27725,6 +27745,16 @@ __metadata: languageName: node linkType: hard +"tinyglobby@npm:^0.2.10": + version: 0.2.10 + resolution: "tinyglobby@npm:0.2.10" + dependencies: + fdir: "npm:^6.4.2" + picomatch: "npm:^4.0.2" + checksum: 10c0/ce946135d39b8c0e394e488ad59f4092e8c4ecd675ef1bcd4585c47de1b325e61ec6adfbfbe20c3c2bfa6fd674c5b06de2a2e65c433f752ae170aff11793e5ef + languageName: node + linkType: hard + "tinypool@npm:^1.0.1": version: 1.0.2 resolution: "tinypool@npm:1.0.2" @@ -29288,7 +29318,7 @@ __metadata: languageName: node linkType: hard -"vitest@npm:^2.1.6": +"vitest@npm:^2.1.3": version: 2.1.8 resolution: "vitest@npm:2.1.8" dependencies: diff --git a/scripts/package.json b/scripts/package.json index 51c1ac2feac5..ae72fcc9783a 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -94,7 +94,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.6", + "@vitest/coverage-v8": "^2.1.3", "ansi-regex": "^6.0.1", "browser-assert": "^1.2.1", "chromatic": "^11.5.5", @@ -105,6 +105,7 @@ "danger": "^12.3.3", "dataloader": "^2.2.2", "detect-port": "^1.6.1", + "diff-match-patch-es": "^0.1.0", "ejs": "^3.1.10", "ejs-lint": "^2.0.0", "es-toolkit": "^1.22.0", @@ -183,7 +184,7 @@ "typescript": "^5.4.5", "util": "^0.12.5", "uuid": "^9.0.1", - "vitest": "^2.1.6", + "vitest": "^2.1.3", "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 015159a4b042..7a65f725641c 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -1589,6 +1589,7 @@ __metadata: danger: "npm:^12.3.3" dataloader: "npm:^2.2.2" detect-port: "npm:^1.6.1" + diff-match-patch-es: "npm:^0.1.0" ejs: "npm:^3.1.10" ejs-lint: "npm:^2.0.0" es-toolkit: "npm:^1.22.0" @@ -4828,6 +4829,13 @@ __metadata: languageName: node linkType: hard +"diff-match-patch-es@npm:^0.1.0": + version: 0.1.1 + resolution: "diff-match-patch-es@npm:0.1.1" + checksum: 10c0/8bb602081c7bdefb1e2c5c346e7fb1f476a23a4accf6b6cf8d38ae6ed4f928ba3a87edb54dd517652ec0c813c95768da417ea9eea2c7098381d4e1265d5fecd0 + languageName: node + linkType: hard + "diff-sequences@npm:^29.6.3": version: 29.6.3 resolution: "diff-sequences@npm:29.6.3" diff --git a/test-storybooks/portable-stories-kitchen-sink/react/package.json b/test-storybooks/portable-stories-kitchen-sink/react/package.json index 36a84a8515e2..e967dc746362 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react/package.json @@ -11,7 +11,6 @@ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "playwright-ct": "playwright test -c playwright-ct.config.ts", "playwright-e2e": "playwright test -c playwright-e2e.config.ts", - "vitest-non-failing-tests": "SKIP_FAIL_ON_PURPOSE=true vitest run", "preview": "vite preview", "storybook": "storybook dev -p 6006", "vitest": "echo 'not running'" @@ -109,9 +108,9 @@ "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "@vitejs/plugin-react": "^4.2.1", - "@vitest/browser": "^2.1.6", - "@vitest/coverage-v8": "^2.1.6", - "@vitest/ui": "^2.1.6", + "@vitest/browser": "^2.1.3", + "@vitest/coverage-v8": "^2.1.3", + "@vitest/ui": "^2.1.3", "cypress": "^13.6.4", "eslint": "^8.56.0", "eslint-plugin-react-hooks": "^4.6.0", @@ -123,6 +122,6 @@ "storybook": "^8.0.0", "typescript": "^5.2.2", "vite": "^5.1.1", - "vitest": "^2.1.6" + "vitest": "^2.1.3" } } diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index 4a6ec1318240..5a40e537d339 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -1852,8 +1852,8 @@ __metadata: linkType: hard "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.17 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=9e5f6a&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.18 + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=41f89a&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:^0.1.11" "@storybook/global": "npm:^5.0.0" @@ -1876,7 +1876,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/73f733600a22ab37cea12e80aa69d42933ff6f75c36306b4d09e7887ba31aeeb35bc6af1fd37fbbfa1f9003d65d4413ed67f49851d899a5f13e5178260570103 + checksum: 10/dd243f2534f8e9a00f735f96b6448d3cc26271deac7efef318ab7447cf5241bdbe52dacab13d1f2512827762a7c09258f12919c63f2c32487b0c2b38010247b0 languageName: node linkType: hard @@ -1902,7 +1902,7 @@ __metadata: resolution: "@storybook/instrumenter@portal:../../../code/lib/instrumenter::locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/global": "npm:^5.0.0" - "@vitest/utils": "npm:^2.1.6" + "@vitest/utils": "npm:^2.1.1" peerDependencies: storybook: "workspace:^" languageName: node @@ -1995,8 +1995,8 @@ __metadata: "@testing-library/dom": "npm:10.4.0" "@testing-library/jest-dom": "npm:6.5.0" "@testing-library/user-event": "npm:14.5.2" - "@vitest/expect": "npm:2.1.6" - "@vitest/spy": "npm:2.1.6" + "@vitest/expect": "npm:2.0.5" + "@vitest/spy": "npm:2.0.5" peerDependencies: storybook: "workspace:^" languageName: node @@ -2692,7 +2692,7 @@ __metadata: languageName: node linkType: hard -"@vitest/browser@npm:^2.1.6": +"@vitest/browser@npm:^2.1.3": version: 2.1.8 resolution: "@vitest/browser@npm:2.1.8" dependencies: @@ -2720,7 +2720,7 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-v8@npm:^2.1.6": +"@vitest/coverage-v8@npm:^2.1.3": version: 2.1.8 resolution: "@vitest/coverage-v8@npm:2.1.8" dependencies: @@ -2746,15 +2746,15 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:2.1.6": - version: 2.1.6 - resolution: "@vitest/expect@npm:2.1.6" +"@vitest/expect@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/expect@npm:2.0.5" dependencies: - "@vitest/spy": "npm:2.1.6" - "@vitest/utils": "npm:2.1.6" - chai: "npm:^5.1.2" + "@vitest/spy": "npm:2.0.5" + "@vitest/utils": "npm:2.0.5" + chai: "npm:^5.1.1" tinyrainbow: "npm:^1.2.0" - checksum: 10/78d5c3e9781ec4d4954d4d532612fd3f78321214a86ca50413c2507d5ac36b20ceef3a8a401bfd1aae10d13bb0ef8a0f53f1ce3f212908c2458c4fb855d98612 + checksum: 10/ca9a218f50254b2259fd16166b2d8c9ccc8ee2cc068905e6b3d6281da10967b1590cc7d34b5fa9d429297f97e740450233745583b4cc12272ff11705faf70a37 languageName: node linkType: hard @@ -2789,12 +2789,12 @@ __metadata: languageName: node linkType: hard -"@vitest/pretty-format@npm:2.1.6": - version: 2.1.6 - resolution: "@vitest/pretty-format@npm:2.1.6" +"@vitest/pretty-format@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/pretty-format@npm:2.0.5" dependencies: tinyrainbow: "npm:^1.2.0" - checksum: 10/be0dea81e14b2e32f9843d96d5c72915acbabe7f06155d396b97f2fc4bef8f88866221ae215820f69674aec58a18ddd43d85aedf6db7d6aa3024ff2813ae1c08 + checksum: 10/70bf452dd0b8525e658795125b3f11110bd6baadfaa38c5bb91ca763bded35ec6dc80e27964ad4e91b91be6544d35e18ea7748c1997693988f975a7283c3e9a0 languageName: node linkType: hard @@ -2828,12 +2828,12 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:2.1.6": - version: 2.1.6 - resolution: "@vitest/spy@npm:2.1.6" +"@vitest/spy@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/spy@npm:2.0.5" dependencies: - tinyspy: "npm:^3.0.2" - checksum: 10/4a926126bfb6ea6f0a2496b2aaa395dd8246de9dcadb5f143aa43bcff310e6eef567f5f05a350ff906b4dcf298790c25ccd961d5a851f47d0c8244f1141dd2b2 + tinyspy: "npm:^3.0.0" + checksum: 10/ed19f4c3bb4d3853241e8070979615138e24403ce4c137fa48c903b3af2c8b3ada2cc26aca9c1aa323bb314a457a8130a29acbb18dafd4e42737deefb2abf1ca languageName: node linkType: hard @@ -2846,7 +2846,7 @@ __metadata: languageName: node linkType: hard -"@vitest/ui@npm:^2.1.6": +"@vitest/ui@npm:^2.1.3": version: 2.1.8 resolution: "@vitest/ui@npm:2.1.8" dependencies: @@ -2863,18 +2863,19 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:2.1.6": - version: 2.1.6 - resolution: "@vitest/utils@npm:2.1.6" +"@vitest/utils@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/utils@npm:2.0.5" dependencies: - "@vitest/pretty-format": "npm:2.1.6" - loupe: "npm:^3.1.2" + "@vitest/pretty-format": "npm:2.0.5" + estree-walker: "npm:^3.0.3" + loupe: "npm:^3.1.1" tinyrainbow: "npm:^1.2.0" - checksum: 10/7da93c871f2c0d5242caf65236b40f041e8820cfadddf9b68721e54eda5230c3dd8ed26a43600498930d922ee324dd3a65939e71b6db0906fe81bcf41c4bf040 + checksum: 10/d631d56d29c33bc8de631166b2b6691c470187a345469dfef7048befe6027e1c6ff9552f2ee11c8a247522c325c4a64bfcc73f8f0f0c525da39cb9f190f119f8 languageName: node linkType: hard -"@vitest/utils@npm:2.1.8, @vitest/utils@npm:^2.1.6": +"@vitest/utils@npm:2.1.8, @vitest/utils@npm:^2.1.1": version: 2.1.8 resolution: "@vitest/utils@npm:2.1.8" dependencies: @@ -3485,7 +3486,7 @@ __metadata: languageName: node linkType: hard -"chai@npm:^5.1.2": +"chai@npm:^5.1.1, chai@npm:^5.1.2": version: 5.1.2 resolution: "chai@npm:5.1.2" dependencies: @@ -6660,7 +6661,7 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^3.1.0, loupe@npm:^3.1.2": +"loupe@npm:^3.1.0, loupe@npm:^3.1.1, loupe@npm:^3.1.2": version: 3.1.2 resolution: "loupe@npm:3.1.2" checksum: 10/8f5734e53fb64cd914aa7d986e01b6d4c2e3c6c56dcbd5428d71c2703f0ab46b5ab9f9eeaaf2b485e8a1c43f865bdd16ec08ae1a661c8f55acdbd9f4d59c607a @@ -7473,9 +7474,9 @@ __metadata: "@typescript-eslint/eslint-plugin": "npm:^6.21.0" "@typescript-eslint/parser": "npm:^6.21.0" "@vitejs/plugin-react": "npm:^4.2.1" - "@vitest/browser": "npm:^2.1.6" - "@vitest/coverage-v8": "npm:^2.1.6" - "@vitest/ui": "npm:^2.1.6" + "@vitest/browser": "npm:^2.1.3" + "@vitest/coverage-v8": "npm:^2.1.3" + "@vitest/ui": "npm:^2.1.3" cypress: "npm:^13.6.4" eslint: "npm:^8.56.0" eslint-plugin-react-hooks: "npm:^4.6.0" @@ -7489,7 +7490,7 @@ __metadata: storybook: "npm:^8.0.0" typescript: "npm:^5.2.2" vite: "npm:^5.1.1" - vitest: "npm:^2.1.6" + vitest: "npm:^2.1.3" languageName: unknown linkType: soft @@ -8532,7 +8533,7 @@ __metadata: languageName: node linkType: hard -"tinyspy@npm:^3.0.2": +"tinyspy@npm:^3.0.0, tinyspy@npm:^3.0.2": version: 3.0.2 resolution: "tinyspy@npm:3.0.2" checksum: 10/5db671b2ff5cd309de650c8c4761ca945459d7204afb1776db9a04fb4efa28a75f08517a8620c01ee32a577748802231ad92f7d5b194dc003ee7f987a2a06337 @@ -8934,7 +8935,7 @@ __metadata: languageName: node linkType: hard -"vitest@npm:^2.1.6": +"vitest@npm:^2.1.3": version: 2.1.8 resolution: "vitest@npm:2.1.8" dependencies: From b8c9393fafaad19f4fb8da9f6674d1fb67f84966 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 6 Dec 2024 14:52:46 +0100 Subject: [PATCH 15/25] revert yarn.lock changes. --- code/yarn.lock | 403 +++++++++++++++++++++------------------------- scripts/yarn.lock | 41 ++--- 2 files changed, 203 insertions(+), 241 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index f9dba44953be..389084993441 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -927,7 +927,7 @@ __metadata: languageName: node linkType: hard -"@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.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2": version: 7.26.2 resolution: "@babel/parser@npm:7.26.2" dependencies: @@ -2477,7 +2477,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.25.4, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0": +"@babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0": version: 7.26.0 resolution: "@babel/types@npm:7.26.0" dependencies: @@ -2511,12 +2511,12 @@ __metadata: languageName: node linkType: hard -"@bundled-es-modules/cookie@npm:^2.0.1": - version: 2.0.1 - resolution: "@bundled-es-modules/cookie@npm:2.0.1" +"@bundled-es-modules/cookie@npm:^2.0.0": + version: 2.0.0 + resolution: "@bundled-es-modules/cookie@npm:2.0.0" dependencies: - cookie: "npm:^0.7.2" - checksum: 10c0/dfac5e36127e827c5557b8577f17a8aa94c057baff6d38555917927b99da0ecf0b1357e7fedadc8853ecdbd4a8a7fa1f5e64111b2a656612f4a36376f5bdbe8d + cookie: "npm:^0.5.0" + checksum: 10c0/0655dd331b35d7b5b6dd2301c3bcfb7233018c0e3235a40ced1d53f00463ab92dc01f0091f153812867bc0ef0f8e0a157a30acb16e8d7ef149702bf8db9fe7a6 languageName: node linkType: hard @@ -3961,48 +3961,50 @@ __metadata: languageName: node linkType: hard -"@inquirer/confirm@npm:^5.0.0": - version: 5.0.2 - resolution: "@inquirer/confirm@npm:5.0.2" +"@inquirer/confirm@npm:^3.0.0": + version: 3.1.20 + resolution: "@inquirer/confirm@npm:3.1.20" dependencies: - "@inquirer/core": "npm:^10.1.0" - "@inquirer/type": "npm:^3.0.1" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/c121cfb0557b42dd6570b54dce707a048d85f328481d5230d21fede195902012ede06887aa478875cc83afa064c2e30953eb2cab0744f832195867b418865115 + "@inquirer/core": "npm:^9.0.8" + "@inquirer/type": "npm:^1.5.1" + checksum: 10c0/5cf4c15c194932a6c97c7efa89266e585be70d209993eafdcf0b91a6f1219fe232c7485706b314af3befb0d579051218d9c7f82df6970d9d59b95879dd1abdfd languageName: node linkType: hard -"@inquirer/core@npm:^10.1.0": - version: 10.1.0 - resolution: "@inquirer/core@npm:10.1.0" +"@inquirer/core@npm:^9.0.8": + version: 9.0.8 + resolution: "@inquirer/core@npm:9.0.8" dependencies: - "@inquirer/figures": "npm:^1.0.8" - "@inquirer/type": "npm:^3.0.1" + "@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" ansi-escapes: "npm:^4.3.2" + cli-spinners: "npm:^2.9.2" cli-width: "npm:^4.1.0" - mute-stream: "npm:^2.0.0" + mute-stream: "npm:^1.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/ffd187edb210426c3e25ed564f7aa8844468c28dd2ba3c53dbe28d3359b519cdfae987b31bf927c1dd2e9f70a914fdefe319abe4c5f384e5e08410d11e0a7ce2 + checksum: 10c0/b38f9c8af932f159501f9ca38c670bd19794400a6f1421f61e08ed42982b44f33ab992237ca81bcf2fb4aa756c683e50067676cd3ef70c691219502df73c0ecf languageName: node linkType: hard -"@inquirer/figures@npm:^1.0.8": - version: 1.0.8 - resolution: "@inquirer/figures@npm:1.0.8" - checksum: 10c0/34d287ff1fd16476c58bbd5b169db315f8319b5ffb09f81a1bb9aabd4165114e7406b1f418d021fd9cd48923008446e3eec274bb818f378ea132a0450bbc91d4 +"@inquirer/figures@npm:^1.0.5": + version: 1.0.5 + resolution: "@inquirer/figures@npm:1.0.5" + checksum: 10c0/ec9ba23db42cb33fa18eb919abf2a18e750e739e64c1883ce4a98345cd5711c60cac12d1faf56a859f52d387deb221c8d3dfe60344ee07955a9a262f8b821fe3 languageName: node linkType: hard -"@inquirer/type@npm:^3.0.1": - version: 3.0.1 - resolution: "@inquirer/type@npm:3.0.1" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/c8612362d382114a318dbb523de7b1f54dc6bc6d3016c6eaf299b6a32486b92b0dfb1b4cfc6fe9d99496d15fbb721873a1bd66819f796c8bb09853a3b808812d +"@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 languageName: node linkType: hard @@ -4248,9 +4250,9 @@ __metadata: languageName: node linkType: hard -"@mswjs/interceptors@npm:^0.37.0": - version: 0.37.3 - resolution: "@mswjs/interceptors@npm:0.37.3" +"@mswjs/interceptors@npm:^0.35.6": + version: 0.35.6 + resolution: "@mswjs/interceptors@npm:0.35.6" dependencies: "@open-draft/deferred-promise": "npm:^2.2.0" "@open-draft/logger": "npm:^0.3.0" @@ -4258,7 +4260,7 @@ __metadata: is-node-process: "npm:^1.2.0" outvariant: "npm:^1.4.3" strict-event-emitter: "npm:^0.5.1" - checksum: 10c0/5a8d9ab7c491d14dff996f23bda0fa7b7059f68a1d4981b804b6114f1c0c0490bc35860df135ed36da1720984323878b1a9d13dbc80936bbfa67b3d3c3476f6c + checksum: 10c0/9472f640183675869368bf2ccf32354db0dfb320c754bcbfc683059f5380674598c59dde4fa58007f74817e31aa1dbd123787fcd0b1d37d53595aa718d06bfbe languageName: node linkType: hard @@ -8509,6 +8511,15 @@ __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" @@ -8872,6 +8883,13 @@ __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" @@ -9166,21 +9184,21 @@ __metadata: linkType: hard "@vitest/browser@npm:^2.1.3": - version: 2.1.8 - resolution: "@vitest/browser@npm:2.1.8" + version: 2.1.3 + resolution: "@vitest/browser@npm:2.1.3" dependencies: "@testing-library/dom": "npm:^10.4.0" "@testing-library/user-event": "npm:^14.5.2" - "@vitest/mocker": "npm:2.1.8" - "@vitest/utils": "npm:2.1.8" - magic-string: "npm:^0.30.12" - msw: "npm:^2.6.4" - sirv: "npm:^3.0.0" + "@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" tinyrainbow: "npm:^1.2.0" ws: "npm:^8.18.0" peerDependencies: playwright: "*" - vitest: 2.1.8 + vitest: 2.1.3 webdriverio: "*" peerDependenciesMeta: playwright: @@ -9189,53 +9207,53 @@ __metadata: optional: true webdriverio: optional: true - checksum: 10c0/00e89e43064654d42dab85ccae5743e350ae91d441563fe3678c6569362cb7527756dddff154ef33120841cc553caef16a82a7df4ca4569563c52dedacc719e9 + checksum: 10c0/428a8d62ffcc2d637363fc7eb986d6beaeda7681b032d785f2bc475f8d105a14c674610e22a0a0c74e4ee10774b3709b11bc359e0458c6867c3d4acdc3f190a6 languageName: node linkType: hard "@vitest/coverage-istanbul@npm:^2.1.3": - version: 2.1.8 - resolution: "@vitest/coverage-istanbul@npm:2.1.8" + version: 2.1.3 + resolution: "@vitest/coverage-istanbul@npm:2.1.3" dependencies: "@istanbuljs/schema": "npm:^0.1.3" - debug: "npm:^4.3.7" + debug: "npm:^4.3.6" 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.5" + magicast: "npm:^0.3.4" test-exclude: "npm:^7.0.1" tinyrainbow: "npm:^1.2.0" peerDependencies: - vitest: 2.1.8 - checksum: 10c0/809eeccebaa7fd0e349d89a8d374e449c65a1d626f46b03b080aa507ac93dfb340c90dd491fe9a08dca896d6832e0f3dcffd6fd7ba3d05c1dc95c7a32aabc50c + vitest: 2.1.3 + checksum: 10c0/6b21eb219f45dc0f3bfb35049280658687b6b2f4ba5e17dc2c7e2c221f5d37e60c6962c5cfd77bd5f2848bb56debd26f82e5684b293f5775a8a416a0173f1803 languageName: node linkType: hard "@vitest/coverage-v8@npm:^2.1.3": - version: 2.1.8 - resolution: "@vitest/coverage-v8@npm:2.1.8" + version: 2.1.3 + resolution: "@vitest/coverage-v8@npm:2.1.3" dependencies: "@ampproject/remapping": "npm:^2.3.0" "@bcoe/v8-coverage": "npm:^0.2.3" - debug: "npm:^4.3.7" + debug: "npm:^4.3.6" 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.12" - magicast: "npm:^0.3.5" - std-env: "npm:^3.8.0" + magic-string: "npm:^0.30.11" + magicast: "npm:^0.3.4" + std-env: "npm:^3.7.0" test-exclude: "npm:^7.0.1" tinyrainbow: "npm:^1.2.0" peerDependencies: - "@vitest/browser": 2.1.8 - vitest: 2.1.8 + "@vitest/browser": 2.1.3 + vitest: 2.1.3 peerDependenciesMeta: "@vitest/browser": optional: true - checksum: 10c0/b228a23bbaf0eae07ac939399f968b0def2df786091948a12d614919db3f5b6e46db7a1ab4f9d05d5d7f696afd53133a67abc25915f85480cd032442664ac725 + checksum: 10c0/5fdff9e9dd8b8d2030c00a5273ba2b27441c0cb45d007b6671504745dac6d095c160a01433789e7ed1ca6cd234246f883c1d52c02cfb62f8ae81dda17dd56bc6 languageName: node linkType: hard @@ -9251,15 +9269,15 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:2.1.8": - version: 2.1.8 - resolution: "@vitest/expect@npm:2.1.8" +"@vitest/expect@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/expect@npm:2.1.3" dependencies: - "@vitest/spy": "npm:2.1.8" - "@vitest/utils": "npm:2.1.8" - chai: "npm:^5.1.2" + "@vitest/spy": "npm:2.1.3" + "@vitest/utils": "npm:2.1.3" + chai: "npm:^5.1.1" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/6fbf4abc2360efe4d3671d3425f8bb6012fe2dd932a88720d8b793030b766ba260494822c721d3fc497afe52373515c7e150635a95c25f6e1b567f86155c5408 + checksum: 10c0/0837adcbb938feebcc083664afc5c4d12e42f1f2442b6f1bedc6b5650a8ff2448b1f10713b45afb099c839fb5cf766c971736267fa9b0fe2ac87f3e2d7f782c2 languageName: node linkType: hard @@ -9275,22 +9293,23 @@ __metadata: languageName: node linkType: hard -"@vitest/mocker@npm:2.1.8": - version: 2.1.8 - resolution: "@vitest/mocker@npm:2.1.8" +"@vitest/mocker@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/mocker@npm:2.1.3" dependencies: - "@vitest/spy": "npm:2.1.8" + "@vitest/spy": "npm:2.1.3" estree-walker: "npm:^3.0.3" - magic-string: "npm:^0.30.12" + magic-string: "npm:^0.30.11" peerDependencies: - msw: ^2.4.9 + "@vitest/spy": 2.1.3 + msw: ^2.3.5 vite: ^5.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - checksum: 10c0/b4113ed8a57c0f60101d02e1b1769357a346ecd55ded499eab384d52106fd4b12d51e9aaa6db98f47de0d56662477be0ed8d46d6dfa84c235f9e1b234709814e + checksum: 10c0/03c80628d092244f21a0ba9041665fc75f987d0d11fab1ae0b7027ec21e503f65057e8c24b936602c5f852d83fbb183da13d05dba117c99785b41b3dafd105ce languageName: node linkType: hard @@ -9303,33 +9322,33 @@ __metadata: languageName: node linkType: hard -"@vitest/pretty-format@npm:2.1.8, @vitest/pretty-format@npm:^2.1.8": - version: 2.1.8 - resolution: "@vitest/pretty-format@npm:2.1.8" +"@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: tinyrainbow: "npm:^1.2.0" - checksum: 10c0/1dc5c9b1c7c7e78e46a2a16033b6b20be05958bbebc5a5b78f29e32718c80252034804fccd23f34db6b3583239db47e68fc5a8e41942c54b8047cc3b4133a052 + checksum: 10c0/5a6ee872a8adf5e2764f2b5b2276d8a2199be4ef14777ab693428caf359481851400af10b59721d4972289c955ffe7277954a662b04cfb10233824574c7074ba languageName: node linkType: hard -"@vitest/runner@npm:2.1.8, @vitest/runner@npm:^2.1.3": - version: 2.1.8 - resolution: "@vitest/runner@npm:2.1.8" +"@vitest/runner@npm:2.1.3, @vitest/runner@npm:^2.1.3": + version: 2.1.3 + resolution: "@vitest/runner@npm:2.1.3" dependencies: - "@vitest/utils": "npm:2.1.8" + "@vitest/utils": "npm:2.1.3" pathe: "npm:^1.1.2" - checksum: 10c0/d0826a71494adeafc8c6478257f584d11655145c83e2d8f94c17301d7059c7463ad768a69379e394c50838a7435abcc9255a6b7d8894f5ee06b153e314683a75 + checksum: 10c0/d5b077643265d10025e22fa64a0e54c3d4fddc23e05f9fcd143dbcc4080851b0df31985986e57890a974577a18d3af624758b6062801d7dd96f9b4f2eaf591f1 languageName: node linkType: hard -"@vitest/snapshot@npm:2.1.8": - version: 2.1.8 - resolution: "@vitest/snapshot@npm:2.1.8" +"@vitest/snapshot@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/snapshot@npm:2.1.3" dependencies: - "@vitest/pretty-format": "npm:2.1.8" - magic-string: "npm:^0.30.12" + "@vitest/pretty-format": "npm:2.1.3" + magic-string: "npm:^0.30.11" pathe: "npm:^1.1.2" - checksum: 10c0/8d7a77a52e128630ea737ee0a0fe746d1d325cac5848326861dbf042844da4d5c1a5145539ae0ed1a3f0b0363506e98d86f2679fadf114ec4b987f1eb616867b + checksum: 10c0/a3dcea6a5f7581b6a34dc3bf5f7bd42a05e2ccf6e1171d9f1b759688aebe650e6412564d066aeaa45e83ac549d453b6a3edcf774a8ac728c0c639f8dc919039f languageName: node linkType: hard @@ -9342,12 +9361,12 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:2.1.8": - version: 2.1.8 - resolution: "@vitest/spy@npm:2.1.8" +"@vitest/spy@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/spy@npm:2.1.3" dependencies: - tinyspy: "npm:^3.0.2" - checksum: 10c0/9740f10772ede004ea7f9ffb8a6c3011341d75d9d7f2d4d181b123a701c4691e942f38cf1700684a3bb5eea3c78addf753fd8cdf78c51d8eadc3bada6fadf8f2 + tinyspy: "npm:^3.0.0" + checksum: 10c0/8d85a5c2848c5bd81892af989aebad65d0c7ae74094aa98ad4f35ecf80755259c7a748a8e7bf683b2906fac29a51fc0ffa82f8fc073b36dbd8a0418261fccdba languageName: node linkType: hard @@ -9363,14 +9382,14 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:2.1.8, @vitest/utils@npm:^2.1.1": - version: 2.1.8 - resolution: "@vitest/utils@npm:2.1.8" +"@vitest/utils@npm:2.1.3, @vitest/utils@npm:^2.1.1": + version: 2.1.3 + resolution: "@vitest/utils@npm:2.1.3" dependencies: - "@vitest/pretty-format": "npm:2.1.8" - loupe: "npm:^3.1.2" + "@vitest/pretty-format": "npm:2.1.3" + loupe: "npm:^3.1.1" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/d4a29ecd8f6c24c790e4c009f313a044d89e664e331bc9c3cfb57fe1380fb1d2999706dbbfc291f067d6c489602e76d00435309fbc906197c0d01f831ca17d64 + checksum: 10c0/55a044e43b84c0f8f573d8578107f26440678b6f506c8d9fee88b7ef120d19efd27c9be77985c107113b0f3f3db298dcee57074e1c1c214bee7a097fd08a209b languageName: node linkType: hard @@ -11970,19 +11989,6 @@ __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.2.0, chalk@npm:^5.3.0": version: 5.3.0 resolution: "chalk@npm:5.3.0" @@ -12266,7 +12272,7 @@ __metadata: languageName: node linkType: hard -"cli-spinners@npm:^2.5.0": +"cli-spinners@npm:^2.5.0, cli-spinners@npm:^2.9.2": version: 2.9.2 resolution: "cli-spinners@npm:2.9.2" checksum: 10c0/907a1c227ddf0d7a101e7ab8b300affc742ead4b4ebe920a5bf1bc6d45dce2958fcd195eb28fa25275062fe6fa9b109b93b63bc8033396ed3bcb50297008b3a3 @@ -12756,10 +12762,10 @@ __metadata: languageName: node linkType: hard -"cookie@npm:^0.7.2": - version: 0.7.2 - resolution: "cookie@npm:0.7.2" - checksum: 10c0/9596e8ccdbf1a3a88ae02cf5ee80c1c50959423e1022e4e60b91dd87c622af1da309253d8abdb258fb5e3eacb4f08e579dc58b4897b8087574eee0fd35dfa5d2 +"cookie@npm:^0.5.0": + version: 0.5.0 + resolution: "cookie@npm:0.5.0" + checksum: 10c0/c01ca3ef8d7b8187bae434434582288681273b5a9ed27521d4d7f9f7928fe0c920df0decd9f9d3bbd2d14ac432b8c8cf42b98b3bdd5bfe0e6edddeebebe8b61d languageName: node linkType: hard @@ -13305,7 +13311,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.3.7": +"debug@npm:^4.3.6, debug@npm:^4.3.7": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -14509,13 +14515,6 @@ __metadata: languageName: node linkType: hard -"es-module-lexer@npm:^1.5.4": - version: 1.5.4 - resolution: "es-module-lexer@npm:1.5.4" - checksum: 10c0/300a469488c2f22081df1e4c8398c78db92358496e639b0df7f89ac6455462aaf5d8893939087c1a1cbcbf20eed4610c70e0bcb8f3e4b0d80a5d2611c539408c - languageName: node - linkType: hard - "es-object-atoms@npm:^1.0.0": version: 1.0.0 resolution: "es-object-atoms@npm:1.0.0" @@ -15519,13 +15518,6 @@ __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" @@ -19857,7 +19849,7 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^3.1.0": +"loupe@npm:^3.1.0, loupe@npm:^3.1.1": version: 3.1.1 resolution: "loupe@npm:3.1.1" dependencies: @@ -19866,13 +19858,6 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^3.1.1, 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" @@ -19992,14 +19977,14 @@ __metadata: languageName: node linkType: hard -"magicast@npm:^0.3.5": - version: 0.3.5 - resolution: "magicast@npm:0.3.5" +"magicast@npm:^0.3.4": + version: 0.3.4 + resolution: "magicast@npm:0.3.4" dependencies: - "@babel/parser": "npm:^7.25.4" - "@babel/types": "npm:^7.25.4" + "@babel/parser": "npm:^7.24.4" + "@babel/types": "npm:^7.24.0" source-map-js: "npm:^1.2.0" - checksum: 10c0/a6cacc0a848af84f03e3f5bda7b0de75e4d0aa9ddce5517fd23ed0f31b5ddd51b2d0ff0b7e09b51f7de0f4053c7a1107117edda6b0732dca3e9e39e6c5a68c64 + checksum: 10c0/7ebaaac397b13c31ca05e6d9649296751d76749b945d10a0800107872119fbdf267acdb604571d25e38ec6fd7ab3568a951b6e76eaef1caba9eaa11778fd9783 languageName: node linkType: hard @@ -21630,16 +21615,15 @@ __metadata: languageName: node linkType: hard -"msw@npm:^2.6.4": - version: 2.6.6 - resolution: "msw@npm:2.6.6" +"msw@npm:^2.3.5": + version: 2.4.8 + resolution: "msw@npm:2.4.8" dependencies: - "@bundled-es-modules/cookie": "npm:^2.0.1" + "@bundled-es-modules/cookie": "npm:^2.0.0" "@bundled-es-modules/statuses": "npm:^1.0.1" "@bundled-es-modules/tough-cookie": "npm:^0.1.6" - "@inquirer/confirm": "npm:^5.0.0" - "@mswjs/interceptors": "npm:^0.37.0" - "@open-draft/deferred-promise": "npm:^2.2.0" + "@inquirer/confirm": "npm:^3.0.0" + "@mswjs/interceptors": "npm:^0.35.6" "@open-draft/until": "npm:^2.1.0" "@types/cookie": "npm:^0.6.0" "@types/statuses": "npm:^2.0.4" @@ -21647,10 +21631,10 @@ __metadata: graphql: "npm:^16.8.1" headers-polyfill: "npm:^4.0.2" is-node-process: "npm:^1.2.0" - outvariant: "npm:^1.4.3" + outvariant: "npm:^1.4.2" path-to-regexp: "npm:^6.3.0" strict-event-emitter: "npm:^0.5.1" - type-fest: "npm:^4.26.1" + type-fest: "npm:^4.9.0" yargs: "npm:^17.7.2" peerDependencies: typescript: ">= 4.8.x" @@ -21659,7 +21643,7 @@ __metadata: optional: true bin: msw: cli/index.js - checksum: 10c0/d7f0e0ea6512cfddda5b7695a0c6c6a0ed43b36b62f25925beee8e12daec12a5ef369d00e0976f9dd76d3af779741fda11a3eae812da11a044b03992e697010c + checksum: 10c0/33a8c5697f7cb003a2af33ff6b259eaf7babf180fadf0697d107d0856ab0d2ff1a80d319e788d9127f289ff091334bee589f348180a1fdd0914bf8c4725830dc languageName: node linkType: hard @@ -21689,20 +21673,13 @@ __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" @@ -22609,7 +22586,7 @@ __metadata: languageName: node linkType: hard -"outvariant@npm:^1.4.0, outvariant@npm:^1.4.3": +"outvariant@npm:^1.4.0, outvariant@npm:^1.4.2, outvariant@npm:^1.4.3": version: 1.4.3 resolution: "outvariant@npm:1.4.3" checksum: 10c0/5976ca7740349cb8c71bd3382e2a762b1aeca6f33dc984d9d896acdf3c61f78c3afcf1bfe9cc633a7b3c4b295ec94d292048f83ea2b2594fae4496656eba992c @@ -26457,17 +26434,6 @@ __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" @@ -26894,10 +26860,10 @@ __metadata: languageName: node linkType: hard -"std-env@npm:^3.8.0": - version: 3.8.0 - resolution: "std-env@npm:3.8.0" - checksum: 10c0/f560a2902fd0fa3d648d7d0acecbd19d664006f7372c1fba197ed4c216b4c9e48db6e2769b5fe1616d42a9333c9f066c5011935035e85c59f45dc4f796272040 +"std-env@npm:^3.7.0": + version: 3.7.0 + resolution: "std-env@npm:3.7.0" + checksum: 10c0/60edf2d130a4feb7002974af3d5a5f3343558d1ccf8d9b9934d225c638606884db4a20d2fe6440a09605bca282af6b042ae8070a10490c0800d69e82e478f41e languageName: node linkType: hard @@ -27738,10 +27704,10 @@ __metadata: languageName: node linkType: hard -"tinyexec@npm:^0.3.1": - version: 0.3.1 - resolution: "tinyexec@npm:0.3.1" - checksum: 10c0/11e7a7c5d8b3bddf8b5cbe82a9290d70a6fad84d528421d5d18297f165723cb53d2e737d8f58dcce5ca56f2e4aa2d060f02510b1f8971784f97eb3e9aec28f09 +"tinyexec@npm:^0.3.0": + version: 0.3.0 + resolution: "tinyexec@npm:0.3.0" + checksum: 10c0/138a4f4241aea6b6312559508468ab275a31955e66e2f57ed206e0aaabecee622624f208c5740345f0a66e33478fd065e359ed1eb1269eb6fd4fa25d44d0ba3b languageName: node linkType: hard @@ -27755,10 +27721,10 @@ __metadata: languageName: node linkType: hard -"tinypool@npm:^1.0.1": - version: 1.0.2 - resolution: "tinypool@npm:1.0.2" - checksum: 10c0/31ac184c0ff1cf9a074741254fe9ea6de95026749eb2b8ec6fd2b9d8ca94abdccda731f8e102e7f32e72ed3b36d32c6975fd5f5523df3f1b6de6c3d8dfd95e63 +"tinypool@npm:^1.0.0": + version: 1.0.0 + resolution: "tinypool@npm:1.0.0" + checksum: 10c0/71b20b9c54366393831c286a0772380c20f8cad9546d724c484edb47aea3228f274c58e98cf51d28c40869b39f5273209ef3ea94a9d2a23f8b292f4731cd3e4e languageName: node linkType: hard @@ -27783,13 +27749,6 @@ __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" @@ -29167,18 +29126,17 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:2.1.8": - version: 2.1.8 - resolution: "vite-node@npm:2.1.8" +"vite-node@npm:2.1.3": + version: 2.1.3 + resolution: "vite-node@npm:2.1.3" dependencies: cac: "npm:^6.7.14" - debug: "npm:^4.3.7" - es-module-lexer: "npm:^1.5.4" + debug: "npm:^4.3.6" pathe: "npm:^1.1.2" vite: "npm:^5.0.0" bin: vite-node: vite-node.mjs - checksum: 10c0/cb28027a7425ba29780e216164c07d36a4ff9eb60d83afcad3bc222fd5a5f3e36030071c819edd6d910940f502d49e52f7564743617bc1c5875485b0952c72d5 + checksum: 10c0/1b06139880a8170651e025e8c35aa92a917f8ec8f24507cda5bf4be09843f6447e1f494932a8d7eb98124f1c8c9fee02283ef318ddd57e2b861d2d85a409a206 languageName: node linkType: hard @@ -29319,34 +29277,33 @@ __metadata: linkType: hard "vitest@npm:^2.1.3": - version: 2.1.8 - resolution: "vitest@npm:2.1.8" - dependencies: - "@vitest/expect": "npm:2.1.8" - "@vitest/mocker": "npm:2.1.8" - "@vitest/pretty-format": "npm:^2.1.8" - "@vitest/runner": "npm:2.1.8" - "@vitest/snapshot": "npm:2.1.8" - "@vitest/spy": "npm:2.1.8" - "@vitest/utils": "npm:2.1.8" - chai: "npm:^5.1.2" - debug: "npm:^4.3.7" - expect-type: "npm:^1.1.0" - magic-string: "npm:^0.30.12" + 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.8.0" + std-env: "npm:^3.7.0" tinybench: "npm:^2.9.0" - tinyexec: "npm:^0.3.1" - tinypool: "npm:^1.0.1" + tinyexec: "npm:^0.3.0" + tinypool: "npm:^1.0.0" tinyrainbow: "npm:^1.2.0" vite: "npm:^5.0.0" - vite-node: "npm:2.1.8" + vite-node: "npm:2.1.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.8 - "@vitest/ui": 2.1.8 + "@vitest/browser": 2.1.3 + "@vitest/ui": 2.1.3 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -29364,7 +29321,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10c0/e70631bad5662d6c60c5cf836a4baf58b890db6654fef1f608fe6a86aa49a2b9f078aac74b719d4d3c87c5c781968cc73590a7935277b48f3d8b6fb9c5b4d276 + checksum: 10c0/7688fdce37205e7f3b448039df216e103e3a52994af0201993e22decbb558d129a734001b991f3c3d80bf4a4ef91ca6a5665a7395d5b051249da60a0016eda36 languageName: node linkType: hard diff --git a/scripts/yarn.lock b/scripts/yarn.lock index e4e3dcb16584..3f740c74a6a4 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -83,11 +83,9 @@ __metadata: linkType: hard "@babel/helper-environment-visitor@npm:^7.22.20": - version: 7.24.7 - resolution: "@babel/helper-environment-visitor@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/36ece78882b5960e2d26abf13cf15ff5689bf7c325b10a2895a74a499e712de0d305f8d78bb382dd3c05cfba7e47ec98fe28aab5674243e0625cd38438dd0b2d + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: 10c0/e762c2d8f5d423af89bd7ae9abe35bd4836d2eb401af868a63bbb63220c513c783e25ef001019418560b3fdc6d9a6fb67e6c0b650bcdeb3a2ac44b5c3d2bdd94 languageName: node linkType: hard @@ -102,20 +100,20 @@ __metadata: linkType: hard "@babel/helper-hoist-variables@npm:^7.22.5": - version: 7.24.7 - resolution: "@babel/helper-hoist-variables@npm:7.24.7" + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/19ee37563bbd1219f9d98991ad0e9abef77803ee5945fd85aa7aa62a67c69efca9a801696a1b58dda27f211e878b3327789e6fd2a6f6c725ccefe36774b5ce95 + "@babel/types": "npm:^7.22.5" + checksum: 10c0/60a3077f756a1cd9f14eb89f0037f487d81ede2b7cfe652ea6869cd4ec4c782b0fb1de01b8494b9a2d2050e3d154d7d5ad3be24806790acfb8cbe2073bf1e208 languageName: node linkType: hard "@babel/helper-split-export-declaration@npm:^7.22.6": - version: 7.24.7 - resolution: "@babel/helper-split-export-declaration@npm:7.24.7" + version: 7.22.6 + resolution: "@babel/helper-split-export-declaration@npm:7.22.6" dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/0254577d7086bf09b01bbde98f731d4fcf4b7c3fa9634fdb87929801307c1f6202a1352e3faa5492450fa8da4420542d44de604daf540704ff349594a78184f6 + "@babel/types": "npm:^7.22.5" + checksum: 10c0/d83e4b623eaa9622c267d3c83583b72f3aac567dc393dda18e559d79187961cb29ae9c57b2664137fc3d19508370b12ec6a81d28af73a50e0846819cb21c6e44 languageName: node linkType: hard @@ -253,7 +251,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.23.0, @babel/types@npm:^7.8.3": +"@babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.8.3": version: 7.23.9 resolution: "@babel/types@npm:7.23.9" dependencies: @@ -4878,9 +4876,9 @@ __metadata: linkType: hard "diff-match-patch-es@npm:^0.1.0": - version: 0.1.1 - resolution: "diff-match-patch-es@npm:0.1.1" - checksum: 10c0/8bb602081c7bdefb1e2c5c346e7fb1f476a23a4accf6b6cf8d38ae6ed4f928ba3a87edb54dd517652ec0c813c95768da417ea9eea2c7098381d4e1265d5fecd0 + version: 0.1.0 + resolution: "diff-match-patch-es@npm:0.1.0" + checksum: 10c0/c456d10662506f676489c1572af2a48ad52d015a856b74bf16594d39f11c9a352cd763fd66b5a5952c86a18818f4b7de28d55876e7ffd47f5d71282e3a5056a2 languageName: node linkType: hard @@ -8935,7 +8933,14 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": +"lru-cache@npm:^10.0.1": + version: 10.0.1 + resolution: "lru-cache@npm:10.0.1" + checksum: 10c0/982dabfb227b9a2daf56d712ae0e72e01115a28c0a2068cd71277bca04568f3417bbf741c6c7941abc5c620fd8059e34f15607f90ebccbfa0a17533322d27a8e + languageName: node + linkType: hard + +"lru-cache@npm:^10.2.0": version: 10.2.2 resolution: "lru-cache@npm:10.2.2" checksum: 10c0/402d31094335851220d0b00985084288136136992979d0e015f0f1697e15d1c86052d7d53ae86b614e5b058425606efffc6969a31a091085d7a2b80a8a1e26d6 From f47acc5f023aef9c58c5b5678d2387c340b2577f Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Mon, 9 Dec 2024 11:24:35 +0100 Subject: [PATCH 16/25] add staticDirs test --- .../react/.storybook/main.ts | 1 + .../.storybook/test-static-dirs/static.js | 3 ++ .../react/stories/AddonTest.stories.tsx | 8 ++++++ .../react/yarn.lock | 28 +++++++++---------- 4 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 test-storybooks/portable-stories-kitchen-sink/react/.storybook/test-static-dirs/static.js 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 99ed3c65c752..44f0176bd4ab 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts @@ -19,5 +19,6 @@ const config: StorybookConfig = { border: 1px solid red; } `, + staticDirs: [{ from: './test-static-dirs', to:'test-static-dirs' }], }; export default config; diff --git a/test-storybooks/portable-stories-kitchen-sink/react/.storybook/test-static-dirs/static.js b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/test-static-dirs/static.js new file mode 100644 index 000000000000..56ff9f9c7ad4 --- /dev/null +++ b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/test-static-dirs/static.js @@ -0,0 +1,3 @@ +// This file is used to test that staticDirs are correctly loaded in Vitest + +export const staticFunction = () => true; diff --git a/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx b/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx index 14c5835a11c1..73ebacd24561 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx +++ b/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx @@ -74,3 +74,11 @@ export const PreviewHeadTest: Story = { expect(styles.borderColor).toBe('rgb(255, 0, 0)'); } }; + +export const StaticDirTest: Story = { + play: async () => { + const path = '/test-static-dirs/static.js'; + const { staticFunction } = await import(/* @vite-ignore */path); + expect(staticFunction()).toBe(true); + } +} diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index 5a40e537d339..772af2e30b2e 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -1792,11 +1792,11 @@ __metadata: linkType: soft "@storybook/components@file:../../../code/deprecated/components::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.17 - resolution: "@storybook/components@file:../../../code/deprecated/components#../../../code/deprecated/components::hash=88319a&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.18 + resolution: "@storybook/components@file:../../../code/deprecated/components#../../../code/deprecated/components::hash=aad2fe&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/d3e6ae03a1f331ae8e67e593d9f18f40fb2e3a8be4d8c8c495826ccb7b052775f68824371c514daaa87484182685007a636de76796ac1e5c26009407a7e6a64d + checksum: 10/44d4a8a54fd32d94b03dc9f29e2d68ca3c37156b56055b94493f5f626786a02349c195859c48b4f8fa25e209ce12f385305d601135f7e63bdc4541fa0645cae5 languageName: node linkType: hard @@ -1853,7 +1853,7 @@ __metadata: "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": version: 8.5.0-alpha.18 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=41f89a&locator=portable-stories-react%40workspace%3A." + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=981221&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:^0.1.11" "@storybook/global": "npm:^5.0.0" @@ -1876,7 +1876,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/dd243f2534f8e9a00f735f96b6448d3cc26271deac7efef318ab7447cf5241bdbe52dacab13d1f2512827762a7c09258f12919c63f2c32487b0c2b38010247b0 + checksum: 10/709f00e00e983596d59d024237264533f88a491d573dc50dbc5b6b774956a30c744e7bc4402d3101e89a2b8c188d271c3cb193e2febcd0dd5d39d9463c665673 languageName: node linkType: hard @@ -1909,20 +1909,20 @@ __metadata: linkType: soft "@storybook/manager-api@file:../../../code/deprecated/manager-api::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.17 - resolution: "@storybook/manager-api@file:../../../code/deprecated/manager-api#../../../code/deprecated/manager-api::hash=98fa43&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.18 + resolution: "@storybook/manager-api@file:../../../code/deprecated/manager-api#../../../code/deprecated/manager-api::hash=c1892e&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/7276107e58c3598282d0359fce675b0eb95dd11792d2ec944caffcd5eb254b32b61d1900a74fd318ecc158959347aabae2642a3be6715f2ddcc9290a6468c05f + checksum: 10/405745f48728bfa4d8340fe2403bca0d60f803ed346c12d20a63ab9472ba1d8d1021aa12ee0fd36a6b41aec42d8c2a657acffeb9c8663aa32edcda490882e7f5 languageName: node linkType: hard "@storybook/preview-api@file:../../../code/deprecated/preview-api::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.17 - resolution: "@storybook/preview-api@file:../../../code/deprecated/preview-api#../../../code/deprecated/preview-api::hash=a9de97&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.18 + resolution: "@storybook/preview-api@file:../../../code/deprecated/preview-api#../../../code/deprecated/preview-api::hash=0085a8&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/ac50a70d12304ab0661fdfdf7591d31d1dd943ac79f59cd554cff31f8dcc93de817256dabfff8f6d81db404d7ffcc46453e0cd2ef1983152f2668da618ebc4c9 + checksum: 10/29c5f7134b4300bac03c42f57c3138e24315516b23515893cfb4a144786327fb6e0a90d5470d951eb22e055466769fc9ad4577658afc7da43b60870c0d06e767 languageName: node linkType: hard @@ -2003,11 +2003,11 @@ __metadata: linkType: soft "@storybook/theming@file:../../../code/deprecated/theming::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.17 - resolution: "@storybook/theming@file:../../../code/deprecated/theming#../../../code/deprecated/theming::hash=6cb022&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.18 + resolution: "@storybook/theming@file:../../../code/deprecated/theming#../../../code/deprecated/theming::hash=dd5360&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/4b59447f28ca2682e24ab2cf62976fdaaea63c1aa97e687ec6da9e7865716d13439b8ea259aa742c8a0ede23f52025f57c7562f9acf794cddbe7c9a054bea069 + checksum: 10/8f8ecbd709ff4a8e0bafa19642497aad0d6ee40f2e613793a4248cb3825765783dd40eb57d180cb6cc4ad1f8acbd4e4a1a1b3448245b89e28581e25289c88c86 languageName: node linkType: hard From 0a5a607a6a4edc26bc0c60a08c7638ef6f3b1341 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 10 Dec 2024 08:46:45 +0100 Subject: [PATCH 17/25] add test for vitefinal --- .../react/.storybook/aliased.ts | 4 ++++ .../react/.storybook/main.ts | 13 +++++++++++++ .../react/stories/AddonTest.stories.tsx | 8 ++++++++ 3 files changed, 25 insertions(+) create mode 100644 test-storybooks/portable-stories-kitchen-sink/react/.storybook/aliased.ts diff --git a/test-storybooks/portable-stories-kitchen-sink/react/.storybook/aliased.ts b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/aliased.ts new file mode 100644 index 000000000000..030574bfd2a6 --- /dev/null +++ b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/aliased.ts @@ -0,0 +1,4 @@ +// This file is used to test that viteFinal is correctly loaded in Vitest +// main.ts defines this file as a resolve alias, which is used in the ViteFinalTest story + +export const aliasedFunction = () => true; 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 44f0176bd4ab..513aed4aa06e 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/.storybook/main.ts @@ -1,4 +1,5 @@ import type { StorybookConfig } from "@storybook/react-vite"; +import { join } from 'path'; const config: StorybookConfig = { stories: ["../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"], @@ -20,5 +21,17 @@ const config: StorybookConfig = { } `, staticDirs: [{ from: './test-static-dirs', to:'test-static-dirs' }], + viteFinal: (config) => { + return { + ...config, + resolve: { + ...config.resolve, + alias: { + ...config.resolve?.alias, + 'test-alias': join(__dirname, 'aliased.ts'), + }, + } + }; + }, }; export default config; diff --git a/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx b/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx index 73ebacd24561..650b091b33cb 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx +++ b/test-storybooks/portable-stories-kitchen-sink/react/stories/AddonTest.stories.tsx @@ -82,3 +82,11 @@ export const StaticDirTest: Story = { expect(staticFunction()).toBe(true); } } + +export const ViteFinalTest: Story = { + play: async () => { + // @ts-expect-error TS doesn't know about the alias + const { aliasedFunction } = await import('test-alias'); + expect(aliasedFunction()).toBe(true); + } +} From 17a01ee3e4eb0291b534309052630c525cce6f1c Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 10 Dec 2024 13:36:45 +0100 Subject: [PATCH 18/25] cleanup --- .circleci/config.yml | 2 +- code/addons/test/src/vitest-plugin/index.ts | 1 - .../portable-stories-kitchen-sink/react/package.json | 3 ++- test-storybooks/portable-stories-kitchen-sink/react/yarn.lock | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e02ece3a5a2b..35c122f6c1ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -759,7 +759,7 @@ jobs: working_directory: test-storybooks/portable-stories-kitchen-sink/react - run: name: Run Vitest - command: yarn vitest-non-failing-tests + command: yarn vitest-skip-fail-on-purpose working_directory: test-storybooks/portable-stories-kitchen-sink/react - store_test_results: path: test-results diff --git a/code/addons/test/src/vitest-plugin/index.ts b/code/addons/test/src/vitest-plugin/index.ts index e517364d5aaa..eadadb4440e5 100644 --- a/code/addons/test/src/vitest-plugin/index.ts +++ b/code/addons/test/src/vitest-plugin/index.ts @@ -51,7 +51,6 @@ const getStoryGlobsAndFiles = async ( const stories = await presets.apply('stories', []); const docs = await presets.apply('docs', {}); const indexers = await presets.apply('experimental_indexers', []); - console.log('LOG: ', { docs }); const generator = new StoryIndexGenerator(normalizeStories(stories, directories), { ...directories, indexers, diff --git a/test-storybooks/portable-stories-kitchen-sink/react/package.json b/test-storybooks/portable-stories-kitchen-sink/react/package.json index 9eca3e697aec..7b87c70aaabb 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react/package.json @@ -13,7 +13,8 @@ "playwright-e2e": "playwright test -c playwright-e2e.config.ts", "preview": "vite preview", "storybook": "storybook dev -p 6006", - "vitest": "echo 'not running'" + "vitest": "echo 'not running'", + "vitest-skip-fail-on-purpose": "SKIP_FAIL_ON_PURPOSE=true vitest run" }, "resolutions": { "@playwright/test": "1.48.1", diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index 74f18e5bf3cc..3a2b684b6bdd 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -1866,7 +1866,7 @@ __metadata: "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": version: 8.5.0-alpha.19 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=ddcffb&locator=portable-stories-react%40workspace%3A." + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=23a556&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:0.1.12" "@storybook/global": "npm:^5.0.0" @@ -1889,7 +1889,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/49c5969a6a4571df4aa7758b1d8f9335cc8b74bf410c5a151c3a64ea69faa5129c8b3122bc50fe2f1b32c12ea0be45c7de2422b54bcfe8cb0e34668ef79bfa86 + checksum: 10/5f3656017435bf80f6e50ee40991424321e723f21692ddaaa1aea408054106eb0f69ceed2dc55d9fc2c2bf2c1f9bd2574827b37c42e580af436fd535657103c1 languageName: node linkType: hard From 11a25dcb387736f50cf77ffe378fa1da7ecd4656 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 10 Dec 2024 14:03:27 +0100 Subject: [PATCH 19/25] cleanup --- .../react/stories/OtherComponent.stories.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx b/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx index e96da836ecd2..dd410fe9c748 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx +++ b/test-storybooks/portable-stories-kitchen-sink/react/stories/OtherComponent.stories.tsx @@ -1,10 +1,5 @@ import { Meta, type StoryObj } from '@storybook/react' -declare global { - // eslint-disable-next-line no-var - var __vitest_browser__: boolean; -} - const Component = () => const meta = { From 65f64115f601ef656aa856bd93331622d3e231ed Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 12 Dec 2024 15:03:43 +0100 Subject: [PATCH 20/25] =?UTF-8?q?fix=20e2e=20tests=20=F0=9F=A4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/e2e-tests/component-testing.spec.ts | 28 ++++++++++------- .../react/yarn.lock | 31 +++++++++---------- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts index a6326a7284ab..9e88b7d0a579 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts +++ b/test-storybooks/portable-stories-kitchen-sink/react/e2e-tests/component-testing.spec.ts @@ -45,6 +45,7 @@ test.describe("component testing", () => { browserName, }) => { test.skip(browserName !== "chromium", `Skipping tests for ${browserName}`); + test.setTimeout(40_000) const sbPage = new SbPage(page, expect); await sbPage.navigateToStory("addons/group/test", "Mismatch Failure"); @@ -204,8 +205,11 @@ test.describe("component testing", () => { // We shouldn't have to do an arbitrary wait, but because there is no UI for loading state yet, we have to await page.waitForTimeout(8000); - await setForceFailureFlag(true); + await page.waitForTimeout(500); + + // Cleanup, to ensure watch mode is disabled in the other tests + await page.getByLabel("Disable watch mode for Component tests").click(); // Wait for test results to appear const errorFilter = page.getByLabel("Toggle errors"); @@ -354,15 +358,15 @@ test.describe("component testing", () => { const sidebarContextMenu = page.getByTestId('tooltip'); await sidebarContextMenu.getByLabel('Start Component tests').click(); - // Assert - 5 tests are running and reported - await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 6 test', { timeout: 30000 }); - // Assert - 1 failing test shows as a failed status - await expect(sidebarContextMenu.getByText('2 stories with errors')).toBeVisible(); + // Assert - Tests are running and reported + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 8 tests', { timeout: 30000 }); + // Assert - Failing test shows as a failed status + await expect(sidebarContextMenu.getByText('1 story with errors')).toBeVisible(); await expect(sidebarContextMenu.getByLabel('status: failed')).toHaveCount(1); await page.click('body'); - await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(4); - await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(2); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(7); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(1); }); test("should run focused test for a group", async ({ @@ -390,15 +394,15 @@ test.describe("component testing", () => { const sidebarContextMenu = page.getByTestId('tooltip'); await sidebarContextMenu.getByLabel('Start Component tests').click(); - // Assert - 5 tests are running and reported - await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 8 test', { timeout: 30000 }); + // Assert - Tests are running and reported + await expect(sidebarContextMenu.locator('#testing-module-description')).toContainText('Ran 10 test', { timeout: 30000 }); // Assert - 1 failing test shows as a failed status - await expect(sidebarContextMenu.getByText('3 stories with errors')).toBeVisible(); + await expect(sidebarContextMenu.getByText('2 stories with errors')).toBeVisible(); await expect(sidebarContextMenu.getByLabel('status: failed')).toHaveCount(1); await page.click('body'); - await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(4); - await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(2); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: success' })).toHaveCount(7); + await expect(page.locator('#storybook-explorer-menu').getByRole('status', { name: 'Test status: error' })).toHaveCount(1); }); test("should run focused tests without coverage, even when enabled", async ({ diff --git a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock index 121a15c54647..b8242119352f 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock +++ b/test-storybooks/portable-stories-kitchen-sink/react/yarn.lock @@ -1805,11 +1805,11 @@ __metadata: linkType: soft "@storybook/components@file:../../../code/deprecated/components::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.19 - resolution: "@storybook/components@file:../../../code/deprecated/components#../../../code/deprecated/components::hash=122d3f&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.20 + resolution: "@storybook/components@file:../../../code/deprecated/components#../../../code/deprecated/components::hash=40954d&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/05b0c9f070719f006de490f2b93c03cbb6df94eecde69e59b059eb651fb135e7eec1b2a5b1992530f5b162fa43c44a123a2767cc3b8b42cce4a970d851df7530 + checksum: 10/ff9107e9c84c5d522a0067f77e217a9963c4bdde27032fdd38efae906f67df7b65488969a9cee89715d49fa89213fe04a72af825ac118e72e835f4be648409ff languageName: node linkType: hard @@ -1865,15 +1865,14 @@ __metadata: linkType: hard "@storybook/experimental-addon-test@file:../../../code/addons/test::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.19 - resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=18d749&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.20 + resolution: "@storybook/experimental-addon-test@file:../../../code/addons/test#../../../code/addons/test::hash=1aa098&locator=portable-stories-react%40workspace%3A." dependencies: "@storybook/csf": "npm:0.1.12" "@storybook/global": "npm:^5.0.0" "@storybook/icons": "npm:^1.2.12" "@storybook/instrumenter": "workspace:*" "@storybook/test": "workspace:*" - "@storybook/theming": "workspace:*" polished: "npm:^4.2.2" prompts: "npm:^2.4.0" ts-dedent: "npm:^2.2.0" @@ -1889,7 +1888,7 @@ __metadata: optional: true vitest: optional: true - checksum: 10/5a7da852a826ea2adcfd160ba4e21057f8d1f4e75054f0024b349c4431799fd3b84d4050f787f0cf31e9319be3da30bcc15698da3a44aa219393fbaef95a2c78 + checksum: 10/42188bb3814cae7c04df03c75994f8df971cc2ce71bda9e536211b96468bbdf2b8babc78526fdec1b2ddbd4d703118474f23c31f2bddffb6fa8947dc35ef0f19 languageName: node linkType: hard @@ -1922,20 +1921,20 @@ __metadata: linkType: soft "@storybook/manager-api@file:../../../code/deprecated/manager-api::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.19 - resolution: "@storybook/manager-api@file:../../../code/deprecated/manager-api#../../../code/deprecated/manager-api::hash=a8307a&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.20 + resolution: "@storybook/manager-api@file:../../../code/deprecated/manager-api#../../../code/deprecated/manager-api::hash=92b213&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/c88dfdbe48e04bafd7195cf74d0dc3b6720ba531593e1aed4e6551a82fc7451f7ab05beed0d2f60579813c8f0ab32def2be3dabc2960f1af7ef8922524635fe1 + checksum: 10/c63e624ab2d90f2992ecb2a650d9e54ace0f7f699d425bc68f616f870651a2b5f3c6c7d66be84aaab9200a9f01686376a7532f905f0dbd4dddb5542afe855584 languageName: node linkType: hard "@storybook/preview-api@file:../../../code/deprecated/preview-api::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.19 - resolution: "@storybook/preview-api@file:../../../code/deprecated/preview-api#../../../code/deprecated/preview-api::hash=44e899&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.20 + resolution: "@storybook/preview-api@file:../../../code/deprecated/preview-api#../../../code/deprecated/preview-api::hash=b70449&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/11367f8c32331a0a5c3753ab9898ab9fee91c6623bd586cefaee8aceefb736046e62308443177abab63516dc690b0ff6ed43beed546ca5f0db01bd1a8314f22b + checksum: 10/3251de34aca72eb6c82b7aa8fde6e877e0974294d97eb60f63819b890b399cd7703a4dfde151180cf81918b36b3523bdbafe0731d232bda7d77c9f3b8fc5b75b languageName: node linkType: hard @@ -2016,11 +2015,11 @@ __metadata: linkType: soft "@storybook/theming@file:../../../code/deprecated/theming::locator=portable-stories-react%40workspace%3A.": - version: 8.5.0-alpha.19 - resolution: "@storybook/theming@file:../../../code/deprecated/theming#../../../code/deprecated/theming::hash=994155&locator=portable-stories-react%40workspace%3A." + version: 8.5.0-alpha.20 + resolution: "@storybook/theming@file:../../../code/deprecated/theming#../../../code/deprecated/theming::hash=db0fbd&locator=portable-stories-react%40workspace%3A." peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 - checksum: 10/702052b9c1449945adb94654283260f7a3cd1499fbe8f0d8ee0cd9985dfa19a72b8d6329316d7f73aeae1dda1d584eb2b5c4d5af8427be0919f8c2184c445e44 + checksum: 10/de77ed744ce172b1007cf94b4b5ff1cf9cf8492d4ddb9ac1ca61d76b18ed73f76e911c1518c1b66ba37c8d2d4e0f63f2eb3bddc64cd0beb7d64f952a45f9b8b7 languageName: node linkType: hard From 0225d09b982762993ee4802d79c5a1ce2e8137b3 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 12 Dec 2024 15:16:41 +0100 Subject: [PATCH 21/25] speedup kitchen sink storybook --- .../portable-stories-kitchen-sink/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/package.json b/test-storybooks/portable-stories-kitchen-sink/react/package.json index 7b87c70aaabb..80569a86f28c 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react/package.json @@ -12,7 +12,7 @@ "playwright-ct": "playwright test -c playwright-ct.config.ts", "playwright-e2e": "playwright test -c playwright-e2e.config.ts", "preview": "vite preview", - "storybook": "storybook dev -p 6006", + "storybook": "NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" storybook dev -p 6006", "vitest": "echo 'not running'", "vitest-skip-fail-on-purpose": "SKIP_FAIL_ON_PURPOSE=true vitest run" }, From 17652624def3c8e3e4f39ff4aaee7bae3f0399dc Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 12 Dec 2024 20:29:41 +0100 Subject: [PATCH 22/25] add fail-on-purpose tag to Button story --- .../react/stories/Button.stories.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.stories.tsx b/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.stories.tsx index 9d2cf8230964..2c976b43cc43 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.stories.tsx +++ b/test-storybooks/portable-stories-kitchen-sink/react/stories/Button.stories.tsx @@ -67,6 +67,8 @@ export const CSF3Primary: CSF3Story = { size: 'large', primary: true, }, + // Accessibility is failing for the Button + tags: ['fail-on-purpose'], }; export const CSF3Button: CSF3Story = { From 041d195760241e8ff299a87fb9da856ceec7cbad Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 17 Dec 2024 08:45:46 +0100 Subject: [PATCH 23/25] Update code/addons/test/src/components/TestProviderRender.tsx Co-authored-by: Norbert de Langen --- code/addons/test/src/components/TestProviderRender.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/addons/test/src/components/TestProviderRender.tsx b/code/addons/test/src/components/TestProviderRender.tsx index a5913c10d8cd..f91a6e2494fa 100644 --- a/code/addons/test/src/components/TestProviderRender.tsx +++ b/code/addons/test/src/components/TestProviderRender.tsx @@ -316,9 +316,9 @@ export const TestProviderRender: FC< /> } right={ - + coverageSummary.percentage ? {coverageSummary.percentage} % - + : null } /> ) : ( From 1fca1f65aba47c47affcd6813b0cdd36e44bef91 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 17 Dec 2024 10:43:08 +0100 Subject: [PATCH 24/25] fix format --- code/addons/test/src/components/TestProviderRender.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/addons/test/src/components/TestProviderRender.tsx b/code/addons/test/src/components/TestProviderRender.tsx index dab785d2cd28..e04772447c43 100644 --- a/code/addons/test/src/components/TestProviderRender.tsx +++ b/code/addons/test/src/components/TestProviderRender.tsx @@ -318,9 +318,11 @@ export const TestProviderRender: FC< /> } right={ - coverageSummary.percentage ? - {coverageSummary.percentage} % - : null + coverageSummary.percentage ? ( + + {coverageSummary.percentage} % + + ) : null } /> ) : ( From a19b0f562c540f1cf414e4d9b4ee7038eb3f173f Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 17 Dec 2024 13:35:35 +0100 Subject: [PATCH 25/25] reuse existing vitest script --- .circleci/config.yml | 4 ---- .../portable-stories-kitchen-sink/react/package.json | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 35c122f6c1ed..e124f267f1ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -757,10 +757,6 @@ jobs: name: Run E2E tests command: yarn playwright-e2e working_directory: test-storybooks/portable-stories-kitchen-sink/react - - run: - name: Run Vitest - command: yarn vitest-skip-fail-on-purpose - working_directory: test-storybooks/portable-stories-kitchen-sink/react - store_test_results: path: test-results - store_artifacts: diff --git a/test-storybooks/portable-stories-kitchen-sink/react/package.json b/test-storybooks/portable-stories-kitchen-sink/react/package.json index 80569a86f28c..383364e5909a 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react/package.json @@ -13,8 +13,7 @@ "playwright-e2e": "playwright test -c playwright-e2e.config.ts", "preview": "vite preview", "storybook": "NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" storybook dev -p 6006", - "vitest": "echo 'not running'", - "vitest-skip-fail-on-purpose": "SKIP_FAIL_ON_PURPOSE=true vitest run" + "vitest": "SKIP_FAIL_ON_PURPOSE=true vitest run" }, "resolutions": { "@playwright/test": "1.48.1",