From fd714cf083cc5755a110a5dd2bace4b9bae69ded Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 11:51:30 +0100 Subject: [PATCH] chore(deps): update vitest to v2.0.5 (#907) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe --- examples/app-vitest-full/package.json | 2 +- examples/app-vitest/package.json | 2 +- examples/content/package.json | 2 +- examples/i18n/package.json | 2 +- examples/module/package.json | 2 +- package.json | 7 +- pnpm-lock.yaml | 137 ++++++++++---------------- src/config.ts | 75 +++++++------- 8 files changed, 105 insertions(+), 124 deletions(-) diff --git a/examples/app-vitest-full/package.json b/examples/app-vitest-full/package.json index f69df339c..db85c3bcc 100644 --- a/examples/app-vitest-full/package.json +++ b/examples/app-vitest-full/package.json @@ -24,7 +24,7 @@ "listhen": "1.7.2", "nuxt": "3.12.4", "typescript": "5.5.4", - "vitest": "2.0.4", + "vitest": "2.0.5", "vue-tsc": "2.0.29" }, "dependencies": { diff --git a/examples/app-vitest/package.json b/examples/app-vitest/package.json index c3dae5465..8b3596c18 100644 --- a/examples/app-vitest/package.json +++ b/examples/app-vitest/package.json @@ -21,6 +21,6 @@ "happy-dom": "14.12.3", "playwright-core": "1.46.0", "typescript": "5.5.4", - "vitest": "2.0.4" + "vitest": "2.0.5" } } diff --git a/examples/content/package.json b/examples/content/package.json index 76f9cc4b5..7900c7b5e 100644 --- a/examples/content/package.json +++ b/examples/content/package.json @@ -13,6 +13,6 @@ "@nuxt/content": "2.13.2", "@nuxt/test-utils": "latest", "nuxt": "3.12.4", - "vitest": "2.0.4" + "vitest": "2.0.5" } } diff --git a/examples/i18n/package.json b/examples/i18n/package.json index b9b488cb0..a81f6fd2c 100644 --- a/examples/i18n/package.json +++ b/examples/i18n/package.json @@ -15,7 +15,7 @@ "@nuxt/test-utils": "latest", "@nuxtjs/i18n": "8.3.3", "nuxt": "3.12.4", - "vitest": "2.0.4", + "vitest": "2.0.5", "vue": "3.4.37", "vue-router": "4.4.3" } diff --git a/examples/module/package.json b/examples/module/package.json index 6e2708a27..d88fd78be 100644 --- a/examples/module/package.json +++ b/examples/module/package.json @@ -36,6 +36,6 @@ "@nuxt/test-utils": "latest", "changelogen": "0.5.5", "nuxt": "3.12.4", - "vitest": "2.0.4" + "vitest": "2.0.5" } } diff --git a/package.json b/package.json index df5e2f560..b5be6f821 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@types/estree": "1.0.5", "@types/jsdom": "21.1.7", "@types/semver": "7.5.8", - "@vitest/ui": "2.0.4", + "@vitest/ui": "2.0.5", "@vue/test-utils": "2.4.6", "changelogen": "0.5.5", "compatx": "0.1.8", @@ -91,7 +91,7 @@ "unbuild": "latest", "unimport": "3.10.0", "vite": "5.4.0", - "vitest": "2.0.4", + "vitest": "2.0.5", "vue-router": "4.4.3", "vue-tsc": "2.0.29" }, @@ -152,7 +152,8 @@ "@nuxt/test-utils": "workspace:*", "rollup": "4.20.0", "vite": "5.4.0", - "vitest": "2.0.4", + "vite-node": "2.0.5", + "vitest": "2.0.5", "vue": "^3.4.37" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index efcd955d3..d0d0501b0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,7 +12,8 @@ overrides: '@nuxt/test-utils': workspace:* rollup: 4.20.0 vite: 5.4.0 - vitest: 2.0.4 + vite-node: 2.0.5 + vitest: 2.0.5 vue: ^3.4.37 importers: @@ -129,8 +130,8 @@ importers: specifier: 7.5.8 version: 7.5.8 '@vitest/ui': - specifier: 2.0.4 - version: 2.0.4(vitest@2.0.4) + specifier: 2.0.5 + version: 2.0.5(vitest@2.0.5) '@vue/test-utils': specifier: 2.4.6 version: 2.4.6 @@ -177,8 +178,8 @@ importers: specifier: 5.4.0 version: 5.4.0(@types/node@20.10.5)(terser@5.24.0) vitest: - specifier: 2.0.4 - version: 2.0.4(@types/node@20.10.5)(@vitest/ui@2.0.4)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) + specifier: 2.0.5 + version: 2.0.5(@types/node@20.10.5)(@vitest/ui@2.0.5)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) vue-router: specifier: 4.4.3 version: 4.4.3(vue@3.4.37(typescript@5.5.4)) @@ -289,8 +290,8 @@ importers: specifier: 5.5.4 version: 5.5.4 vitest: - specifier: 2.0.4 - version: 2.0.4(@types/node@20.10.5)(@vitest/ui@2.0.4)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) + specifier: 2.0.5 + version: 2.0.5(@types/node@20.10.5)(@vitest/ui@2.0.5)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) examples/app-vitest-full: dependencies: @@ -323,8 +324,8 @@ importers: specifier: 5.5.4 version: 5.5.4 vitest: - specifier: 2.0.4 - version: 2.0.4(@types/node@20.10.5)(@vitest/ui@2.0.4)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) + specifier: 2.0.5 + version: 2.0.5(@types/node@20.10.5)(@vitest/ui@2.0.5)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) vue-tsc: specifier: 2.0.29 version: 2.0.29(typescript@5.5.4) @@ -341,8 +342,8 @@ importers: specifier: 3.12.4 version: 3.12.4(@opentelemetry/api@1.9.0)(@parcel/watcher@2.4.1)(@types/node@20.10.5)(encoding@0.1.13)(eslint@9.9.0(jiti@1.21.6))(idb-keyval@6.2.1)(ioredis@5.4.1)(magicast@0.3.4)(optionator@0.9.3)(rollup@4.20.0)(terser@5.24.0)(typescript@5.5.4)(vite@5.4.0(@types/node@20.10.5)(terser@5.24.0))(vue-tsc@2.0.29(typescript@5.5.4)) vitest: - specifier: 2.0.4 - version: 2.0.4(@types/node@20.10.5)(@vitest/ui@2.0.4)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) + specifier: 2.0.5 + version: 2.0.5(@types/node@20.10.5)(@vitest/ui@2.0.5)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) examples/i18n: devDependencies: @@ -359,8 +360,8 @@ importers: specifier: 3.12.4 version: 3.12.4(@opentelemetry/api@1.9.0)(@parcel/watcher@2.4.1)(@types/node@20.10.5)(encoding@0.1.13)(eslint@9.9.0(jiti@1.21.6))(idb-keyval@6.2.1)(ioredis@5.4.1)(magicast@0.3.4)(optionator@0.9.3)(rollup@4.20.0)(terser@5.24.0)(typescript@5.5.4)(vite@5.4.0(@types/node@20.10.5)(terser@5.24.0))(vue-tsc@2.0.29(typescript@5.5.4)) vitest: - specifier: 2.0.4 - version: 2.0.4(@types/node@20.10.5)(@vitest/ui@2.0.4)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) + specifier: 2.0.5 + version: 2.0.5(@types/node@20.10.5)(@vitest/ui@2.0.5)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) vue: specifier: ^3.4.37 version: 3.4.37(typescript@5.5.4) @@ -396,8 +397,8 @@ importers: specifier: 3.12.4 version: 3.12.4(@opentelemetry/api@1.9.0)(@parcel/watcher@2.4.1)(@types/node@20.10.5)(encoding@0.1.13)(eslint@9.9.0(jiti@1.21.6))(idb-keyval@6.2.1)(ioredis@5.4.1)(magicast@0.3.4)(optionator@0.9.3)(rollup@4.20.0)(terser@5.24.0)(typescript@5.5.4)(vite@5.4.0(@types/node@20.10.5)(terser@5.24.0))(vue-tsc@2.0.29(typescript@5.5.4)) vitest: - specifier: 2.0.4 - version: 2.0.4(@types/node@20.10.5)(@vitest/ui@2.0.4)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) + specifier: 2.0.5 + version: 2.0.5(@types/node@20.10.5)(@vitest/ui@2.0.5)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) examples/module/playground: dependencies: @@ -2528,31 +2529,28 @@ packages: vite: 5.4.0 vue: ^3.4.37 - '@vitest/expect@2.0.4': - resolution: {integrity: sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==} - - '@vitest/pretty-format@2.0.4': - resolution: {integrity: sha512-RYZl31STbNGqf4l2eQM1nvKPXE0NhC6Eq0suTTePc4mtMQ1Fn8qZmjV4emZdEdG2NOWGKSCrHZjmTqDCDoeFBw==} + '@vitest/expect@2.0.5': + resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} '@vitest/pretty-format@2.0.5': resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} - '@vitest/runner@2.0.4': - resolution: {integrity: sha512-Gk+9Su/2H2zNfNdeJR124gZckd5st4YoSuhF1Rebi37qTXKnqYyFCd9KP4vl2cQHbtuVKjfEKrNJxHHCW8thbQ==} + '@vitest/runner@2.0.5': + resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} - '@vitest/snapshot@2.0.4': - resolution: {integrity: sha512-or6Mzoz/pD7xTvuJMFYEtso1vJo1S5u6zBTinfl+7smGUhqybn6VjzCDMhmTyVOFWwkCMuNjmNNxnyXPgKDoPw==} + '@vitest/snapshot@2.0.5': + resolution: {integrity: sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==} - '@vitest/spy@2.0.4': - resolution: {integrity: sha512-uTXU56TNoYrTohb+6CseP8IqNwlNdtPwEO0AWl+5j7NelS6x0xZZtP0bDWaLvOfUbaYwhhWp1guzXUxkC7mW7Q==} + '@vitest/spy@2.0.5': + resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} - '@vitest/ui@2.0.4': - resolution: {integrity: sha512-9SNE9ve3kgDkVTxJsY7BjqSwyqDVRJbq/AHVHZs+V0vmr/0cCX6yGT6nOahSXEsXFtKAsvRtBXKlTgr+5njzZQ==} + '@vitest/ui@2.0.5': + resolution: {integrity: sha512-m+ZpVt/PVi/nbeRKEjdiYeoh0aOfI9zr3Ria9LO7V2PlMETtAXJS3uETEZkc8Be2oOl8mhd7Ew+5SRBXRYncNw==} peerDependencies: - vitest: 2.0.4 + vitest: 2.0.5 - '@vitest/utils@2.0.4': - resolution: {integrity: sha512-Zc75QuuoJhOBnlo99ZVUkJIuq4Oj0zAkrQ2VzCqNCx6wAwViHEh5Fnp4fiJTE9rA+sAoXRf00Z9xGgfEzV6fzQ==} + '@vitest/utils@2.0.5': + resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} '@volar/language-core@2.4.0-alpha.18': resolution: {integrity: sha512-JAYeJvYQQROmVRtSBIczaPjP3DX4QW1fOqW1Ebs0d3Y3EwSNRglz03dSv0Dm61dzd0Yx3WgTW3hndDnTQqgmyg==} @@ -6675,11 +6673,6 @@ packages: vfile@6.0.1: resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} - vite-node@2.0.4: - resolution: {integrity: sha512-ZpJVkxcakYtig5iakNeL7N3trufe3M6vGuzYAr4GsbCTwobDeyPJpE4cjDhhPluv8OvQCFzu2LWp6GkoKRITXA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - vite-node@2.0.5: resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==} engines: {node: ^18.0.0 || >=20.0.0} @@ -6768,15 +6761,15 @@ packages: vitest-environment-nuxt@1.0.0: resolution: {integrity: sha512-AWMO9h4HdbaFdPWZw34gALFI8gbBiOpvfbyeZwHIPfh4kWg/TwElYHvYMQ61WPUlCGaS5LebfHkaI0WPyb//Iw==} - vitest@2.0.4: - resolution: {integrity: sha512-luNLDpfsnxw5QSW4bISPe6tkxVvv5wn2BBs/PuDRkhXZ319doZyLOBr1sjfB5yCEpTiU7xCAdViM8TNVGPwoog==} + vitest@2.0.5: + resolution: {integrity: sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.0.4 - '@vitest/ui': 2.0.4 + '@vitest/browser': 2.0.5 + '@vitest/ui': 2.0.5 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -9453,50 +9446,46 @@ snapshots: vite: 5.4.0(@types/node@20.10.5)(terser@5.24.0) vue: 3.4.37(typescript@5.5.4) - '@vitest/expect@2.0.4': + '@vitest/expect@2.0.5': dependencies: - '@vitest/spy': 2.0.4 - '@vitest/utils': 2.0.4 + '@vitest/spy': 2.0.5 + '@vitest/utils': 2.0.5 chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.0.4': - dependencies: - tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.0.5': dependencies: tinyrainbow: 1.2.0 - '@vitest/runner@2.0.4': + '@vitest/runner@2.0.5': dependencies: - '@vitest/utils': 2.0.4 + '@vitest/utils': 2.0.5 pathe: 1.1.2 - '@vitest/snapshot@2.0.4': + '@vitest/snapshot@2.0.5': dependencies: - '@vitest/pretty-format': 2.0.4 + '@vitest/pretty-format': 2.0.5 magic-string: 0.30.11 pathe: 1.1.2 - '@vitest/spy@2.0.4': + '@vitest/spy@2.0.5': dependencies: tinyspy: 3.0.0 - '@vitest/ui@2.0.4(vitest@2.0.4)': + '@vitest/ui@2.0.5(vitest@2.0.5)': dependencies: - '@vitest/utils': 2.0.4 + '@vitest/utils': 2.0.5 fast-glob: 3.3.2 fflate: 0.8.2 flatted: 3.3.1 pathe: 1.1.2 sirv: 2.0.4 tinyrainbow: 1.2.0 - vitest: 2.0.4(@types/node@20.10.5)(@vitest/ui@2.0.4)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) + vitest: 2.0.5(@types/node@20.10.5)(@vitest/ui@2.0.5)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0) - '@vitest/utils@2.0.4': + '@vitest/utils@2.0.5': dependencies: - '@vitest/pretty-format': 2.0.4 + '@vitest/pretty-format': 2.0.5 estree-walker: 3.0.3 loupe: 3.1.1 tinyrainbow: 1.2.0 @@ -14649,24 +14638,6 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vite-node@2.0.4(@types/node@20.10.5)(terser@5.24.0): - dependencies: - cac: 6.7.14 - debug: 4.3.5(supports-color@8.1.1) - pathe: 1.1.2 - tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@20.10.5)(terser@5.24.0) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - vite-node@2.0.5(@types/node@20.10.5)(terser@5.24.0): dependencies: cac: 6.7.14 @@ -14755,15 +14726,15 @@ snapshots: dependencies: '@nuxt/test-utils': 'link:' - vitest@2.0.4(@types/node@20.10.5)(@vitest/ui@2.0.4)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0): + vitest@2.0.5(@types/node@20.10.5)(@vitest/ui@2.0.5)(happy-dom@14.12.3)(jsdom@24.1.1)(terser@5.24.0): dependencies: '@ampproject/remapping': 2.3.0 - '@vitest/expect': 2.0.4 + '@vitest/expect': 2.0.5 '@vitest/pretty-format': 2.0.5 - '@vitest/runner': 2.0.4 - '@vitest/snapshot': 2.0.4 - '@vitest/spy': 2.0.4 - '@vitest/utils': 2.0.4 + '@vitest/runner': 2.0.5 + '@vitest/snapshot': 2.0.5 + '@vitest/spy': 2.0.5 + '@vitest/utils': 2.0.5 chai: 5.1.1 debug: 4.3.5(supports-color@8.1.1) execa: 8.0.1 @@ -14774,11 +14745,11 @@ snapshots: tinypool: 1.0.0 tinyrainbow: 1.2.0 vite: 5.4.0(@types/node@20.10.5)(terser@5.24.0) - vite-node: 2.0.4(@types/node@20.10.5)(terser@5.24.0) + vite-node: 2.0.5(@types/node@20.10.5)(terser@5.24.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.10.5 - '@vitest/ui': 2.0.4(vitest@2.0.4) + '@vitest/ui': 2.0.5(vitest@2.0.5) happy-dom: 14.12.3 jsdom: 24.1.1 transitivePeerDependencies: diff --git a/src/config.ts b/src/config.ts index 1e2ab7a35..801216d2f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -224,40 +224,49 @@ export function defineVitestConfig(config: InlineConfig & { test?: VitestConfig }) } -declare module 'vitest' { +interface NuxtEnvironmentOptions { + rootDir?: string + /** + * The starting URL for your Nuxt window environment + * @default {http://localhost:3000} + */ + url?: string + /** + * You can define how environment options are read when loading the Nuxt configuration. + */ + dotenv?: Partial + /** + * Configuration that will override the values in your `nuxt.config` file. + */ + overrides?: NuxtConfig + /** + * The id of the root div to which the app should be mounted. You should also set `app.rootId` to the same value. + * @default {nuxt-test} + */ + rootId?: string + /** + * The name of the DOM environment to use. + * + * It also needs to be installed as a dev dependency in your project. + * @default {happy-dom} + */ + domEnvironment?: 'happy-dom' | 'jsdom' + + mock?: { + intersectionObserver?: boolean + indexedDb?: boolean + } +} + +declare module 'vitest/node' { interface EnvironmentOptions { - nuxt?: { - rootDir?: string - /** - * The starting URL for your Nuxt window environment - * @default {http://localhost:3000} - */ - url?: string - /** - * You can define how environment options are read when loading the Nuxt configuration. - */ - dotenv?: Partial - /** - * Configuration that will override the values in your `nuxt.config` file. - */ - overrides?: NuxtConfig - /** - * The id of the root div to which the app should be mounted. You should also set `app.rootId` to the same value. - * @default {nuxt-test} - */ - rootId?: string - /** - * The name of the DOM environment to use. - * - * It also needs to be installed as a dev dependency in your project. - * @default {happy-dom} - */ - domEnvironment?: 'happy-dom' | 'jsdom' + nuxt?: NuxtEnvironmentOptions + } +} - mock?: { - intersectionObserver?: boolean - indexedDb?: boolean - } - } +declare module 'vitest' { + // @ts-expect-error Duplicate augmentation for backwards-compatibility + interface EnvironmentOptions { + nuxt?: NuxtEnvironmentOptions } }