From e465419765da48915ede8318350fe06b0c918661 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 5 Oct 2023 17:43:40 +0200 Subject: [PATCH] chore: update vitest to `1.0.0-beta` (#1776) --- package.json | 4 +-- pnpm-lock.yaml | 89 ++++++++++++++++++++++---------------------------- test/tests.ts | 2 +- 3 files changed, 42 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index b007828c9f..18ad10c31f 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "@types/node-fetch": "^2.6.6", "@types/semver": "^7.5.3", "@types/serve-static": "^1.15.3", - "@vitest/coverage-v8": "^0.34.6", + "@vitest/coverage-v8": "^1.0.0-beta.0", "changelogen": "^0.5.5", "edge-runtime": "^2.5.3", "eslint": "^8.50.0", @@ -147,7 +147,7 @@ "typescript": "^5.2.2", "unbuild": "^2.0.0", "undici": "^5.25.3", - "vitest": "^0.34.6", + "vitest": "^1.0.0--beta.0", "xml2js": "^0.6.2" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbe13e7266..dbd8faa23d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -227,8 +227,8 @@ importers: specifier: ^1.15.3 version: 1.15.3 '@vitest/coverage-v8': - specifier: ^0.34.6 - version: 0.34.6(vitest@0.34.6) + specifier: ^1.0.0-beta.0 + version: 1.0.0-beta.0(vitest@1.0.0-beta.0) changelogen: specifier: ^0.5.5 version: 0.5.5 @@ -272,8 +272,8 @@ importers: specifier: ^5.25.2 version: 5.25.3 vitest: - specifier: ^0.34.6 - version: 0.34.6 + specifier: ^1.0.0--beta.0 + version: 1.0.0-beta.0 xml2js: specifier: ^0.6.2 version: 0.6.2 @@ -1813,16 +1813,6 @@ packages: '@types/node': 20.8.0 dev: true - /@types/chai-subset@1.3.3: - resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} - dependencies: - '@types/chai': 4.3.6 - dev: true - - /@types/chai@4.3.6: - resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} - dev: true - /@types/connect@3.4.36: resolution: {integrity: sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==} dependencies: @@ -2169,8 +2159,8 @@ packages: - supports-color dev: false - /@vitest/coverage-v8@0.34.6(vitest@0.34.6): - resolution: {integrity: sha512-fivy/OK2d/EsJFoEoxHFEnNGTg+MmdZBAVK9Ka4qhXR2K3J0DS08vcGVwzDtXSuUMabLv4KtPcpSKkcMXFDViw==} + /@vitest/coverage-v8@1.0.0-beta.0(vitest@1.0.0-beta.0): + resolution: {integrity: sha512-99UphBlabZql1OLE+fF/S3uOtDSGhfpOFOnhSh+gAqWKi+XhsDBqV1qbZyn/98hNKIiNxzwjV5Yl3WudErDyoQ==} peerDependencies: vitest: '>=0.32.0 <1' dependencies: @@ -2185,43 +2175,43 @@ packages: std-env: 3.4.3 test-exclude: 6.0.0 v8-to-istanbul: 9.1.0 - vitest: 0.34.6 + vitest: 1.0.0-beta.0 transitivePeerDependencies: - supports-color dev: true - /@vitest/expect@0.34.6: - resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==} + /@vitest/expect@1.0.0-beta.0: + resolution: {integrity: sha512-1NgozGzQNb/gv5+Bh5j3J9DFXzAV+geDo0KXOiaWIG/DRXJYH1fCcw3veoyL/d5zK+KqV0HRIM3rVQEuIq/1Qg==} dependencies: - '@vitest/spy': 0.34.6 - '@vitest/utils': 0.34.6 + '@vitest/spy': 1.0.0-beta.0 + '@vitest/utils': 1.0.0-beta.0 chai: 4.3.10 dev: true - /@vitest/runner@0.34.6: - resolution: {integrity: sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==} + /@vitest/runner@1.0.0-beta.0: + resolution: {integrity: sha512-ZoXTqEWEAcxuNRfGzZGbEXg1nZbtKhRcftdnQ0cajNF2Nt7b5XKHUusCIMuejAePpTZihQNwIKyqe1hzwiju5Q==} dependencies: - '@vitest/utils': 0.34.6 + '@vitest/utils': 1.0.0-beta.0 p-limit: 4.0.0 pathe: 1.1.1 dev: true - /@vitest/snapshot@0.34.6: - resolution: {integrity: sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==} + /@vitest/snapshot@1.0.0-beta.0: + resolution: {integrity: sha512-yjBZZ+DHpqdkZpQ0LDYUCSSTlF293HsTKKLkLAIqmn0Y4XdVV7qgVEebDA612sqsZ+c9lJZ5JP6n/YkWwlGaPQ==} dependencies: magic-string: 0.30.4 pathe: 1.1.1 pretty-format: 29.7.0 dev: true - /@vitest/spy@0.34.6: - resolution: {integrity: sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==} + /@vitest/spy@1.0.0-beta.0: + resolution: {integrity: sha512-TpfQDtetSvFkzrJYMoNG55ip3Q/UfTxlJQ0Ue47Pom0of++6SJJw2WgXbIIPg6vM6yY0pH89+vmhUWTTVJnJrQ==} dependencies: tinyspy: 2.2.0 dev: true - /@vitest/utils@0.34.6: - resolution: {integrity: sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==} + /@vitest/utils@1.0.0-beta.0: + resolution: {integrity: sha512-6mREW4SAEN0QPn4bQT2simhBMM5a0/WaGXADtKPz/UV3sUojp3OK0qbgTHaJOK5wYD6jTY7YH9lNIbE2BWEiGQ==} dependencies: diff-sequences: 29.6.3 loupe: 2.3.6 @@ -6696,8 +6686,8 @@ packages: resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} dev: true - /tinypool@0.7.0: - resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} + /tinypool@0.8.1: + resolution: {integrity: sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==} engines: {node: '>=14.0.0'} dev: true @@ -7151,8 +7141,8 @@ packages: engines: {node: '>= 0.8'} dev: true - /vite-node@0.34.6(@types/node@20.8.0): - resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} + /vite-node@1.0.0-beta.0: + resolution: {integrity: sha512-5oUfJFXqDoZ6Y1ZJ9RYJyBACqfMT0aPfaIB1UwO0KFIR/5ijhcDlejfp4nR7j8lw1IOFu9ZttdEfPsQx0m0vOw==} engines: {node: '>=v14.18.0'} hasBin: true dependencies: @@ -7161,7 +7151,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.9(@types/node@20.8.0) + vite: 4.4.9 transitivePeerDependencies: - '@types/node' - less @@ -7173,7 +7163,7 @@ packages: - terser dev: true - /vite@4.4.9(@types/node@20.8.0): + /vite@4.4.9: resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -7201,7 +7191,6 @@ packages: terser: optional: true dependencies: - '@types/node': 20.8.0 esbuild: 0.18.20 postcss: 8.4.31 rollup: 3.29.4 @@ -7209,12 +7198,13 @@ packages: fsevents: 2.3.3 dev: true - /vitest@0.34.6: - resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} + /vitest@1.0.0-beta.0: + resolution: {integrity: sha512-CLHJ55qNQh8hCBgAHcI8aRxxD0tAE6u0rWOyIBwS3VpqVRB8vf/RAMYi3IngisQIDOdYynelBBxl3Zgohc3oTQ==} engines: {node: '>=v14.18.0'} hasBin: true peerDependencies: '@edge-runtime/vm': '*' + '@types/node': '>= 14' '@vitest/browser': '*' '@vitest/ui': '*' happy-dom: '*' @@ -7225,6 +7215,8 @@ packages: peerDependenciesMeta: '@edge-runtime/vm': optional: true + '@types/node': + optional: true '@vitest/browser': optional: true '@vitest/ui': @@ -7240,14 +7232,11 @@ packages: webdriverio: optional: true dependencies: - '@types/chai': 4.3.6 - '@types/chai-subset': 1.3.3 - '@types/node': 20.8.0 - '@vitest/expect': 0.34.6 - '@vitest/runner': 0.34.6 - '@vitest/snapshot': 0.34.6 - '@vitest/spy': 0.34.6 - '@vitest/utils': 0.34.6 + '@vitest/expect': 1.0.0-beta.0 + '@vitest/runner': 1.0.0-beta.0 + '@vitest/snapshot': 1.0.0-beta.0 + '@vitest/spy': 1.0.0-beta.0 + '@vitest/utils': 1.0.0-beta.0 acorn: 8.10.0 acorn-walk: 8.2.0 cac: 6.7.14 @@ -7260,9 +7249,9 @@ packages: std-env: 3.4.3 strip-literal: 1.3.0 tinybench: 2.5.1 - tinypool: 0.7.0 - vite: 4.4.9(@types/node@20.8.0) - vite-node: 0.34.6(@types/node@20.8.0) + tinypool: 0.8.1 + vite: 4.4.9 + vite-node: 1.0.0-beta.0 why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/test/tests.ts b/test/tests.ts index 19b0c55069..23145b1bf6 100644 --- a/test/tests.ts +++ b/test/tests.ts @@ -328,7 +328,7 @@ export function testNitro( const { status, headers } = await callHandler({ url: "/build/test.txt" }); expect(status).toBe(200); expect(headers.etag).toMatchInlineSnapshot( - '"\\"7-vxGfAKTuGVGhpDZqQLqV60dnKPw\\""' + `""7-vxGfAKTuGVGhpDZqQLqV60dnKPw""` ); expect(headers["content-type"]).toMatchInlineSnapshot( '"text/plain; charset=utf-8"'