From 08a17664c6325a9a4e4532f0537701fbb971c37b Mon Sep 17 00:00:00 2001 From: Adrien Cacciaguerra Date: Fri, 26 Jan 2024 17:34:56 +0100 Subject: [PATCH] fixup! feat(vitest-plugin): add support for benchmark hooks --- examples/with-typescript-esm/package.json | 2 +- packages/vitest-plugin/package.json | 4 +- pnpm-lock.yaml | 76 +++++++++++++---------- 3 files changed, 46 insertions(+), 36 deletions(-) diff --git a/examples/with-typescript-esm/package.json b/examples/with-typescript-esm/package.json index bdfc5fb..1568fa2 100644 --- a/examples/with-typescript-esm/package.json +++ b/examples/with-typescript-esm/package.json @@ -16,6 +16,6 @@ "esbuild-register": "^3.4.2", "tinybench": "^2.5.0", "typescript": "^5.1.3", - "vitest": "^1.0.3" + "vitest": "^1.2.2" } } diff --git a/packages/vitest-plugin/package.json b/packages/vitest-plugin/package.json index 922d04d..636c369 100644 --- a/packages/vitest-plugin/package.json +++ b/packages/vitest-plugin/package.json @@ -31,12 +31,12 @@ }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0", - "vitest": ">=1.0.0-beta.4 || >=1" + "vitest": ">=1.2.2" }, "devDependencies": { "@total-typescript/shoehorn": "^0.1.1", "execa": "^8.0.1", "vite": "^5.0.0", - "vitest": "^1.0.3" + "vitest": "^1.2.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f96cf4e..9aee711 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -173,8 +173,8 @@ importers: specifier: ^5.1.3 version: 5.1.3 vitest: - specifier: ^1.0.3 - version: 1.0.3(@types/node@18.15.11) + specifier: ^1.2.2 + version: 1.2.2(@types/node@18.15.11) examples/with-typescript-simple-cjs: devDependencies: @@ -321,8 +321,8 @@ importers: specifier: ^5.0.0 version: 5.0.0(@types/node@18.15.11) vitest: - specifier: ^1.0.3 - version: 1.0.3(@types/node@18.15.11) + specifier: ^1.2.2 + version: 1.2.2(@types/node@18.15.11) packages: /@ampproject/remapping@2.2.1: @@ -4861,32 +4861,32 @@ packages: eslint-visitor-keys: 3.4.0 dev: true - /@vitest/expect@1.0.3: + /@vitest/expect@1.2.2: resolution: { - integrity: sha512-J+JzGw/uvlWI3D3g8s0ewQo7C32nieF5VqEJpmIgAr8CAK36GvIQrV90lChEgQy79iwK3zyQx4UhfMeIF4572g==, + integrity: sha512-3jpcdPAD7LwHUUiT2pZTj2U82I2Tcgg2oVPvKxhn6mDI2On6tfvPQTjAI4628GUGDZrCm4Zna9iQHm5cEexOAg==, } dependencies: - "@vitest/spy": 1.0.3 - "@vitest/utils": 1.0.3 + "@vitest/spy": 1.2.2 + "@vitest/utils": 1.2.2 chai: 4.3.10 dev: true - /@vitest/runner@1.0.3: + /@vitest/runner@1.2.2: resolution: { - integrity: sha512-fCqShW4F8VJ78USVRoc5e1OD5jh1x1quZu4Mgp/lIhZS6PZPtI3wdCfRChWO9ZMJ2Ya7WI3sZTJZD69FR/AosA==, + integrity: sha512-JctG7QZ4LSDXr5CsUweFgcpEvrcxOV1Gft7uHrvkQ+fsAVylmWQvnaAr/HDp3LAH1fztGMQZugIheTWjaGzYIg==, } dependencies: - "@vitest/utils": 1.0.3 + "@vitest/utils": 1.2.2 p-limit: 5.0.0 pathe: 1.1.1 dev: true - /@vitest/snapshot@1.0.3: + /@vitest/snapshot@1.2.2: resolution: { - integrity: sha512-2EQwVEuHusEXr0SKuFiI1JVlysSrUceejtusr6vK254tusAz/g4//QrAiD1b7PMdcUKM8QmdgWvqCMaYDsWyNA==, + integrity: sha512-SmGY4saEw1+bwE1th6S/cZmPxz/Q4JWsl7LvbQIky2tKE35US4gd0Mjzqfr84/4OD0tikGWaWdMja/nWL5NIPA==, } dependencies: magic-string: 0.30.5 @@ -4894,22 +4894,23 @@ packages: pretty-format: 29.7.0 dev: true - /@vitest/spy@1.0.3: + /@vitest/spy@1.2.2: resolution: { - integrity: sha512-aMd7kvqJuZ/h27Q5XqNOh9fRX7cQJ9fcaPX8q/lk5h2MkAqvq/HuqZ7n1xjm2SDOlDqg3xMaEqP/4inNlNG62A==, + integrity: sha512-k9Gcahssw8d7X3pSLq3e3XEu/0L78mUkCjivUqCQeXJm9clfXR/Td8+AP+VC1O6fKPIDLcHDTAmBOINVuv6+7g==, } dependencies: tinyspy: 2.2.0 dev: true - /@vitest/utils@1.0.3: + /@vitest/utils@1.2.2: resolution: { - integrity: sha512-ddGKC6CVjxwjA+ourSlMD6Emc+PhIH6+d25ISGBOQjryXi2NtKpsBSOt1yDT793c2Tqij8g8BBxe87jam3B95w==, + integrity: sha512-WKITBHLsBHlpjnDQahr+XK6RE7MiAsgrIkr0pGhQ9ygoxBfUeG0lUG5iLlzqjmKSlBv3+j5EGsriBzh+C3Tq9g==, } dependencies: diff-sequences: 29.6.3 + estree-walker: 3.0.3 loupe: 2.3.7 pretty-format: 29.7.0 dev: true @@ -4997,10 +4998,10 @@ packages: engines: { node: ">=0.4.0" } dev: true - /acorn-walk@8.3.1: + /acorn-walk@8.3.2: resolution: { - integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==, + integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==, } engines: { node: ">=0.4.0" } dev: true @@ -7244,6 +7245,15 @@ packages: } dev: true + /estree-walker@3.0.3: + resolution: + { + integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==, + } + dependencies: + "@types/estree": 1.0.0 + dev: true + /esutils@2.0.3: resolution: { @@ -13203,10 +13213,10 @@ packages: } dev: true - /tinypool@0.8.1: + /tinypool@0.8.2: resolution: { - integrity: sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==, + integrity: sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==, } engines: { node: ">=14.0.0" } dev: true @@ -13802,10 +13812,10 @@ packages: builtins: 5.0.1 dev: true - /vite-node@1.0.3(@types/node@18.15.11): + /vite-node@1.2.2(@types/node@18.15.11): resolution: { - integrity: sha512-7AH08/UgJQm4gWFyXB6xQ1AvI+iMioM2duPmptytxEbkHamVrOhoha4REt9xvOgyiw91G9OykRlixN4zIsQOQg==, + integrity: sha512-1as4rDTgVWJO3n1uHmUYqq7nsFgINQ9u+mRcXpjeOMJUmviqNKjcZB7UfRZrlM7MjYXMKpuWp5oGkjaFLnjawg==, } engines: { node: ^18.0.0 || >=20.0.0 } hasBin: true @@ -13865,10 +13875,10 @@ packages: fsevents: 2.3.3 dev: true - /vitest@1.0.3(@types/node@18.15.11): + /vitest@1.2.2(@types/node@18.15.11): resolution: { - integrity: sha512-zbMmAdRjTki6mYXEjCXMVH8Vb0FX0rAfCSTrbbn3Dqd8Zz6FzImBavkKYsOF+iXd4+k5RoOqi6RyTSoroRS0mw==, + integrity: sha512-d5Ouvrnms3GD9USIK36KG8OZ5bEvKEkITFtnGv56HFaSlbItJuYr7hv2Lkn903+AvRAgSixiamozUVfORUekjw==, } engines: { node: ^18.0.0 || >=20.0.0 } hasBin: true @@ -13894,12 +13904,12 @@ packages: optional: true dependencies: "@types/node": 18.15.11 - "@vitest/expect": 1.0.3 - "@vitest/runner": 1.0.3 - "@vitest/snapshot": 1.0.3 - "@vitest/spy": 1.0.3 - "@vitest/utils": 1.0.3 - acorn-walk: 8.3.1 + "@vitest/expect": 1.2.2 + "@vitest/runner": 1.2.2 + "@vitest/snapshot": 1.2.2 + "@vitest/spy": 1.2.2 + "@vitest/utils": 1.2.2 + acorn-walk: 8.3.2 cac: 6.7.14 chai: 4.3.10 debug: 4.3.4 @@ -13911,9 +13921,9 @@ packages: std-env: 3.6.0 strip-literal: 1.3.0 tinybench: 2.5.1 - tinypool: 0.8.1 + tinypool: 0.8.2 vite: 5.0.0(@types/node@18.15.11) - vite-node: 1.0.3(@types/node@18.15.11) + vite-node: 1.2.2(@types/node@18.15.11) why-is-node-running: 2.2.2 transitivePeerDependencies: - less