From 9d61f5179e3ff6b2dda3496176afd5d66c42c278 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 3 Feb 2025 10:23:58 -0600 Subject: [PATCH 01/33] Install `vitest` --- packages/type-utils/package.json | 6 +- yarn.lock | 676 ++++++++++++++----------------- 2 files changed, 298 insertions(+), 384 deletions(-) diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 5d30290cc412..ac14ce2e1681 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -57,14 +57,14 @@ "typescript": ">=4.8.4 <5.9.0" }, "devDependencies": { - "@jest/types": "29.6.3", "@typescript-eslint/parser": "8.29.0", + "@vitest/coverage-v8": "^3.0.7", "ajv": "^6.12.6", "downlevel-dts": "*", - "jest": "29.7.0", "prettier": "^3.2.5", "rimraf": "*", - "typescript": "*" + "typescript": "*", + "vitest": "^3.0.7" }, "funding": { "type": "opencollective", diff --git a/yarn.lock b/yarn.lock index 960e7d2d1c13..3fbeca172cc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -569,13 +569,13 @@ __metadata: linkType: hard "@babel/parser@npm:^7.25.4": - version: 7.26.10 - resolution: "@babel/parser@npm:7.26.10" + version: 7.26.9 + resolution: "@babel/parser@npm:7.26.9" dependencies: - "@babel/types": ^7.26.10 + "@babel/types": ^7.26.9 bin: parser: ./bin/babel-parser.js - checksum: 81f9af962aea55a2973d213dffc6191939df7eba0511ba585d23f0d838931f5fca2efb83ae382e4b9bb486f20ae1b2607cb1b8be49af89e9f011fb4355727f47 + checksum: 2df965dbf3c67d19dc437412ceef23033b4d39b0dbd7cb498d8ab9ad9e1738338656ee72676199773b37d658edf9f4161cf255515234fed30695d74e73be5514 languageName: node linkType: hard @@ -1728,13 +1728,13 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.25.4, @babel/types@npm:^7.26.10": - version: 7.26.10 - resolution: "@babel/types@npm:7.26.10" +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.26.9": + version: 7.26.9 + resolution: "@babel/types@npm:7.26.9" dependencies: "@babel/helper-string-parser": ^7.25.9 "@babel/helper-validator-identifier": ^7.25.9 - checksum: 07340068ea3824dcaccf702dfc9628175c9926912ad6efba182d8b07e20953297d0a514f6fb103a61b9d5c555c8b87fc2237ddb06efebe14794eefc921dfa114 + checksum: cc124c149615deb30343a4c81ac5b0e3a68bdb4b1bd61a91a2859ee8e5e5f400f6ff65be4740f407c17bfc09baa9c777e7f8f765dccf3284963956b67ac95a38 languageName: node linkType: hard @@ -3048,13 +3048,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/aix-ppc64@npm:0.25.1" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - "@esbuild/android-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-arm64@npm:0.20.2" @@ -3069,13 +3062,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/android-arm64@npm:0.25.1" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/android-arm@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-arm@npm:0.20.2" @@ -3090,13 +3076,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/android-arm@npm:0.25.1" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - "@esbuild/android-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-x64@npm:0.20.2" @@ -3111,13 +3090,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-x64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/android-x64@npm:0.25.1" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - "@esbuild/darwin-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/darwin-arm64@npm:0.20.2" @@ -3132,13 +3104,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/darwin-arm64@npm:0.25.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/darwin-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/darwin-x64@npm:0.20.2" @@ -3153,13 +3118,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/darwin-x64@npm:0.25.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@esbuild/freebsd-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/freebsd-arm64@npm:0.20.2" @@ -3174,13 +3132,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/freebsd-arm64@npm:0.25.1" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/freebsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/freebsd-x64@npm:0.20.2" @@ -3195,13 +3146,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/freebsd-x64@npm:0.25.1" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - "@esbuild/linux-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-arm64@npm:0.20.2" @@ -3216,13 +3160,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/linux-arm64@npm:0.25.1" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/linux-arm@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-arm@npm:0.20.2" @@ -3237,13 +3174,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/linux-arm@npm:0.25.1" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - "@esbuild/linux-ia32@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-ia32@npm:0.20.2" @@ -3258,13 +3188,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/linux-ia32@npm:0.25.1" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - "@esbuild/linux-loong64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-loong64@npm:0.20.2" @@ -3279,13 +3202,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/linux-loong64@npm:0.25.1" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - "@esbuild/linux-mips64el@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-mips64el@npm:0.20.2" @@ -3300,13 +3216,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/linux-mips64el@npm:0.25.1" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - "@esbuild/linux-ppc64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-ppc64@npm:0.20.2" @@ -3321,13 +3230,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/linux-ppc64@npm:0.25.1" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - "@esbuild/linux-riscv64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-riscv64@npm:0.20.2" @@ -3342,13 +3244,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/linux-riscv64@npm:0.25.1" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - "@esbuild/linux-s390x@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-s390x@npm:0.20.2" @@ -3363,13 +3258,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/linux-s390x@npm:0.25.1" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - "@esbuild/linux-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-x64@npm:0.20.2" @@ -3384,13 +3272,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/linux-x64@npm:0.25.1" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - "@esbuild/netbsd-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/netbsd-arm64@npm:0.25.0" @@ -3398,13 +3279,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/netbsd-arm64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/netbsd-arm64@npm:0.25.1" - conditions: os=netbsd & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/netbsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/netbsd-x64@npm:0.20.2" @@ -3419,13 +3293,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/netbsd-x64@npm:0.25.1" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - "@esbuild/openbsd-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/openbsd-arm64@npm:0.25.0" @@ -3433,13 +3300,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/openbsd-arm64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/openbsd-arm64@npm:0.25.1" - conditions: os=openbsd & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/openbsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/openbsd-x64@npm:0.20.2" @@ -3454,13 +3314,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/openbsd-x64@npm:0.25.1" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - "@esbuild/sunos-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/sunos-x64@npm:0.20.2" @@ -3475,13 +3328,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/sunos-x64@npm:0.25.1" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - "@esbuild/win32-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-arm64@npm:0.20.2" @@ -3496,13 +3342,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/win32-arm64@npm:0.25.1" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/win32-ia32@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-ia32@npm:0.20.2" @@ -3517,13 +3356,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/win32-ia32@npm:0.25.1" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - "@esbuild/win32-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-x64@npm:0.20.2" @@ -3538,13 +3370,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.25.1": - version: 0.25.1 - resolution: "@esbuild/win32-x64@npm:0.25.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@eslint-community/eslint-plugin-eslint-comments@npm:^4.4.1": version: 4.4.1 resolution: "@eslint-community/eslint-plugin-eslint-comments@npm:4.4.1" @@ -4703,135 +4528,135 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.35.0" +"@rollup/rollup-android-arm-eabi@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.34.9" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-android-arm64@npm:4.35.0" +"@rollup/rollup-android-arm64@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-android-arm64@npm:4.34.9" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-darwin-arm64@npm:4.35.0" +"@rollup/rollup-darwin-arm64@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-darwin-arm64@npm:4.34.9" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-darwin-x64@npm:4.35.0" +"@rollup/rollup-darwin-x64@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-darwin-x64@npm:4.34.9" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-freebsd-arm64@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-freebsd-arm64@npm:4.35.0" +"@rollup/rollup-freebsd-arm64@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.34.9" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-freebsd-x64@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-freebsd-x64@npm:4.35.0" +"@rollup/rollup-freebsd-x64@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-freebsd-x64@npm:4.34.9" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.35.0" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.34.9" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.35.0" +"@rollup/rollup-linux-arm-musleabihf@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.34.9" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.35.0" +"@rollup/rollup-linux-arm64-gnu@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.34.9" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.35.0" +"@rollup/rollup-linux-arm64-musl@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.34.9" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-loongarch64-gnu@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.35.0" +"@rollup/rollup-linux-loongarch64-gnu@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.34.9" conditions: os=linux & cpu=loong64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.35.0" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.34.9" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.35.0" +"@rollup/rollup-linux-riscv64-gnu@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.34.9" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.35.0" +"@rollup/rollup-linux-s390x-gnu@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.34.9" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.35.0" +"@rollup/rollup-linux-x64-gnu@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.34.9" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.35.0" +"@rollup/rollup-linux-x64-musl@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.34.9" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.35.0" +"@rollup/rollup-win32-arm64-msvc@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.34.9" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.35.0" +"@rollup/rollup-win32-ia32-msvc@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.34.9" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.35.0": - version: 4.35.0 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.35.0" +"@rollup/rollup-win32-x64-msvc@npm:4.34.9": + version: 4.34.9 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.34.9" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -6202,18 +6027,18 @@ __metadata: version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: - "@jest/types": 29.6.3 "@typescript-eslint/parser": 8.29.0 "@typescript-eslint/typescript-estree": 8.29.0 "@typescript-eslint/utils": 8.29.0 + "@vitest/coverage-v8": ^3.0.7 ajv: ^6.12.6 debug: ^4.3.4 downlevel-dts: "*" - jest: 29.7.0 prettier: ^3.2.5 rimraf: "*" ts-api-utils: ^2.0.1 typescript: "*" + vitest: ^3.0.7 peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" @@ -6413,6 +6238,32 @@ __metadata: languageName: node linkType: hard +"@vitest/coverage-v8@npm:^3.0.7": + version: 3.0.7 + resolution: "@vitest/coverage-v8@npm:3.0.7" + dependencies: + "@ampproject/remapping": ^2.3.0 + "@bcoe/v8-coverage": ^1.0.2 + debug: ^4.4.0 + istanbul-lib-coverage: ^3.2.2 + istanbul-lib-report: ^3.0.1 + istanbul-lib-source-maps: ^5.0.6 + istanbul-reports: ^3.1.7 + magic-string: ^0.30.17 + magicast: ^0.3.5 + std-env: ^3.8.0 + test-exclude: ^7.0.1 + tinyrainbow: ^2.0.0 + peerDependencies: + "@vitest/browser": 3.0.7 + vitest: 3.0.7 + peerDependenciesMeta: + "@vitest/browser": + optional: true + checksum: 46c5eb628bb1b77a3b6dc6cbf0c3968721fa5cbf9b01919f8e01252d239560a54c94797337e859a63cdf0f6606a8ad26f96c832f6b2c667890e0e026d44a4780 + languageName: node + linkType: hard + "@vitest/coverage-v8@npm:^3.0.8": version: 3.0.8 resolution: "@vitest/coverage-v8@npm:3.0.8" @@ -6456,6 +6307,18 @@ __metadata: languageName: node linkType: hard +"@vitest/expect@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/expect@npm:3.0.7" + dependencies: + "@vitest/spy": 3.0.7 + "@vitest/utils": 3.0.7 + chai: ^5.2.0 + tinyrainbow: ^2.0.0 + checksum: 788ead8ec0876a15bcd51eba8b5e0bc4c95e07205192096c0e33328992c351a7569b32ea2f948dbfc7b5482f301e6d505cde639ead2e80ffc9f0d683714b1bfa + languageName: node + linkType: hard + "@vitest/expect@npm:3.0.8": version: 3.0.8 resolution: "@vitest/expect@npm:3.0.8" @@ -6468,6 +6331,25 @@ __metadata: languageName: node linkType: hard +"@vitest/mocker@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/mocker@npm:3.0.7" + dependencies: + "@vitest/spy": 3.0.7 + estree-walker: ^3.0.3 + magic-string: ^0.30.17 + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + checksum: 057fe03ab4f9ef40f5431a375dc812da8face4f6c6045c817402bcd0739992ff1d31de080d8ac8c4122f792b2d27c4c04a4e4e872a04c3ba2b1517bc78430130 + languageName: node + linkType: hard + "@vitest/mocker@npm:3.0.8": version: 3.0.8 resolution: "@vitest/mocker@npm:3.0.8" @@ -6487,6 +6369,15 @@ __metadata: languageName: node linkType: hard +"@vitest/pretty-format@npm:3.0.7, @vitest/pretty-format@npm:^3.0.7": + version: 3.0.7 + resolution: "@vitest/pretty-format@npm:3.0.7" + dependencies: + tinyrainbow: ^2.0.0 + checksum: 5209282b26f57fa4bd918cba2265c34e161120f2fabc2987b0b77fb9a402a12cc5591d4e42689fcbdde5e2e1804cafc96e4e338d5b9d8b35ccbabd4cee7c8e81 + languageName: node + linkType: hard + "@vitest/pretty-format@npm:3.0.8, @vitest/pretty-format@npm:^3.0.8": version: 3.0.8 resolution: "@vitest/pretty-format@npm:3.0.8" @@ -6496,6 +6387,16 @@ __metadata: languageName: node linkType: hard +"@vitest/runner@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/runner@npm:3.0.7" + dependencies: + "@vitest/utils": 3.0.7 + pathe: ^2.0.3 + checksum: 980dd31c54b5b83e8ddc27d416999f3a8170abf3d836b2fb34a6730f942c53ad819399904bd46ea4bb89b4b0f3d0a793c135b3b83d70852859cbcad10111ae22 + languageName: node + linkType: hard + "@vitest/runner@npm:3.0.8": version: 3.0.8 resolution: "@vitest/runner@npm:3.0.8" @@ -6506,6 +6407,17 @@ __metadata: languageName: node linkType: hard +"@vitest/snapshot@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/snapshot@npm:3.0.7" + dependencies: + "@vitest/pretty-format": 3.0.7 + magic-string: ^0.30.17 + pathe: ^2.0.3 + checksum: d516bd7b04ba34726c57f1da7779165dbd376260f856a43254a4220ea6d040606440433583234de7282e0ec24fb7f6025d2a4f7688e2daebe75ed0afcd77d44c + languageName: node + linkType: hard + "@vitest/snapshot@npm:3.0.8": version: 3.0.8 resolution: "@vitest/snapshot@npm:3.0.8" @@ -6517,6 +6429,15 @@ __metadata: languageName: node linkType: hard +"@vitest/spy@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/spy@npm:3.0.7" + dependencies: + tinyspy: ^3.0.2 + checksum: f62537dc2632ed20464c017ca2feeb18bf2edd653bb1f6cd69ec5e6b52bb3803b1a601ca56777b0c463ce8d960294a0db9198c106dd6048d48ee5e7d09eaba59 + languageName: node + linkType: hard + "@vitest/spy@npm:3.0.8": version: 3.0.8 resolution: "@vitest/spy@npm:3.0.8" @@ -6526,6 +6447,17 @@ __metadata: languageName: node linkType: hard +"@vitest/utils@npm:3.0.7": + version: 3.0.7 + resolution: "@vitest/utils@npm:3.0.7" + dependencies: + "@vitest/pretty-format": 3.0.7 + loupe: ^3.1.3 + tinyrainbow: ^2.0.0 + checksum: 1a90d3444f9990484e6196d7cc1ceb0fcd8ca587319c0307d2e838f038ec45b7a711f8a76cbfb512fe13c6c3691e1d39d1d69158e27432724ec62b308e17f6e9 + languageName: node + linkType: hard + "@vitest/utils@npm:3.0.8": version: 3.0.8 resolution: "@vitest/utils@npm:3.0.8" @@ -10011,35 +9943,35 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.25.0": - version: 0.25.1 - resolution: "esbuild@npm:0.25.1" - dependencies: - "@esbuild/aix-ppc64": 0.25.1 - "@esbuild/android-arm": 0.25.1 - "@esbuild/android-arm64": 0.25.1 - "@esbuild/android-x64": 0.25.1 - "@esbuild/darwin-arm64": 0.25.1 - "@esbuild/darwin-x64": 0.25.1 - "@esbuild/freebsd-arm64": 0.25.1 - "@esbuild/freebsd-x64": 0.25.1 - "@esbuild/linux-arm": 0.25.1 - "@esbuild/linux-arm64": 0.25.1 - "@esbuild/linux-ia32": 0.25.1 - "@esbuild/linux-loong64": 0.25.1 - "@esbuild/linux-mips64el": 0.25.1 - "@esbuild/linux-ppc64": 0.25.1 - "@esbuild/linux-riscv64": 0.25.1 - "@esbuild/linux-s390x": 0.25.1 - "@esbuild/linux-x64": 0.25.1 - "@esbuild/netbsd-arm64": 0.25.1 - "@esbuild/netbsd-x64": 0.25.1 - "@esbuild/openbsd-arm64": 0.25.1 - "@esbuild/openbsd-x64": 0.25.1 - "@esbuild/sunos-x64": 0.25.1 - "@esbuild/win32-arm64": 0.25.1 - "@esbuild/win32-ia32": 0.25.1 - "@esbuild/win32-x64": 0.25.1 +"esbuild@npm:^0.25.0, esbuild@npm:~0.25.0": + version: 0.25.0 + resolution: "esbuild@npm:0.25.0" + dependencies: + "@esbuild/aix-ppc64": 0.25.0 + "@esbuild/android-arm": 0.25.0 + "@esbuild/android-arm64": 0.25.0 + "@esbuild/android-x64": 0.25.0 + "@esbuild/darwin-arm64": 0.25.0 + "@esbuild/darwin-x64": 0.25.0 + "@esbuild/freebsd-arm64": 0.25.0 + "@esbuild/freebsd-x64": 0.25.0 + "@esbuild/linux-arm": 0.25.0 + "@esbuild/linux-arm64": 0.25.0 + "@esbuild/linux-ia32": 0.25.0 + "@esbuild/linux-loong64": 0.25.0 + "@esbuild/linux-mips64el": 0.25.0 + "@esbuild/linux-ppc64": 0.25.0 + "@esbuild/linux-riscv64": 0.25.0 + "@esbuild/linux-s390x": 0.25.0 + "@esbuild/linux-x64": 0.25.0 + "@esbuild/netbsd-arm64": 0.25.0 + "@esbuild/netbsd-x64": 0.25.0 + "@esbuild/openbsd-arm64": 0.25.0 + "@esbuild/openbsd-x64": 0.25.0 + "@esbuild/sunos-x64": 0.25.0 + "@esbuild/win32-arm64": 0.25.0 + "@esbuild/win32-ia32": 0.25.0 + "@esbuild/win32-x64": 0.25.0 dependenciesMeta: "@esbuild/aix-ppc64": optional: true @@ -10093,7 +10025,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: c84e209259273fca0f8ba7cd00974dfff53eb3fcce5ff0f987d8231a5b49f22c16fa954f0bf06f07b00bd368270d8274feb5a09d7d5dfae0891a47dda24455a2 + checksum: 4d1e0cb7c059a373ea3edb20ca5efcea29efada03e4ea82b2b8ab1f2f062e4791e9744213308775d26e07a0225a7d8250da93da5c8e07ef61bb93d58caab8cf9 languageName: node linkType: hard @@ -10177,92 +10109,6 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:~0.25.0": - version: 0.25.0 - resolution: "esbuild@npm:0.25.0" - dependencies: - "@esbuild/aix-ppc64": 0.25.0 - "@esbuild/android-arm": 0.25.0 - "@esbuild/android-arm64": 0.25.0 - "@esbuild/android-x64": 0.25.0 - "@esbuild/darwin-arm64": 0.25.0 - "@esbuild/darwin-x64": 0.25.0 - "@esbuild/freebsd-arm64": 0.25.0 - "@esbuild/freebsd-x64": 0.25.0 - "@esbuild/linux-arm": 0.25.0 - "@esbuild/linux-arm64": 0.25.0 - "@esbuild/linux-ia32": 0.25.0 - "@esbuild/linux-loong64": 0.25.0 - "@esbuild/linux-mips64el": 0.25.0 - "@esbuild/linux-ppc64": 0.25.0 - "@esbuild/linux-riscv64": 0.25.0 - "@esbuild/linux-s390x": 0.25.0 - "@esbuild/linux-x64": 0.25.0 - "@esbuild/netbsd-arm64": 0.25.0 - "@esbuild/netbsd-x64": 0.25.0 - "@esbuild/openbsd-arm64": 0.25.0 - "@esbuild/openbsd-x64": 0.25.0 - "@esbuild/sunos-x64": 0.25.0 - "@esbuild/win32-arm64": 0.25.0 - "@esbuild/win32-ia32": 0.25.0 - "@esbuild/win32-x64": 0.25.0 - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-arm64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-arm64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 4d1e0cb7c059a373ea3edb20ca5efcea29efada03e4ea82b2b8ab1f2f062e4791e9744213308775d26e07a0225a7d8250da93da5c8e07ef61bb93d58caab8cf9 - languageName: node - linkType: hard - "escalade@npm:^3.1.1, escalade@npm:^3.2.0": version: 3.2.0 resolution: "escalade@npm:3.2.0" @@ -18475,28 +18321,28 @@ __metadata: linkType: hard "rollup@npm:^4.30.1": - version: 4.35.0 - resolution: "rollup@npm:4.35.0" - dependencies: - "@rollup/rollup-android-arm-eabi": 4.35.0 - "@rollup/rollup-android-arm64": 4.35.0 - "@rollup/rollup-darwin-arm64": 4.35.0 - "@rollup/rollup-darwin-x64": 4.35.0 - "@rollup/rollup-freebsd-arm64": 4.35.0 - "@rollup/rollup-freebsd-x64": 4.35.0 - "@rollup/rollup-linux-arm-gnueabihf": 4.35.0 - "@rollup/rollup-linux-arm-musleabihf": 4.35.0 - "@rollup/rollup-linux-arm64-gnu": 4.35.0 - "@rollup/rollup-linux-arm64-musl": 4.35.0 - "@rollup/rollup-linux-loongarch64-gnu": 4.35.0 - "@rollup/rollup-linux-powerpc64le-gnu": 4.35.0 - "@rollup/rollup-linux-riscv64-gnu": 4.35.0 - "@rollup/rollup-linux-s390x-gnu": 4.35.0 - "@rollup/rollup-linux-x64-gnu": 4.35.0 - "@rollup/rollup-linux-x64-musl": 4.35.0 - "@rollup/rollup-win32-arm64-msvc": 4.35.0 - "@rollup/rollup-win32-ia32-msvc": 4.35.0 - "@rollup/rollup-win32-x64-msvc": 4.35.0 + version: 4.34.9 + resolution: "rollup@npm:4.34.9" + dependencies: + "@rollup/rollup-android-arm-eabi": 4.34.9 + "@rollup/rollup-android-arm64": 4.34.9 + "@rollup/rollup-darwin-arm64": 4.34.9 + "@rollup/rollup-darwin-x64": 4.34.9 + "@rollup/rollup-freebsd-arm64": 4.34.9 + "@rollup/rollup-freebsd-x64": 4.34.9 + "@rollup/rollup-linux-arm-gnueabihf": 4.34.9 + "@rollup/rollup-linux-arm-musleabihf": 4.34.9 + "@rollup/rollup-linux-arm64-gnu": 4.34.9 + "@rollup/rollup-linux-arm64-musl": 4.34.9 + "@rollup/rollup-linux-loongarch64-gnu": 4.34.9 + "@rollup/rollup-linux-powerpc64le-gnu": 4.34.9 + "@rollup/rollup-linux-riscv64-gnu": 4.34.9 + "@rollup/rollup-linux-s390x-gnu": 4.34.9 + "@rollup/rollup-linux-x64-gnu": 4.34.9 + "@rollup/rollup-linux-x64-musl": 4.34.9 + "@rollup/rollup-win32-arm64-msvc": 4.34.9 + "@rollup/rollup-win32-ia32-msvc": 4.34.9 + "@rollup/rollup-win32-x64-msvc": 4.34.9 "@types/estree": 1.0.6 fsevents: ~2.3.2 dependenciesMeta: @@ -18542,7 +18388,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 1139d35809d1aa4ac8bff49fd0c819bcce86ce6e8e259fd0cacac086998938b5ad44f523d4414b6565ebc0338e7d2de0ad3efa03e26738fe8bd05f1baf72e980 + checksum: ed7a5e382de5fe872abffdab614b7f745cbed7328cf4ced560c4d09214b3d30e167f8c7df9e8b63489497bdf3a6be07a2474f9ff3195026bdf2d49cdbeac38ae languageName: node linkType: hard @@ -20870,6 +20716,21 @@ __metadata: languageName: node linkType: hard +"vite-node@npm:3.0.7": + version: 3.0.7 + resolution: "vite-node@npm:3.0.7" + dependencies: + cac: ^6.7.14 + debug: ^4.4.0 + es-module-lexer: ^1.6.0 + pathe: ^2.0.3 + vite: ^5.0.0 || ^6.0.0 + bin: + vite-node: vite-node.mjs + checksum: 90a3dd0e1b620cdf0c20272739cd1035af20c9b7606c1a093b3368b2c7c59cfd2327c27faabfbc9b293ae5d9a3318aeb40a2a974fe42807167e4cec625d9759e + languageName: node + linkType: hard + "vite-node@npm:3.0.8": version: 3.0.8 resolution: "vite-node@npm:3.0.8" @@ -20937,6 +20798,59 @@ __metadata: languageName: node linkType: hard +"vitest@npm:^3.0.7": + version: 3.0.7 + resolution: "vitest@npm:3.0.7" + dependencies: + "@vitest/expect": 3.0.7 + "@vitest/mocker": 3.0.7 + "@vitest/pretty-format": ^3.0.7 + "@vitest/runner": 3.0.7 + "@vitest/snapshot": 3.0.7 + "@vitest/spy": 3.0.7 + "@vitest/utils": 3.0.7 + chai: ^5.2.0 + debug: ^4.4.0 + expect-type: ^1.1.0 + magic-string: ^0.30.17 + pathe: ^2.0.3 + std-env: ^3.8.0 + tinybench: ^2.9.0 + tinyexec: ^0.3.2 + tinypool: ^1.0.2 + tinyrainbow: ^2.0.0 + vite: ^5.0.0 || ^6.0.0 + vite-node: 3.0.7 + why-is-node-running: ^2.3.0 + peerDependencies: + "@edge-runtime/vm": "*" + "@types/debug": ^4.1.12 + "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + "@vitest/browser": 3.0.7 + "@vitest/ui": 3.0.7 + happy-dom: "*" + jsdom: "*" + peerDependenciesMeta: + "@edge-runtime/vm": + optional: true + "@types/debug": + optional: true + "@types/node": + optional: true + "@vitest/browser": + optional: true + "@vitest/ui": + optional: true + happy-dom: + optional: true + jsdom: + optional: true + bin: + vitest: vitest.mjs + checksum: f384103ce5fdd5f0e4e3fbbb8e015ce887f1af6399a31a4fb8906407a6f4925b2e1708caba014c81f1c4a59627e944a65c7dc4de2819e7fe0b044796c57630ae + languageName: node + linkType: hard + "vitest@npm:^3.0.8": version: 3.0.8 resolution: "vitest@npm:3.0.8" From 8ef16f694002e38646fa03ab845a375a9503aadd Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 3 Feb 2025 10:24:38 -0600 Subject: [PATCH 02/33] Rename `jest.config.js` to `vitest.config.mts` --- packages/type-utils/{jest.config.js => vitest.config.mts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/type-utils/{jest.config.js => vitest.config.mts} (100%) diff --git a/packages/type-utils/jest.config.js b/packages/type-utils/vitest.config.mts similarity index 100% rename from packages/type-utils/jest.config.js rename to packages/type-utils/vitest.config.mts From 010340a2412bbf4bfa86306bcaafbee3e144e796 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 3 Feb 2025 10:33:37 -0600 Subject: [PATCH 03/33] chore(type-utils): migrate to `vitest` --- eslint.config.mjs | 2 + packages/type-utils/package.json | 4 +- packages/type-utils/project.json | 5 +- .../tests/TypeOrValueSpecifier.test.ts | 118 ++++++++++++------ .../tests/containsAllTypesByName.test.ts | 10 +- .../getConstrainedTypeAtLocation.test.ts | 4 +- .../type-utils/tests/getDeclaration.test.ts | 2 +- packages/type-utils/tests/getTypeName.test.ts | 6 +- .../tests/isSymbolFromDefaultLibrary.test.ts | 6 +- .../type-utils/tests/isTypeReadonly.test.ts | 92 ++++++++------ .../tests/isUnsafeAssignment.test.ts | 2 +- .../type-utils/tests/requiresQuoting.test.ts | 2 +- .../type-utils/tests/typeFlagUtils.test.ts | 18 ++- packages/type-utils/tsconfig.build.json | 2 +- packages/type-utils/tsconfig.spec.json | 10 +- packages/type-utils/vitest.config.mts | 23 +++- tsconfig.repo-config-files.json | 2 + yarn.lock | 85 +++++++++++-- 18 files changed, 261 insertions(+), 132 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index e4060e8d1dfd..e8ef18c8420f 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -32,6 +32,7 @@ const restrictNamedDeclarations = { const vitestFiles = [ 'packages/eslint-plugin-internal/tests/**/*.test.{ts,tsx,cts,mts}', 'packages/typescript-eslint/tests/**/*.test.{ts,tsx,cts,mts}', + 'packages/type-utils/tests/**/*.test.{ts,tsx,cts,mts}', ]; export default tseslint.config( @@ -73,6 +74,7 @@ export default tseslint.config( '.nx/', '.yarn/', '**/jest.config.js', + '**/vitest.config.mts', '**/node_modules/**', '**/dist/**', '**/fixtures/**', diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index ac14ce2e1681..c5e9785282df 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -40,10 +40,10 @@ "build": "tsc -b tsconfig.build.json", "postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3", "clean": "tsc -b tsconfig.build.json --clean", - "postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", + "postclean": "rimraf dist/ _ts4.3/ coverage/", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "jest", + "test": "vitest --run", "check-types": "npx nx typecheck" }, "dependencies": { diff --git a/packages/type-utils/project.json b/packages/type-utils/project.json index 4ac211280e6b..bdf45fb9dbe2 100644 --- a/packages/type-utils/project.json +++ b/packages/type-utils/project.json @@ -1,8 +1,9 @@ { "name": "type-utils", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "type": "library", - "implicitDependencies": [], + "projectType": "library", + "root": "packages/type-utils", + "sourceRoot": "packages/type-utils/src", "targets": { "lint": { "executor": "@nx/eslint:lint", diff --git a/packages/type-utils/tests/TypeOrValueSpecifier.test.ts b/packages/type-utils/tests/TypeOrValueSpecifier.test.ts index b58ae80df8d2..74e0d677919b 100644 --- a/packages/type-utils/tests/TypeOrValueSpecifier.test.ts +++ b/packages/type-utils/tests/TypeOrValueSpecifier.test.ts @@ -21,7 +21,7 @@ describe('TypeOrValueSpecifier', () => { expect(validate([typeOrValueSpecifier])).toBe(false); } - it.each([['MyType'], ['myValue'], ['any'], ['void'], ['never']])( + it.each([['MyType'], ['myValue'], ['any'], ['void'], ['never']] as const)( 'matches a simple string specifier %s', runTestPositive, ); @@ -33,14 +33,14 @@ describe('TypeOrValueSpecifier', () => { [undefined], [['MyType']], [(): void => {}], - ])("doesn't match any non-string basic type: %s", runTestNegative); + ] as const)("doesn't match any non-string basic type: %s", runTestNegative); it.each([ [{ from: 'file', name: 'MyType' }], [{ from: 'file', name: ['MyType', 'myValue'] }], [{ from: 'file', name: 'MyType', path: './filename.js' }], [{ from: 'file', name: ['MyType', 'myValue'], path: './filename.js' }], - ])('matches a file specifier: %s', runTestPositive); + ] as const)('matches a file specifier: %s', runTestPositive); it.each([ [{ from: 'file', name: 42 }], @@ -59,12 +59,15 @@ describe('TypeOrValueSpecifier', () => { }, ], [{ from: 'file', name: 'MyType', unrelatedProperty: '' }], - ])("doesn't match a malformed file specifier: %s", runTestNegative); + ] as const)( + "doesn't match a malformed file specifier: %s", + runTestNegative, + ); it.each([ [{ from: 'lib', name: 'MyType' }], [{ from: 'lib', name: ['MyType', 'myValue'] }], - ])('matches a lib specifier: %s', runTestPositive); + ] as const)('matches a lib specifier: %s', runTestPositive); it.each([ [{ from: 'lib', name: 42 }], @@ -73,7 +76,7 @@ describe('TypeOrValueSpecifier', () => { [{ from: 'lib', name: [] }], [{ from: 'lib' }], [{ from: 'lib', name: 'MyType', unrelatedProperty: '' }], - ])("doesn't match a malformed lib specifier: %s", runTestNegative); + ] as const)("doesn't match a malformed lib specifier: %s", runTestNegative); it.each([ [{ from: 'package', name: 'MyType', package: 'jquery' }], @@ -84,7 +87,7 @@ describe('TypeOrValueSpecifier', () => { package: 'jquery', }, ], - ])('matches a package specifier: %s', runTestPositive); + ] as const)('matches a package specifier: %s', runTestPositive); it.each([ [{ from: 'package', name: 42, package: 'jquery' }], @@ -119,10 +122,13 @@ describe('TypeOrValueSpecifier', () => { unrelatedProperty: '', }, ], - ])("doesn't match a malformed package specifier: %s", runTestNegative); + ] as const)( + "doesn't match a malformed package specifier: %s", + runTestNegative, + ); }); - describe('typeMatchesSpecifier', () => { + describe(typeMatchesSpecifier, () => { function runTests( code: string, specifier: TypeOrValueSpecifier, @@ -162,22 +168,25 @@ describe('TypeOrValueSpecifier', () => { runTests(code, specifier, false); } - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ ['interface Foo {prop: string}; type Test = Foo;', 'Foo'], ['type Test = RegExp;', 'RegExp'], - ])('matches a matching universal string specifier', runTestPositive); + ] as const satisfies [string, TypeOrValueSpecifier][])( + 'matches a matching universal string specifier', + runTestPositive, + ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ ['interface Foo {prop: string}; type Test = Foo;', 'Bar'], ['interface Foo {prop: string}; type Test = Foo;', 'RegExp'], ['type Test = RegExp;', 'Foo'], ['type Test = RegExp;', 'BigInt'], - ])( + ] as const satisfies [string, TypeOrValueSpecifier][])( "doesn't match a mismatched universal string specifier", runTestNegative, ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ [ 'interface Foo {prop: string}; type Test = Foo;', { from: 'file', name: 'Foo' }, @@ -238,9 +247,12 @@ describe('TypeOrValueSpecifier', () => { path: 'tests/fixtures/file.ts', }, ], - ])('matches a matching file specifier: %s', runTestPositive); + ] as const satisfies [string, TypeOrValueSpecifier][])( + 'matches a matching file specifier: %s', + runTestPositive, + ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ [ 'interface Foo {prop: string}; type Test = Foo;', { from: 'file', name: 'Bar' }, @@ -261,32 +273,44 @@ describe('TypeOrValueSpecifier', () => { path: 'tests/fixtures/wrong-file.ts', }, ], - ])("doesn't match a mismatched file specifier: %s", runTestNegative); + ] as const satisfies [string, TypeOrValueSpecifier][])( + "doesn't match a mismatched file specifier: %s", + runTestNegative, + ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ ['type Test = RegExp;', { from: 'lib', name: 'RegExp' }], ['type Test = RegExp;', { from: 'lib', name: ['RegExp', 'BigInt'] }], - ])('matches a matching lib specifier: %s', runTestPositive); + ] as const satisfies [string, TypeOrValueSpecifier][])( + 'matches a matching lib specifier: %s', + runTestPositive, + ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ ['type Test = RegExp;', { from: 'lib', name: 'BigInt' }], ['type Test = RegExp;', { from: 'lib', name: ['BigInt', 'Date'] }], - ])("doesn't match a mismatched lib specifier: %s", runTestNegative); + ] as const satisfies [string, TypeOrValueSpecifier][])( + "doesn't match a mismatched lib specifier: %s", + runTestNegative, + ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ ['type Test = string;', { from: 'lib', name: 'string' }], ['type Test = string;', { from: 'lib', name: ['string', 'number'] }], - ])('matches a matching intrinsic type specifier: %s', runTestPositive); + ] as const satisfies [string, TypeOrValueSpecifier][])( + 'matches a matching intrinsic type specifier: %s', + runTestPositive, + ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ ['type Test = string;', { from: 'lib', name: 'number' }], ['type Test = string;', { from: 'lib', name: ['number', 'boolean'] }], - ])( + ] as const satisfies [string, TypeOrValueSpecifier][])( "doesn't match a mismatched intrinsic type specifier: %s", runTestNegative, ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ [ 'import type {Node} from "typescript"; type Test = Node;', { from: 'package', name: 'Node', package: 'typescript' }, @@ -366,9 +390,12 @@ describe('TypeOrValueSpecifier', () => { package: 'node:test', }, ], - ])('matches a matching package specifier: %s', runTestPositive); + ] as const satisfies [string, TypeOrValueSpecifier][])( + 'matches a matching package specifier: %s', + runTestPositive, + ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ [ ` type Other = { __otherBrand: true }; @@ -386,12 +413,12 @@ describe('TypeOrValueSpecifier', () => { `, { from: 'file', name: ['SafePromise'] }, ], - ])( + ] as const satisfies [string, TypeOrValueSpecifier][])( "doesn't match a mismatched type specifier for an intersection type: %s", runTestNegative, ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ [ ` type SafePromise = Promise & { __safeBrand: string }; @@ -400,12 +427,12 @@ describe('TypeOrValueSpecifier', () => { `, { from: 'file', name: ['ResultType'] }, ], - ])( + ] as const satisfies [string, TypeOrValueSpecifier][])( 'matches a matching type specifier for an intersection type: %s', runTestPositive, ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ [ ` declare module "node:test" { @@ -425,12 +452,12 @@ describe('TypeOrValueSpecifier', () => { package: 'node:test', }, ], - ])( + ] as const satisfies [string, TypeOrValueSpecifier][])( 'matches a matching package specifier for an intersection type: %s', runTestPositive, ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ [ ` declare module "node:test" { @@ -450,7 +477,7 @@ describe('TypeOrValueSpecifier', () => { package: 'node:test', }, ], - ])( + ] as const satisfies [string, TypeOrValueSpecifier][])( "doesn't match a mismatched package specifier for an intersection type: %s", runTestNegative, ); @@ -472,7 +499,7 @@ describe('TypeOrValueSpecifier', () => { ); }); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ [ 'import type {Node} from "typescript"; type Test = Node;', { from: 'package', name: 'Symbol', package: 'typescript' }, @@ -497,9 +524,12 @@ describe('TypeOrValueSpecifier', () => { 'import type {Node as TsNode} from "typescript"; type Test = TsNode;', { from: 'package', name: 'TsNode', package: 'typescript' }, ], - ])("doesn't match a mismatched package specifier: %s", runTestNegative); + ] as const satisfies [string, TypeOrValueSpecifier][])( + "doesn't match a mismatched package specifier: %s", + runTestNegative, + ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ [ 'interface Foo {prop: string}; type Test = Foo;', { from: 'lib', name: 'Foo' }, @@ -550,11 +580,17 @@ describe('TypeOrValueSpecifier', () => { 'type Test = RegExp;', { from: 'package', name: ['RegExp', 'BigInt'], package: 'foo-package' }, ], - ])("doesn't match a mismatched specifier type: %s", runTestNegative); + ] as const satisfies [string, TypeOrValueSpecifier][])( + "doesn't match a mismatched specifier type: %s", + runTestNegative, + ); - it.each<[string, TypeOrValueSpecifier]>([ + it.each([ ['type Test = Foo;', { from: 'lib', name: 'Foo' }], ['type Test = Foo;', { from: 'lib', name: ['Foo', 'number'] }], - ])("doesn't match an error type: %s", runTestNegative); + ] as const satisfies [string, TypeOrValueSpecifier][])( + "doesn't match an error type: %s", + runTestNegative, + ); }); }); diff --git a/packages/type-utils/tests/containsAllTypesByName.test.ts b/packages/type-utils/tests/containsAllTypesByName.test.ts index 46933b01f092..a3851417eeb7 100644 --- a/packages/type-utils/tests/containsAllTypesByName.test.ts +++ b/packages/type-utils/tests/containsAllTypesByName.test.ts @@ -7,7 +7,7 @@ import path from 'node:path'; import { containsAllTypesByName } from '../src'; import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; -describe('containsAllTypesByName', () => { +describe(containsAllTypesByName, () => { const rootDir = path.join(__dirname, 'fixtures'); function getType(code: string): ts.Type { @@ -42,7 +42,7 @@ describe('containsAllTypesByName', () => { ['type Test = unknown;', false], ['type Test = any;', false], ['type Test = string;', false], - ])('when code is "%s" expected is %s', runTest); + ] as const)('when code is "%s" expected is %s', runTest); }); describe('is false', () => { @@ -54,7 +54,7 @@ describe('containsAllTypesByName', () => { ['type Test = unknown;', true], ['type Test = any;', true], ['type Test = string;', false], - ])('when code is "%s" expected is %s', runTest); + ] as const)('when code is "%s" expected is %s', runTest); }); }); @@ -83,7 +83,7 @@ describe('containsAllTypesByName', () => { [`type Test = Promise & string`, true], ['type Test = Promise | string', true], ['type Test = Promise | Object', true], - ])('when code is "%s" expected is %s', runTest); + ] as const)('when code is "%s" expected is %s', runTest); }); describe('is false', () => { @@ -95,7 +95,7 @@ describe('containsAllTypesByName', () => { ['type Test = Promise & string', false], ['type Test = Promise | string', false], ['type Test = Promise | Object', true], - ])('when code is "%s" expected is %s', runTest); + ] as const)('when code is "%s" expected is %s', runTest); }); }); }); diff --git a/packages/type-utils/tests/getConstrainedTypeAtLocation.test.ts b/packages/type-utils/tests/getConstrainedTypeAtLocation.test.ts index 598e78500afe..c033dba526d7 100644 --- a/packages/type-utils/tests/getConstrainedTypeAtLocation.test.ts +++ b/packages/type-utils/tests/getConstrainedTypeAtLocation.test.ts @@ -21,9 +21,9 @@ function parseCodeForEslint(code: string): ReturnType & { }); } -describe('getConstrainedTypeAtLocation', () => { +describe(getConstrainedTypeAtLocation, () => { // See https://github.com/typescript-eslint/typescript-eslint/issues/10438 - // eslint-disable-next-line jest/no-disabled-tests -- known issue. + // eslint-disable-next-line vitest/no-disabled-tests -- known issue. it.skip('returns unknown for unconstrained generic', () => { const sourceCode = ` function foo(x: T); diff --git a/packages/type-utils/tests/getDeclaration.test.ts b/packages/type-utils/tests/getDeclaration.test.ts index a7af315b6b28..172e4b8bbd4b 100644 --- a/packages/type-utils/tests/getDeclaration.test.ts +++ b/packages/type-utils/tests/getDeclaration.test.ts @@ -24,7 +24,7 @@ const mockDeclaration = (): ts.Declaration => { return {} as ts.Declaration; }; -describe('getDeclaration', () => { +describe(getDeclaration, () => { describe('when symbol does not exist', () => { it('returns null', () => { const services = mockServices(); diff --git a/packages/type-utils/tests/getTypeName.test.ts b/packages/type-utils/tests/getTypeName.test.ts index 7ab59ae0aae7..fc6ca5efc8fb 100644 --- a/packages/type-utils/tests/getTypeName.test.ts +++ b/packages/type-utils/tests/getTypeName.test.ts @@ -7,7 +7,7 @@ import path from 'node:path'; import { getTypeName } from '../src'; import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; -describe('getTypeName', () => { +describe(getTypeName, () => { function getTypes(code: string): { checker: ts.TypeChecker; type: ts.Type } { const rootDir = path.join(__dirname, 'fixtures'); @@ -45,7 +45,7 @@ describe('getTypeName', () => { ['type Test = undefined;', 'undefined'], ['type Test = null;', 'null'], ['type Test = symbol;', 'symbol'], - ])('when code is %s, returns %s', runTest); + ] as const)('when code is %s, returns %s', runTest); }); describe('returns non-primitive type', () => { @@ -57,6 +57,6 @@ describe('getTypeName', () => { ['type Test = T & boolean;', 'Test'], ['type Test = string | number;', 'Test'], ['type Test = string | string[];', 'Test'], - ])('when code is %s, returns %s', runTest); + ] as const)('when code is %s, returns %s', runTest); }); }); diff --git a/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts b/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts index 4f7050fb38d9..3e1581b58bd4 100644 --- a/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts +++ b/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts @@ -7,7 +7,7 @@ import path from 'node:path'; import { isSymbolFromDefaultLibrary } from '../src'; import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; -describe('isSymbolFromDefaultLibrary', () => { +describe(isSymbolFromDefaultLibrary, () => { const rootDir = path.join(__dirname, 'fixtures'); function getTypes(code: string): { @@ -43,7 +43,7 @@ describe('isSymbolFromDefaultLibrary', () => { ['type Test = Promise'], ['type Test = Error'], ['type Test = Object'], - ])('when code is %s, returns true', runTest); + ] as const)('when code is %s, returns true', runTest); }); describe('is not symbol from default library', () => { @@ -55,6 +55,6 @@ describe('isSymbolFromDefaultLibrary', () => { ['const test: Array = [1,2,3];'], ['type Test = number;'], ['interface Test { bar: string; };'], - ])('when code is %s, returns false', runTest); + ] as const)('when code is %s, returns false', runTest); }); }); diff --git a/packages/type-utils/tests/isTypeReadonly.test.ts b/packages/type-utils/tests/isTypeReadonly.test.ts index f7405e2e5add..8f2d04765cb8 100644 --- a/packages/type-utils/tests/isTypeReadonly.test.ts +++ b/packages/type-utils/tests/isTypeReadonly.test.ts @@ -2,6 +2,7 @@ import type { TSESTree } from '@typescript-eslint/utils'; import type * as ts from 'typescript'; import { parseForESLint } from '@typescript-eslint/parser'; +import { AST_NODE_TYPES } from '@typescript-eslint/utils'; import path from 'node:path'; import type { ReadonlynessOptions } from '../src/isTypeReadonly'; @@ -9,10 +10,10 @@ import type { ReadonlynessOptions } from '../src/isTypeReadonly'; import { isTypeReadonly } from '../src/isTypeReadonly'; import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; -describe('isTypeReadonly', () => { +describe(isTypeReadonly, () => { const rootDir = path.join(__dirname, 'fixtures'); - describe('TSTypeAliasDeclaration ', () => { + describe(AST_NODE_TYPES.TSTypeAliasDeclaration, () => { function getType(code: string): { program: ts.Program; type: ts.Type; @@ -24,8 +25,7 @@ describe('isTypeReadonly', () => { tsconfigRootDir: rootDir, }); expectToHaveParserServices(services); - const program = services.program; - const esTreeNodeToTSNodeMap = services.esTreeNodeToTSNodeMap; + const { esTreeNodeToTSNodeMap, program } = services; const declaration = ast.body[0] as TSESTree.TSTypeAliasDeclaration; return { @@ -59,33 +59,33 @@ describe('isTypeReadonly', () => { } describe('basics', () => { - describe('is readonly', () => { + describe('is readonly', { timeout: 10_000 }, () => { const runTests = runTestIsReadonly; // Record. it.each([ ['type Test = { readonly bar: string; };'], ['type Test = Readonly<{ bar: string; }>;'], - ])('handles fully readonly records', runTests); + ] as const)('handles fully readonly records', runTests); // Array. it.each([ ['type Test = Readonly;'], ['type Test = Readonly>;'], - ])('handles fully readonly arrays', runTests); + ] as const)('handles fully readonly arrays', runTests); // Array - special case. // Note: Methods are mutable but arrays are treated special; hence no failure. it.each([ ['type Test = readonly string[];'], ['type Test = ReadonlyArray;'], - ])('treats readonly arrays as fully readonly', runTests); + ] as const)('treats readonly arrays as fully readonly', runTests); // Set and Map. it.each([ ['type Test = Readonly>;'], ['type Test = Readonly>;'], - ])('handles fully readonly sets and maps', runTests); + ] as const)('handles fully readonly sets and maps', runTests); // Private Identifier. // Note: It can't be accessed from outside of class thus exempt from the checks. @@ -93,7 +93,7 @@ describe('isTypeReadonly', () => { ['class Foo { readonly #readonlyPrivateField = "foo"; }'], ['class Foo { #privateField = "foo"; }'], ['class Foo { #privateMember() {}; }'], - ])('treat private identifier as readonly', runTests); + ] as const)('treat private identifier as readonly', runTests); }); describe('is not readonly', () => { @@ -103,13 +103,13 @@ describe('isTypeReadonly', () => { it.each([ ['type Test = { foo: string; };'], ['type Test = { foo: string; readonly bar: number; };'], - ])('handles non fully readonly records', runTests); + ] as const)('handles non fully readonly records', runTests); // Array. - it.each([['type Test = string[]'], ['type Test = Array']])( - 'handles non fully readonly arrays', - runTests, - ); + it.each([ + ['type Test = string[]'], + ['type Test = Array'], + ] as const)('handles non fully readonly arrays', runTests); // Set and Map. // Note: Methods are mutable for ReadonlySet and ReadonlyMet; hence failure. @@ -118,7 +118,7 @@ describe('isTypeReadonly', () => { ['type Test = Map;'], ['type Test = ReadonlySet;'], ['type Test = ReadonlyMap;'], - ])('handles non fully readonly sets and maps', runTests); + ] as const)('handles non fully readonly sets and maps', runTests); }); }); @@ -131,7 +131,7 @@ describe('isTypeReadonly', () => { [ 'type Test = { readonly [key: string]: { readonly foo: readonly string[]; }; };', ], - ])( + ] as const)( 'handles readonly PropertySignature inside a readonly IndexSignature', runTests, ); @@ -140,13 +140,15 @@ describe('isTypeReadonly', () => { describe('is readonly circular', () => { const runTests = runTestIsReadonly; - it('handles circular readonly PropertySignature inside a readonly IndexSignature', () => - runTests('interface Test { readonly [key: string]: Test };')); + it('handles circular readonly PropertySignature inside a readonly IndexSignature', () => { + runTests('interface Test { readonly [key: string]: Test };'); + }); - it('handles circular readonly PropertySignature inside interdependent objects', () => + it('handles circular readonly PropertySignature inside interdependent objects', () => { runTests( 'interface Test1 { readonly [key: string]: Test } interface Test { readonly [key: string]: Test1 }', - )); + ); + }); }); describe('is not readonly', () => { @@ -155,7 +157,7 @@ describe('isTypeReadonly', () => { it.each([ ['type Test = { [key: string]: string };'], ['type Test = { readonly [key: string]: { foo: string[]; }; };'], - ])( + ] as const)( 'handles mutable PropertySignature inside a readonly IndexSignature', runTests, ); @@ -164,8 +166,9 @@ describe('isTypeReadonly', () => { describe('is not readonly circular', () => { const runTests = runTestIsNotReadonly; - it('handles circular mutable PropertySignature', () => - runTests('interface Test { [key: string]: Test };')); + it('handles circular mutable PropertySignature', () => { + runTests('interface Test { [key: string]: Test };'); + }); it.each([ [ @@ -177,7 +180,7 @@ describe('isTypeReadonly', () => { [ 'interface Test1 { [key: string]: Test } interface Test { [key: string]: Test1 }', ], - ])( + ] as const)( 'handles circular mutable PropertySignature inside interdependent objects', runTests, ); @@ -193,7 +196,7 @@ describe('isTypeReadonly', () => { 'type Test = Readonly<{ foo: string; bar: number; }> & Readonly<{ bar: number; }>;', ], ['type Test = readonly string[] | readonly number[];'], - ])('handles a union of 2 fully readonly types', runTests); + ] as const)('handles a union of 2 fully readonly types', runTests); }); describe('is not readonly', () => { @@ -207,7 +210,7 @@ describe('isTypeReadonly', () => { [ 'type Test = Readonly<{ foo: string; bar: number; }> | { bar: number; };', ], - ])('handles a union of non fully readonly types', runTests); + ] as const)('handles a union of non fully readonly types', runTests); }); }); @@ -219,13 +222,16 @@ describe('isTypeReadonly', () => { [ 'type Test = Readonly<{ foo: string; bar: number; }> & Readonly<{ bar: number; }>;', ], - ])('handles an intersection of 2 fully readonly types', runTests); + ] as const)( + 'handles an intersection of 2 fully readonly types', + runTests, + ); it.each([ [ 'type Test = Readonly<{ foo: string; bar: number; }> & { foo: string; };', ], - ])( + ] as const)( 'handles an intersection of a fully readonly type with a mutable subtype', runTests, ); @@ -237,7 +243,10 @@ describe('isTypeReadonly', () => { [ 'type Test = readonly [string, number] & Readonly<{ foo: string; }>;', ], - ])('handles an intersections involving a readonly array', runTests); + ] as const)( + 'handles an intersections involving a readonly array', + runTests, + ); }); describe('is not readonly', () => { @@ -251,7 +260,10 @@ describe('isTypeReadonly', () => { [ 'type Test = Readonly<{ bar: number; }> & { foo: string; bar: number; };', ], - ])('handles an intersection of non fully readonly types', runTests); + ] as const)( + 'handles an intersection of non fully readonly types', + runTests, + ); }); }); @@ -263,13 +275,16 @@ describe('isTypeReadonly', () => { [ 'type Test = T extends readonly number[] ? readonly string[] : readonly number[];', ], - ])('handles conditional type that are fully readonly', runTests); + ] as const)( + 'handles conditional type that are fully readonly', + runTests, + ); it.each([ [ 'type Test = T extends number[] ? readonly string[] : readonly number[];', ], - ])('should ignore mutable conditions', runTests); + ] as const)('should ignore mutable conditions', runTests); }); describe('is not readonly', () => { @@ -283,7 +298,7 @@ describe('isTypeReadonly', () => { [ 'type Test = T extends number[] ? readonly string[] : number[];', ], - ])('handles non fully readonly conditional types', runTests); + ] as const)('handles non fully readonly conditional types', runTests); }); }); }); @@ -308,7 +323,7 @@ describe('isTypeReadonly', () => { it.each([ ['type Test = ReadonlySet;'], ['type Test = ReadonlyMap;'], - ])('handles non fully readonly sets and maps', runTests); + ] as const)('handles non fully readonly sets and maps', runTests); }); }); @@ -343,7 +358,10 @@ describe('isTypeReadonly', () => { 'interface Foo {prop: RegExp}; type Test = (arg: Readonly) => void;', ], ['interface Foo {prop: string}; type Test = (arg: Foo) => void;'], - ])('correctly marks allowlisted types as readonly', runTestIsReadonly); + ] as const)( + 'correctly marks allowlisted types as readonly', + runTestIsReadonly, + ); }); describe('is not readonly', () => { @@ -352,7 +370,7 @@ describe('isTypeReadonly', () => { 'interface Bar {prop: RegExp}; type Test = (arg: Readonly) => void;', ], ['interface Bar {prop: string}; type Test = (arg: Bar) => void;'], - ])( + ] as const)( 'correctly marks allowlisted types as readonly', runTestIsNotReadonly, ); diff --git a/packages/type-utils/tests/isUnsafeAssignment.test.ts b/packages/type-utils/tests/isUnsafeAssignment.test.ts index b4ea26a58438..af605b73a441 100644 --- a/packages/type-utils/tests/isUnsafeAssignment.test.ts +++ b/packages/type-utils/tests/isUnsafeAssignment.test.ts @@ -7,7 +7,7 @@ import path from 'node:path'; import { isUnsafeAssignment } from '../src/isUnsafeAssignment'; import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; -describe('isUnsafeAssignment', () => { +describe(isUnsafeAssignment, () => { const rootDir = path.join(__dirname, 'fixtures'); function getTypes( diff --git a/packages/type-utils/tests/requiresQuoting.test.ts b/packages/type-utils/tests/requiresQuoting.test.ts index 59c7d02e60e4..565743913164 100644 --- a/packages/type-utils/tests/requiresQuoting.test.ts +++ b/packages/type-utils/tests/requiresQuoting.test.ts @@ -1,6 +1,6 @@ import { requiresQuoting } from '../src'; -describe('getDeclaration', () => { +describe(requiresQuoting, () => { describe('valid identifier', () => { it('upper and lower case alphabet', () => { const name = 'c'; diff --git a/packages/type-utils/tests/typeFlagUtils.test.ts b/packages/type-utils/tests/typeFlagUtils.test.ts index 24e66b394158..03f1526343aa 100644 --- a/packages/type-utils/tests/typeFlagUtils.test.ts +++ b/packages/type-utils/tests/typeFlagUtils.test.ts @@ -23,7 +23,7 @@ describe('typeFlagUtils', () => { return services.getTypeAtLocation(declaration.id); } - describe('getTypeFlags', () => { + describe(getTypeFlags, () => { function runTestForAliasDeclaration( code: string, expected: ts.TypeFlags, @@ -40,12 +40,18 @@ describe('typeFlagUtils', () => { ['type Test = number;', 8], ['type Test = "text";', 128], ['type Test = 123;', 256], - ['type Test = string | number', 12], + [ + 'type Test = string | number', + ts.TypeFlags.String | ts.TypeFlags.Number, + ], ['type Test = "text" | 123', 384], - ])('when code is "%s", type flags is %d', runTestForAliasDeclaration); + ] as const)( + 'when code is "%s", type flags is %d', + runTestForAliasDeclaration, + ); }); - describe('isTypeFlagSet', () => { + describe(isTypeFlagSet, () => { function runTestForAliasDeclaration( code: string, flagsToCheck: ts.TypeFlags, @@ -69,7 +75,7 @@ describe('typeFlagUtils', () => { ['type Test = string;', ts.TypeFlags.String], ['type Test = string | number;', ts.TypeFlags.String], ['type Test = string & { foo: string };', ts.TypeFlags.Intersection], - ])( + ] as const)( 'when code is "%s" and flagsToCheck is %d , returns true', runTestIsTypeFlagSet, ); @@ -87,7 +93,7 @@ describe('typeFlagUtils', () => { ['type Test = string', ts.TypeFlags.Any], ['type Test = string | number;', ts.TypeFlags.Any], ['type Test = string & { foo: string }', ts.TypeFlags.String], - ])( + ] as const)( 'when code is "%s" and flagsToCheck is %d , returns false', runTestIsNotTypeFlagSet, ); diff --git a/packages/type-utils/tsconfig.build.json b/packages/type-utils/tsconfig.build.json index f409f6784f7c..821662562d80 100644 --- a/packages/type-utils/tsconfig.build.json +++ b/packages/type-utils/tsconfig.build.json @@ -9,7 +9,7 @@ "types": ["node"] }, "include": ["src/**/*.ts", "typings"], - "exclude": ["jest.config.js", "src/**/*.spec.ts", "src/**/*.test.ts"], + "exclude": ["vitest.config.mts", "src/**/*.spec.ts", "src/**/*.test.ts"], "references": [ { "path": "../types/tsconfig.build.json" diff --git a/packages/type-utils/tsconfig.spec.json b/packages/type-utils/tsconfig.spec.json index 9b6b8b55e093..ee94c6d08bec 100644 --- a/packages/type-utils/tsconfig.spec.json +++ b/packages/type-utils/tsconfig.spec.json @@ -3,15 +3,9 @@ "compilerOptions": { "outDir": "../../dist/out-tsc/packages/type-utils", "module": "NodeNext", - "types": ["jest", "node"] + "types": ["node", "vitest/globals", "vitest/importMeta"] }, - "include": [ - "jest.config.js", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts", - "tests" - ], + "include": ["src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts", "tests"], "exclude": ["**/fixtures/**"], "references": [ { diff --git a/packages/type-utils/vitest.config.mts b/packages/type-utils/vitest.config.mts index 910991b20cff..c803e1d1c1ee 100644 --- a/packages/type-utils/vitest.config.mts +++ b/packages/type-utils/vitest.config.mts @@ -1,7 +1,18 @@ -'use strict'; +import { defineConfig, mergeConfig } from 'vitest/config'; -// @ts-check -/** @type {import('@jest/types').Config.InitialOptions} */ -module.exports = { - ...require('../../jest.config.base.js'), -}; +import { vitestBaseConfig } from '../../vitest.config.base.mjs'; +import packageJson from './package.json' with { type: 'json' }; + +const vitestConfig = mergeConfig( + vitestBaseConfig, + + defineConfig({ + test: { + dir: `${import.meta.dirname}/tests`, + name: packageJson.name, + root: import.meta.dirname, + }, + }), +); + +export default vitestConfig; diff --git a/tsconfig.repo-config-files.json b/tsconfig.repo-config-files.json index d0c46503c208..b34e770c2746 100644 --- a/tsconfig.repo-config-files.json +++ b/tsconfig.repo-config-files.json @@ -12,6 +12,8 @@ "tools/**/*.ts", "tools/**/*.mts", "eslint.config.mjs", + "vitest.config.base.mts", + "vitest.config.mts", "jest.config.base.js", "jest.config.js", "jest.preset.js", diff --git a/yarn.lock b/yarn.lock index 3fbeca172cc3..d7f7e83853dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6265,8 +6265,8 @@ __metadata: linkType: hard "@vitest/coverage-v8@npm:^3.0.8": - version: 3.0.8 - resolution: "@vitest/coverage-v8@npm:3.0.8" + version: 3.1.1 + resolution: "@vitest/coverage-v8@npm:3.1.1" dependencies: "@ampproject/remapping": ^2.3.0 "@bcoe/v8-coverage": ^1.0.2 @@ -6277,22 +6277,22 @@ __metadata: istanbul-reports: ^3.1.7 magic-string: ^0.30.17 magicast: ^0.3.5 - std-env: ^3.8.0 + std-env: ^3.8.1 test-exclude: ^7.0.1 tinyrainbow: ^2.0.0 peerDependencies: - "@vitest/browser": 3.0.8 - vitest: 3.0.8 + "@vitest/browser": 3.1.1 + vitest: 3.1.1 peerDependenciesMeta: "@vitest/browser": optional: true - checksum: 6b3f0f86f8df895f9d4e3978b11303cada2425452177b70e9b2c19fe5a56e2f5d075b7760de4d856406daa3d9f22c173145664cad75677f4085c63e290071e65 + checksum: 5f55207c0f3ccf66cb56267643fffdce06bece64eb7f777c49257094c82371fb087e83976821f1c234dc796bc396dd89a3e26c59ad1534dcc639c39caa116532 languageName: node linkType: hard "@vitest/eslint-plugin@npm:^1.1.37": - version: 1.1.37 - resolution: "@vitest/eslint-plugin@npm:1.1.37" + version: 1.1.39 + resolution: "@vitest/eslint-plugin@npm:1.1.39" peerDependencies: "@typescript-eslint/utils": ^8.24.0 eslint: ">= 8.57.0" @@ -6303,7 +6303,7 @@ __metadata: optional: true vitest: optional: true - checksum: 697fec7491e943d08ee5169e00041597b56db2d9a27740639e9051b254f4115af423ea81ca47b6df5cf4ac5de9d651f43bc1f7be19731eedfce6a1262133fd9f + checksum: 0730c7d2a24b6e72ad74478991f7426fe889d0a326f4dc5034db5bfb1fcedeb1f54f8d90d61587e66c447139fa5c72af07003d740753860de82a9b0565bd14aa languageName: node linkType: hard @@ -19273,6 +19273,13 @@ __metadata: languageName: node linkType: hard +"std-env@npm:^3.8.1": + version: 3.9.0 + resolution: "std-env@npm:3.9.0" + checksum: d40126e4a650f6e5456711e6c297420352a376ef99a9599e8224d2d8f2ff2b91a954f3264fcef888d94fce5c9ae14992c5569761c95556fc87248ce4602ed212 + languageName: node + linkType: hard + "string-argv@npm:^0.3.2, string-argv@npm:~0.3.1": version: 0.3.2 resolution: "string-argv@npm:0.3.2" @@ -20746,9 +20753,61 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.2": - version: 6.2.2 - resolution: "vite@npm:6.2.2" +"vite@npm:^5.0.0 || ^6.0.0": + version: 6.2.0 + resolution: "vite@npm:6.2.0" + dependencies: + esbuild: ^0.25.0 + fsevents: ~2.3.3 + postcss: ^8.5.3 + rollup: ^4.30.1 + peerDependencies: + "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: ">=1.21.0" + less: "*" + lightningcss: ^1.21.0 + sass: "*" + sass-embedded: "*" + stylus: "*" + sugarss: "*" + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + bin: + vite: bin/vite.js + checksum: 0f2b6232fe94184885dd025609995874ac75279a85596a4053a283bd8bd0391f8ed3e7efb3e8f94073811a2b237c626e850990b04d2c7a1dc33f05d150f36bcd + languageName: node + linkType: hard + +"vite@npm:^6.2.2": + version: 6.2.5 + resolution: "vite@npm:6.2.5" dependencies: esbuild: ^0.25.0 fsevents: ~2.3.3 @@ -20794,7 +20853,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 5a8b2083ef2534fab8769f18807e1df055730f1cb7853bed9d2556b2bb6c566aad25b6f530440370798baa4bc6c63f0d1339b646ee06102bc4f9373e93fefb7e + checksum: 49a6529c5ae8d6e4926f2daa51d7e20c50d780d8d2ec8c08605e966983fe8d17ec69bc36a356c1a21141c5a630b7a4109f3690c5b33f579d3e2bf26f914a149d languageName: node linkType: hard From 32528551ffa88568d8ef629a4347f353ebec3397 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 7 Mar 2025 07:45:59 -0600 Subject: [PATCH 04/33] Update `vitest` to version 3.0.8 --- packages/type-utils/package.json | 4 +- yarn.lock | 185 +------------------------------ 2 files changed, 7 insertions(+), 182 deletions(-) diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index c5e9785282df..f57da040bc37 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -58,13 +58,13 @@ }, "devDependencies": { "@typescript-eslint/parser": "8.29.0", - "@vitest/coverage-v8": "^3.0.7", + "@vitest/coverage-v8": "^3.0.8", "ajv": "^6.12.6", "downlevel-dts": "*", "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", - "vitest": "^3.0.7" + "vitest": "^3.0.8" }, "funding": { "type": "opencollective", diff --git a/yarn.lock b/yarn.lock index d7f7e83853dc..c110b6247603 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6030,7 +6030,7 @@ __metadata: "@typescript-eslint/parser": 8.29.0 "@typescript-eslint/typescript-estree": 8.29.0 "@typescript-eslint/utils": 8.29.0 - "@vitest/coverage-v8": ^3.0.7 + "@vitest/coverage-v8": ^3.0.8 ajv: ^6.12.6 debug: ^4.3.4 downlevel-dts: "*" @@ -6038,7 +6038,7 @@ __metadata: rimraf: "*" ts-api-utils: ^2.0.1 typescript: "*" - vitest: ^3.0.7 + vitest: ^3.0.8 peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" @@ -6238,32 +6238,6 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-v8@npm:^3.0.7": - version: 3.0.7 - resolution: "@vitest/coverage-v8@npm:3.0.7" - dependencies: - "@ampproject/remapping": ^2.3.0 - "@bcoe/v8-coverage": ^1.0.2 - debug: ^4.4.0 - istanbul-lib-coverage: ^3.2.2 - istanbul-lib-report: ^3.0.1 - istanbul-lib-source-maps: ^5.0.6 - istanbul-reports: ^3.1.7 - magic-string: ^0.30.17 - magicast: ^0.3.5 - std-env: ^3.8.0 - test-exclude: ^7.0.1 - tinyrainbow: ^2.0.0 - peerDependencies: - "@vitest/browser": 3.0.7 - vitest: 3.0.7 - peerDependenciesMeta: - "@vitest/browser": - optional: true - checksum: 46c5eb628bb1b77a3b6dc6cbf0c3968721fa5cbf9b01919f8e01252d239560a54c94797337e859a63cdf0f6606a8ad26f96c832f6b2c667890e0e026d44a4780 - languageName: node - linkType: hard - "@vitest/coverage-v8@npm:^3.0.8": version: 3.1.1 resolution: "@vitest/coverage-v8@npm:3.1.1" @@ -6307,18 +6281,6 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:3.0.7": - version: 3.0.7 - resolution: "@vitest/expect@npm:3.0.7" - dependencies: - "@vitest/spy": 3.0.7 - "@vitest/utils": 3.0.7 - chai: ^5.2.0 - tinyrainbow: ^2.0.0 - checksum: 788ead8ec0876a15bcd51eba8b5e0bc4c95e07205192096c0e33328992c351a7569b32ea2f948dbfc7b5482f301e6d505cde639ead2e80ffc9f0d683714b1bfa - languageName: node - linkType: hard - "@vitest/expect@npm:3.0.8": version: 3.0.8 resolution: "@vitest/expect@npm:3.0.8" @@ -6331,25 +6293,6 @@ __metadata: languageName: node linkType: hard -"@vitest/mocker@npm:3.0.7": - version: 3.0.7 - resolution: "@vitest/mocker@npm:3.0.7" - dependencies: - "@vitest/spy": 3.0.7 - estree-walker: ^3.0.3 - magic-string: ^0.30.17 - peerDependencies: - msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 - peerDependenciesMeta: - msw: - optional: true - vite: - optional: true - checksum: 057fe03ab4f9ef40f5431a375dc812da8face4f6c6045c817402bcd0739992ff1d31de080d8ac8c4122f792b2d27c4c04a4e4e872a04c3ba2b1517bc78430130 - languageName: node - linkType: hard - "@vitest/mocker@npm:3.0.8": version: 3.0.8 resolution: "@vitest/mocker@npm:3.0.8" @@ -6369,15 +6312,6 @@ __metadata: languageName: node linkType: hard -"@vitest/pretty-format@npm:3.0.7, @vitest/pretty-format@npm:^3.0.7": - version: 3.0.7 - resolution: "@vitest/pretty-format@npm:3.0.7" - dependencies: - tinyrainbow: ^2.0.0 - checksum: 5209282b26f57fa4bd918cba2265c34e161120f2fabc2987b0b77fb9a402a12cc5591d4e42689fcbdde5e2e1804cafc96e4e338d5b9d8b35ccbabd4cee7c8e81 - languageName: node - linkType: hard - "@vitest/pretty-format@npm:3.0.8, @vitest/pretty-format@npm:^3.0.8": version: 3.0.8 resolution: "@vitest/pretty-format@npm:3.0.8" @@ -6387,16 +6321,6 @@ __metadata: languageName: node linkType: hard -"@vitest/runner@npm:3.0.7": - version: 3.0.7 - resolution: "@vitest/runner@npm:3.0.7" - dependencies: - "@vitest/utils": 3.0.7 - pathe: ^2.0.3 - checksum: 980dd31c54b5b83e8ddc27d416999f3a8170abf3d836b2fb34a6730f942c53ad819399904bd46ea4bb89b4b0f3d0a793c135b3b83d70852859cbcad10111ae22 - languageName: node - linkType: hard - "@vitest/runner@npm:3.0.8": version: 3.0.8 resolution: "@vitest/runner@npm:3.0.8" @@ -6407,17 +6331,6 @@ __metadata: languageName: node linkType: hard -"@vitest/snapshot@npm:3.0.7": - version: 3.0.7 - resolution: "@vitest/snapshot@npm:3.0.7" - dependencies: - "@vitest/pretty-format": 3.0.7 - magic-string: ^0.30.17 - pathe: ^2.0.3 - checksum: d516bd7b04ba34726c57f1da7779165dbd376260f856a43254a4220ea6d040606440433583234de7282e0ec24fb7f6025d2a4f7688e2daebe75ed0afcd77d44c - languageName: node - linkType: hard - "@vitest/snapshot@npm:3.0.8": version: 3.0.8 resolution: "@vitest/snapshot@npm:3.0.8" @@ -6429,15 +6342,6 @@ __metadata: languageName: node linkType: hard -"@vitest/spy@npm:3.0.7": - version: 3.0.7 - resolution: "@vitest/spy@npm:3.0.7" - dependencies: - tinyspy: ^3.0.2 - checksum: f62537dc2632ed20464c017ca2feeb18bf2edd653bb1f6cd69ec5e6b52bb3803b1a601ca56777b0c463ce8d960294a0db9198c106dd6048d48ee5e7d09eaba59 - languageName: node - linkType: hard - "@vitest/spy@npm:3.0.8": version: 3.0.8 resolution: "@vitest/spy@npm:3.0.8" @@ -6447,17 +6351,6 @@ __metadata: languageName: node linkType: hard -"@vitest/utils@npm:3.0.7": - version: 3.0.7 - resolution: "@vitest/utils@npm:3.0.7" - dependencies: - "@vitest/pretty-format": 3.0.7 - loupe: ^3.1.3 - tinyrainbow: ^2.0.0 - checksum: 1a90d3444f9990484e6196d7cc1ceb0fcd8ca587319c0307d2e838f038ec45b7a711f8a76cbfb512fe13c6c3691e1d39d1d69158e27432724ec62b308e17f6e9 - languageName: node - linkType: hard - "@vitest/utils@npm:3.0.8": version: 3.0.8 resolution: "@vitest/utils@npm:3.0.8" @@ -20723,21 +20616,6 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:3.0.7": - version: 3.0.7 - resolution: "vite-node@npm:3.0.7" - dependencies: - cac: ^6.7.14 - debug: ^4.4.0 - es-module-lexer: ^1.6.0 - pathe: ^2.0.3 - vite: ^5.0.0 || ^6.0.0 - bin: - vite-node: vite-node.mjs - checksum: 90a3dd0e1b620cdf0c20272739cd1035af20c9b7606c1a093b3368b2c7c59cfd2327c27faabfbc9b293ae5d9a3318aeb40a2a974fe42807167e4cec625d9759e - languageName: node - linkType: hard - "vite-node@npm:3.0.8": version: 3.0.8 resolution: "vite-node@npm:3.0.8" @@ -20754,8 +20632,8 @@ __metadata: linkType: hard "vite@npm:^5.0.0 || ^6.0.0": - version: 6.2.0 - resolution: "vite@npm:6.2.0" + version: 6.2.1 + resolution: "vite@npm:6.2.1" dependencies: esbuild: ^0.25.0 fsevents: ~2.3.3 @@ -20801,7 +20679,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 0f2b6232fe94184885dd025609995874ac75279a85596a4053a283bd8bd0391f8ed3e7efb3e8f94073811a2b237c626e850990b04d2c7a1dc33f05d150f36bcd + checksum: d7379a9870c888681f7e4a861095e7f568ecd4cb99a5eed2dec65dc205ce863783d45c66a1a275868e23732087009533eadec999061c1ddef96aa8aaa0dcf6d2 languageName: node linkType: hard @@ -20857,59 +20735,6 @@ __metadata: languageName: node linkType: hard -"vitest@npm:^3.0.7": - version: 3.0.7 - resolution: "vitest@npm:3.0.7" - dependencies: - "@vitest/expect": 3.0.7 - "@vitest/mocker": 3.0.7 - "@vitest/pretty-format": ^3.0.7 - "@vitest/runner": 3.0.7 - "@vitest/snapshot": 3.0.7 - "@vitest/spy": 3.0.7 - "@vitest/utils": 3.0.7 - chai: ^5.2.0 - debug: ^4.4.0 - expect-type: ^1.1.0 - magic-string: ^0.30.17 - pathe: ^2.0.3 - std-env: ^3.8.0 - tinybench: ^2.9.0 - tinyexec: ^0.3.2 - tinypool: ^1.0.2 - tinyrainbow: ^2.0.0 - vite: ^5.0.0 || ^6.0.0 - vite-node: 3.0.7 - why-is-node-running: ^2.3.0 - peerDependencies: - "@edge-runtime/vm": "*" - "@types/debug": ^4.1.12 - "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 - "@vitest/browser": 3.0.7 - "@vitest/ui": 3.0.7 - happy-dom: "*" - jsdom: "*" - peerDependenciesMeta: - "@edge-runtime/vm": - optional: true - "@types/debug": - optional: true - "@types/node": - optional: true - "@vitest/browser": - optional: true - "@vitest/ui": - optional: true - happy-dom: - optional: true - jsdom: - optional: true - bin: - vitest: vitest.mjs - checksum: f384103ce5fdd5f0e4e3fbbb8e015ce887f1af6399a31a4fb8906407a6f4925b2e1708caba014c81f1c4a59627e944a65c7dc4de2819e7fe0b044796c57630ae - languageName: node - linkType: hard - "vitest@npm:^3.0.8": version: 3.0.8 resolution: "vitest@npm:3.0.8" From f91982286e173cca33f086196ab99c0d4d8afe00 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 7 Mar 2025 07:50:14 -0600 Subject: [PATCH 05/33] Fix Vitest config --- packages/type-utils/package.json | 2 +- packages/type-utils/project.json | 3 ++ .../tests/TypeOrValueSpecifier.test.ts | 39 ++++++++++++++----- packages/type-utils/vitest.config.mts | 5 ++- 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index f57da040bc37..037678f65558 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -43,7 +43,7 @@ "postclean": "rimraf dist/ _ts4.3/ coverage/", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "lint": "npx nx lint", - "test": "vitest --run", + "test": "vitest --run --config=$INIT_CWD/vitest.config.mts", "check-types": "npx nx typecheck" }, "dependencies": { diff --git a/packages/type-utils/project.json b/packages/type-utils/project.json index bdf45fb9dbe2..8c91c0ace943 100644 --- a/packages/type-utils/project.json +++ b/packages/type-utils/project.json @@ -8,6 +8,9 @@ "lint": { "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"] + }, + "test": { + "executor": "@nx/vite:test" } } } diff --git a/packages/type-utils/tests/TypeOrValueSpecifier.test.ts b/packages/type-utils/tests/TypeOrValueSpecifier.test.ts index 74e0d677919b..40b9d76b4faf 100644 --- a/packages/type-utils/tests/TypeOrValueSpecifier.test.ts +++ b/packages/type-utils/tests/TypeOrValueSpecifier.test.ts @@ -8,6 +8,10 @@ import type { TypeOrValueSpecifier } from '../src/TypeOrValueSpecifier'; import { typeMatchesSpecifier, typeOrValueSpecifiersSchema } from '../src'; +const ROOT_DIR = path.posix.join( + ...path.relative(process.cwd(), path.join(__dirname, '..')).split(path.sep), +); + describe('TypeOrValueSpecifier', () => { describe('Schema', () => { const ajv = new Ajv(); @@ -205,11 +209,19 @@ describe('TypeOrValueSpecifier', () => { ], [ 'interface Foo {prop: string}; type Test = Foo;', - { from: 'file', name: 'Foo', path: 'tests/fixtures/file.ts' }, + { + from: 'file', + name: 'Foo', + path: `${ROOT_DIR}/tests/fixtures/file.ts`, + }, ], [ 'type Foo = {prop: string}; type Test = Foo;', - { from: 'file', name: 'Foo', path: 'tests/fixtures/file.ts' }, + { + from: 'file', + name: 'Foo', + path: `${ROOT_DIR}/tests/fixtures/file.ts`, + }, ], [ 'type Foo = Promise & {hey?: string}; let foo: Foo = Promise.resolve(5); type Test = typeof foo;', @@ -220,7 +232,7 @@ describe('TypeOrValueSpecifier', () => { { from: 'file', name: 'Foo', - path: 'tests/../tests/fixtures/////file.ts', + path: `${ROOT_DIR}/tests/../tests/fixtures/////file.ts`, }, ], [ @@ -228,7 +240,7 @@ describe('TypeOrValueSpecifier', () => { { from: 'file', name: 'Foo', - path: 'tests/../tests/fixtures/////file.ts', + path: `${ROOT_DIR}/tests/../tests/fixtures/////file.ts`, }, ], [ @@ -236,7 +248,7 @@ describe('TypeOrValueSpecifier', () => { { from: 'file', name: ['Foo', 'Bar'], - path: 'tests/fixtures/file.ts', + path: `${ROOT_DIR}/tests/fixtures/file.ts`, }, ], [ @@ -244,7 +256,7 @@ describe('TypeOrValueSpecifier', () => { { from: 'file', name: ['Foo', 'Bar'], - path: 'tests/fixtures/file.ts', + path: `${ROOT_DIR}/tests/fixtures/file.ts`, }, ], ] as const satisfies [string, TypeOrValueSpecifier][])( @@ -558,18 +570,25 @@ describe('TypeOrValueSpecifier', () => { package: 'foo-package', }, ], - ['type Test = RegExp;', { from: 'file', name: 'RegExp' }], - ['type Test = RegExp;', { from: 'file', name: ['RegExp', 'BigInt'] }], + ['type Test = RegExp;', { from: 'file', name: 'RegExp', path: ROOT_DIR }], + [ + 'type Test = RegExp;', + { from: 'file', name: ['RegExp', 'BigInt'], path: ROOT_DIR }, + ], [ 'type Test = RegExp;', - { from: 'file', name: 'RegExp', path: 'tests/fixtures/file.ts' }, + { + from: 'file', + name: 'RegExp', + path: `${ROOT_DIR}/tests/fixtures/file.ts`, + }, ], [ 'type Test = RegExp;', { from: 'file', name: ['RegExp', 'BigInt'], - path: 'tests/fixtures/file.ts', + path: `${ROOT_DIR}/tests/fixtures/file.ts`, }, ], [ diff --git a/packages/type-utils/vitest.config.mts b/packages/type-utils/vitest.config.mts index c803e1d1c1ee..d3990efb8797 100644 --- a/packages/type-utils/vitest.config.mts +++ b/packages/type-utils/vitest.config.mts @@ -1,3 +1,4 @@ +import * as path from 'node:path'; import { defineConfig, mergeConfig } from 'vitest/config'; import { vitestBaseConfig } from '../../vitest.config.base.mjs'; @@ -8,8 +9,8 @@ const vitestConfig = mergeConfig( defineConfig({ test: { - dir: `${import.meta.dirname}/tests`, - name: packageJson.name, + dir: path.join(import.meta.dirname, 'tests'), + name: packageJson.name.split('/').pop(), root: import.meta.dirname, }, }), From 578be1fd6419cb2e0d7e8698ca11d8700beec690 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 8 Mar 2025 03:10:16 -0600 Subject: [PATCH 06/33] Include `vitest.config.mts` in `tsconfig.spec.json` --- packages/type-utils/tsconfig.spec.json | 10 +++++++++- packages/typescript-estree/tsconfig.spec.json | 1 + tsconfig.base.json | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/type-utils/tsconfig.spec.json b/packages/type-utils/tsconfig.spec.json index ee94c6d08bec..4df7c4a2945a 100644 --- a/packages/type-utils/tsconfig.spec.json +++ b/packages/type-utils/tsconfig.spec.json @@ -5,7 +5,15 @@ "module": "NodeNext", "types": ["node", "vitest/globals", "vitest/importMeta"] }, - "include": ["src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts", "tests"], + "include": [ + "../../vitest.config.base.mts", + "vitest.config.mts", + "package.json", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.d.ts", + "tests" + ], "exclude": ["**/fixtures/**"], "references": [ { diff --git a/packages/typescript-estree/tsconfig.spec.json b/packages/typescript-estree/tsconfig.spec.json index 5ab0499df71e..0ebfae73f2b1 100644 --- a/packages/typescript-estree/tsconfig.spec.json +++ b/packages/typescript-estree/tsconfig.spec.json @@ -8,6 +8,7 @@ }, "include": [ "jest.config.js", + "../../package.json", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts", diff --git a/tsconfig.base.json b/tsconfig.base.json index 0891cd26d2bd..cac35772e97e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -21,7 +21,8 @@ "noImplicitReturns": true, "pretty": true, "removeComments": false, - "resolveJsonModule": false, + "resolveJsonModule": true, + "rootDir": "./", "skipDefaultLibCheck": false, "skipLibCheck": true, "sourceMap": false, From 37ed9a8a34caf4bf377034eb754c4afe67a62865 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 8 Mar 2025 03:53:08 -0600 Subject: [PATCH 07/33] Add `vitest.config.mts` files to ESLint configuration --- eslint.config.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index e8ef18c8420f..682cb8b37ab1 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -74,7 +74,6 @@ export default tseslint.config( '.nx/', '.yarn/', '**/jest.config.js', - '**/vitest.config.mts', '**/node_modules/**', '**/dist/**', '**/fixtures/**', From 6e45f7e5cb00d3d86f80fc2df26ca3c0eadbd618 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 10 Mar 2025 06:11:15 -0500 Subject: [PATCH 08/33] Use `defineProject` instead of `defineConfig` --- packages/type-utils/vitest.config.mts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/type-utils/vitest.config.mts b/packages/type-utils/vitest.config.mts index d3990efb8797..d29a8172c238 100644 --- a/packages/type-utils/vitest.config.mts +++ b/packages/type-utils/vitest.config.mts @@ -1,5 +1,5 @@ import * as path from 'node:path'; -import { defineConfig, mergeConfig } from 'vitest/config'; +import { defineProject, mergeConfig } from 'vitest/config'; import { vitestBaseConfig } from '../../vitest.config.base.mjs'; import packageJson from './package.json' with { type: 'json' }; @@ -7,7 +7,7 @@ import packageJson from './package.json' with { type: 'json' }; const vitestConfig = mergeConfig( vitestBaseConfig, - defineConfig({ + defineProject({ test: { dir: path.join(import.meta.dirname, 'tests'), name: packageJson.name.split('/').pop(), From d40ac848438ab6cd95fd4ebee169d816871c5318 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 10 Mar 2025 06:47:44 -0500 Subject: [PATCH 09/33] Explicitly enable `resolveJsonModule` --- packages/type-utils/tsconfig.spec.json | 1 + tsconfig.base.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/type-utils/tsconfig.spec.json b/packages/type-utils/tsconfig.spec.json index 4df7c4a2945a..095a2b0e4265 100644 --- a/packages/type-utils/tsconfig.spec.json +++ b/packages/type-utils/tsconfig.spec.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "../../dist/out-tsc/packages/type-utils", "module": "NodeNext", + "resolveJsonModule": true, "types": ["node", "vitest/globals", "vitest/importMeta"] }, "include": [ diff --git a/tsconfig.base.json b/tsconfig.base.json index cac35772e97e..8f80694b00b0 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -21,7 +21,7 @@ "noImplicitReturns": true, "pretty": true, "removeComments": false, - "resolveJsonModule": true, + "resolveJsonModule": false, "rootDir": "./", "skipDefaultLibCheck": false, "skipLibCheck": true, From 167178bc4730912553d3e7b15cd1ae7af90d659c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 10 Mar 2025 08:09:14 -0500 Subject: [PATCH 10/33] Use `.replace` instead of `.split` --- packages/type-utils/vitest.config.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/type-utils/vitest.config.mts b/packages/type-utils/vitest.config.mts index d29a8172c238..4b5c326507e2 100644 --- a/packages/type-utils/vitest.config.mts +++ b/packages/type-utils/vitest.config.mts @@ -10,7 +10,7 @@ const vitestConfig = mergeConfig( defineProject({ test: { dir: path.join(import.meta.dirname, 'tests'), - name: packageJson.name.split('/').pop(), + name: packageJson.name.replace('@typescript-eslint/', ''), root: import.meta.dirname, }, }), From a8b0c668f778ed61d983a7cdd7d7d4d14afbc08c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 10 Mar 2025 08:43:07 -0500 Subject: [PATCH 11/33] Type check `vitest.config.mts` files using project references. --- packages/type-utils/tsconfig.spec.json | 4 +++- packages/typescript-estree/tsconfig.spec.json | 1 - tsconfig.base.json | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/type-utils/tsconfig.spec.json b/packages/type-utils/tsconfig.spec.json index 095a2b0e4265..84da90bf1f9d 100644 --- a/packages/type-utils/tsconfig.spec.json +++ b/packages/type-utils/tsconfig.spec.json @@ -7,7 +7,6 @@ "types": ["node", "vitest/globals", "vitest/importMeta"] }, "include": [ - "../../vitest.config.base.mts", "vitest.config.mts", "package.json", "src/**/*.test.ts", @@ -19,6 +18,9 @@ "references": [ { "path": "./tsconfig.build.json" + }, + { + "path": "../../tsconfig.repo-config-files.json" } ] } diff --git a/packages/typescript-estree/tsconfig.spec.json b/packages/typescript-estree/tsconfig.spec.json index 0ebfae73f2b1..5ab0499df71e 100644 --- a/packages/typescript-estree/tsconfig.spec.json +++ b/packages/typescript-estree/tsconfig.spec.json @@ -8,7 +8,6 @@ }, "include": [ "jest.config.js", - "../../package.json", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts", diff --git a/tsconfig.base.json b/tsconfig.base.json index 8f80694b00b0..0891cd26d2bd 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -22,7 +22,6 @@ "pretty": true, "removeComments": false, "resolveJsonModule": false, - "rootDir": "./", "skipDefaultLibCheck": false, "skipLibCheck": true, "sourceMap": false, From af5caa4d844b19051410a2f33940f51088e6900f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Wed, 12 Mar 2025 00:47:07 -0500 Subject: [PATCH 12/33] Fix Vitest config --- packages/type-utils/vitest.config.mts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/type-utils/vitest.config.mts b/packages/type-utils/vitest.config.mts index 4b5c326507e2..ddc038f86b56 100644 --- a/packages/type-utils/vitest.config.mts +++ b/packages/type-utils/vitest.config.mts @@ -8,6 +8,8 @@ const vitestConfig = mergeConfig( vitestBaseConfig, defineProject({ + root: import.meta.dirname, + test: { dir: path.join(import.meta.dirname, 'tests'), name: packageJson.name.replace('@typescript-eslint/', ''), From a502477f1dd4b5c58be76c5f4fa467abfa5743c4 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 15 Mar 2025 22:13:57 -0500 Subject: [PATCH 13/33] Fix `typecheck` task --- packages/type-utils/tsconfig.spec.json | 2 +- tsconfig.repo-config-files.json | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/type-utils/tsconfig.spec.json b/packages/type-utils/tsconfig.spec.json index 84da90bf1f9d..7ec995aaf7dc 100644 --- a/packages/type-utils/tsconfig.spec.json +++ b/packages/type-utils/tsconfig.spec.json @@ -20,7 +20,7 @@ "path": "./tsconfig.build.json" }, { - "path": "../../tsconfig.repo-config-files.json" + "path": "../../tsconfig.spec.json" } ] } diff --git a/tsconfig.repo-config-files.json b/tsconfig.repo-config-files.json index b34e770c2746..d0c46503c208 100644 --- a/tsconfig.repo-config-files.json +++ b/tsconfig.repo-config-files.json @@ -12,8 +12,6 @@ "tools/**/*.ts", "tools/**/*.mts", "eslint.config.mjs", - "vitest.config.base.mts", - "vitest.config.mts", "jest.config.base.js", "jest.config.js", "jest.preset.js", From e9b2248601ebabcdcb3419398e68d10b29b1e589 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Wed, 26 Mar 2025 14:41:59 -0500 Subject: [PATCH 14/33] Update `vitest` to version 3.0.9 --- package.json | 6 +- packages/eslint-plugin-internal/package.json | 4 +- packages/type-utils/package.json | 4 +- packages/typescript-eslint/package.json | 4 +- yarn.lock | 382 +++++++++---------- 5 files changed, 179 insertions(+), 221 deletions(-) diff --git a/package.json b/package.json index 6aeb68662580..65234a0f7c06 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@typescript-eslint/types": "workspace:^", "@typescript-eslint/typescript-estree": "workspace:^", "@typescript-eslint/utils": "workspace:^", - "@vitest/coverage-v8": "^3.0.8", + "@vitest/coverage-v8": "^3.0.9", "@vitest/eslint-plugin": "^1.1.37", "console-fail-test": "^0.5.0", "cross-fetch": "^4.0.0", @@ -126,8 +126,8 @@ "tsx": "*", "typescript": ">=4.8.4 <5.9.0", "typescript-eslint": "workspace:^", - "vite": "^6.2.2", - "vitest": "^3.0.8", + "vite": "^6.2.3", + "vitest": "^3.0.9", "yargs": "17.7.2" }, "resolutions": { diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 4709ac5c9efc..57bbbb8d28e5 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -31,8 +31,8 @@ "prettier": "^3.2.5" }, "devDependencies": { - "@vitest/coverage-v8": "^3.0.8", + "@vitest/coverage-v8": "^3.0.9", "rimraf": "*", - "vitest": "^3.0.8" + "vitest": "^3.0.9" } } diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 037678f65558..212e03dc58b7 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -58,13 +58,13 @@ }, "devDependencies": { "@typescript-eslint/parser": "8.29.0", - "@vitest/coverage-v8": "^3.0.8", + "@vitest/coverage-v8": "^3.0.9", "ajv": "^6.12.6", "downlevel-dts": "*", "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", - "vitest": "^3.0.8" + "vitest": "^3.0.9" }, "funding": { "type": "opencollective", diff --git a/packages/typescript-eslint/package.json b/packages/typescript-eslint/package.json index 15d0cdcda68a..651097c9063b 100644 --- a/packages/typescript-eslint/package.json +++ b/packages/typescript-eslint/package.json @@ -62,12 +62,12 @@ "typescript": ">=4.8.4 <5.9.0" }, "devDependencies": { - "@vitest/coverage-v8": "^3.0.8", + "@vitest/coverage-v8": "^3.0.9", "downlevel-dts": "*", "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", - "vitest": "^3.0.8" + "vitest": "^3.0.9" }, "funding": { "type": "opencollective", diff --git a/yarn.lock b/yarn.lock index c110b6247603..01bd9b7be388 100644 --- a/yarn.lock +++ b/yarn.lock @@ -569,13 +569,13 @@ __metadata: linkType: hard "@babel/parser@npm:^7.25.4": - version: 7.26.9 - resolution: "@babel/parser@npm:7.26.9" + version: 7.27.0 + resolution: "@babel/parser@npm:7.27.0" dependencies: - "@babel/types": ^7.26.9 + "@babel/types": ^7.27.0 bin: parser: ./bin/babel-parser.js - checksum: 2df965dbf3c67d19dc437412ceef23033b4d39b0dbd7cb498d8ab9ad9e1738338656ee72676199773b37d658edf9f4161cf255515234fed30695d74e73be5514 + checksum: 062a4e6d51553603253990c84e051ed48671a55b9d4e9caf2eff9dc888465070a0cfd288a467dbf0d99507781ea4a835b5606e32ddc0319f1b9273f913676829 languageName: node linkType: hard @@ -1728,13 +1728,13 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.25.4, @babel/types@npm:^7.26.9": - version: 7.26.9 - resolution: "@babel/types@npm:7.26.9" +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.27.0": + version: 7.27.0 + resolution: "@babel/types@npm:7.27.0" dependencies: "@babel/helper-string-parser": ^7.25.9 "@babel/helper-validator-identifier": ^7.25.9 - checksum: cc124c149615deb30343a4c81ac5b0e3a68bdb4b1bd61a91a2859ee8e5e5f400f6ff65be4740f407c17bfc09baa9c777e7f8f765dccf3284963956b67ac95a38 + checksum: 59582019eb8a693d4277015d4dec0233874d884b9019dcd09550332db7f0f2ac9e30eca685bb0ada4bab5a4dc8bbc2a6bcaadb151c69b7e6aa94b5eaf8fc8c51 languageName: node linkType: hard @@ -4528,135 +4528,142 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.34.9" +"@rollup/rollup-android-arm-eabi@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.37.0" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-android-arm64@npm:4.34.9" +"@rollup/rollup-android-arm64@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-android-arm64@npm:4.37.0" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-darwin-arm64@npm:4.34.9" +"@rollup/rollup-darwin-arm64@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-darwin-arm64@npm:4.37.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-darwin-x64@npm:4.34.9" +"@rollup/rollup-darwin-x64@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-darwin-x64@npm:4.37.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-freebsd-arm64@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-freebsd-arm64@npm:4.34.9" +"@rollup/rollup-freebsd-arm64@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.37.0" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-freebsd-x64@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-freebsd-x64@npm:4.34.9" +"@rollup/rollup-freebsd-x64@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-freebsd-x64@npm:4.37.0" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.34.9" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.37.0" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.34.9" +"@rollup/rollup-linux-arm-musleabihf@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.37.0" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.34.9" +"@rollup/rollup-linux-arm64-gnu@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.37.0" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.34.9" +"@rollup/rollup-linux-arm64-musl@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.37.0" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-loongarch64-gnu@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.34.9" +"@rollup/rollup-linux-loongarch64-gnu@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.37.0" conditions: os=linux & cpu=loong64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.34.9" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.37.0" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.34.9" +"@rollup/rollup-linux-riscv64-gnu@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.37.0" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.34.9" +"@rollup/rollup-linux-riscv64-musl@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-riscv64-musl@npm:4.37.0" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-s390x-gnu@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.37.0" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.34.9" +"@rollup/rollup-linux-x64-gnu@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.37.0" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.34.9" +"@rollup/rollup-linux-x64-musl@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.37.0" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.34.9" +"@rollup/rollup-win32-arm64-msvc@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.37.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.34.9" +"@rollup/rollup-win32-ia32-msvc@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.37.0" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.34.9": - version: 4.34.9 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.34.9" +"@rollup/rollup-win32-x64-msvc@npm:4.37.0": + version: 4.37.0 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.37.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -5881,10 +5888,10 @@ __metadata: "@typescript-eslint/scope-manager": "workspace:*" "@typescript-eslint/type-utils": "workspace:*" "@typescript-eslint/utils": "workspace:*" - "@vitest/coverage-v8": ^3.0.8 + "@vitest/coverage-v8": ^3.0.9 prettier: ^3.2.5 rimraf: "*" - vitest: ^3.0.8 + vitest: ^3.0.9 languageName: unknown linkType: soft @@ -6030,7 +6037,7 @@ __metadata: "@typescript-eslint/parser": 8.29.0 "@typescript-eslint/typescript-estree": 8.29.0 "@typescript-eslint/utils": 8.29.0 - "@vitest/coverage-v8": ^3.0.8 + "@vitest/coverage-v8": ^3.0.9 ajv: ^6.12.6 debug: ^4.3.4 downlevel-dts: "*" @@ -6038,7 +6045,7 @@ __metadata: rimraf: "*" ts-api-utils: ^2.0.1 typescript: "*" - vitest: ^3.0.8 + vitest: ^3.0.9 peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" @@ -6099,7 +6106,7 @@ __metadata: "@typescript-eslint/types": "workspace:^" "@typescript-eslint/typescript-estree": "workspace:^" "@typescript-eslint/utils": "workspace:^" - "@vitest/coverage-v8": ^3.0.8 + "@vitest/coverage-v8": ^3.0.9 "@vitest/eslint-plugin": ^1.1.37 console-fail-test: ^0.5.0 cross-fetch: ^4.0.0 @@ -6136,8 +6143,8 @@ __metadata: tsx: "*" typescript: ">=4.8.4 <5.9.0" typescript-eslint: "workspace:^" - vite: ^6.2.2 - vitest: ^3.0.8 + vite: ^6.2.3 + vitest: ^3.0.9 yargs: 17.7.2 languageName: unknown linkType: soft @@ -6238,9 +6245,9 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-v8@npm:^3.0.8": - version: 3.1.1 - resolution: "@vitest/coverage-v8@npm:3.1.1" +"@vitest/coverage-v8@npm:^3.0.9": + version: 3.0.9 + resolution: "@vitest/coverage-v8@npm:3.0.9" dependencies: "@ampproject/remapping": ^2.3.0 "@bcoe/v8-coverage": ^1.0.2 @@ -6255,12 +6262,12 @@ __metadata: test-exclude: ^7.0.1 tinyrainbow: ^2.0.0 peerDependencies: - "@vitest/browser": 3.1.1 - vitest: 3.1.1 + "@vitest/browser": 3.0.9 + vitest: 3.0.9 peerDependenciesMeta: "@vitest/browser": optional: true - checksum: 5f55207c0f3ccf66cb56267643fffdce06bece64eb7f777c49257094c82371fb087e83976821f1c234dc796bc396dd89a3e26c59ad1534dcc639c39caa116532 + checksum: cb6d05fb696356e5dbc7a8bb136e285c34501fe0991904e69f42df5a45c114488d80e27175dc607b934547afb2255c4444efe0f789883082c50d770d2d4ffd92 languageName: node linkType: hard @@ -6281,23 +6288,23 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:3.0.8": - version: 3.0.8 - resolution: "@vitest/expect@npm:3.0.8" +"@vitest/expect@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/expect@npm:3.0.9" dependencies: - "@vitest/spy": 3.0.8 - "@vitest/utils": 3.0.8 + "@vitest/spy": 3.0.9 + "@vitest/utils": 3.0.9 chai: ^5.2.0 tinyrainbow: ^2.0.0 - checksum: f3356755ff797f763d31cd6dca5a9ca9e2bb9a9da18e3154659cf9d4b7676342c45bce53e8aa76464d28797bd9a4aa7fa75a76857927706007cbe5385522fd56 + checksum: 6df325d45e0ad4b6ad73a55e5328f615f92171fc4dbf3875972c08013727cfa435b9916636c7f3902a45f1874db10805d449311b70125edf1422dceb325ac982 languageName: node linkType: hard -"@vitest/mocker@npm:3.0.8": - version: 3.0.8 - resolution: "@vitest/mocker@npm:3.0.8" +"@vitest/mocker@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/mocker@npm:3.0.9" dependencies: - "@vitest/spy": 3.0.8 + "@vitest/spy": 3.0.9 estree-walker: ^3.0.3 magic-string: ^0.30.17 peerDependencies: @@ -6308,57 +6315,57 @@ __metadata: optional: true vite: optional: true - checksum: 9769160ca5386cc46cd627bc654168f8267b873dac078bdd33e02f22baf3be2b411f65a7cd54173756a9d88ca90c43bb61e1febc58b4dcbfc96eac529ec0583a + checksum: e8e8fb8eb938316a8444160859a0c1413488fa3f347b3f80597e3e4fc695597132c9f5f55280b4c35bf4dc3b13fc968b38c804d62f1effbfd49c147d05f73643 languageName: node linkType: hard -"@vitest/pretty-format@npm:3.0.8, @vitest/pretty-format@npm:^3.0.8": - version: 3.0.8 - resolution: "@vitest/pretty-format@npm:3.0.8" +"@vitest/pretty-format@npm:3.0.9, @vitest/pretty-format@npm:^3.0.9": + version: 3.0.9 + resolution: "@vitest/pretty-format@npm:3.0.9" dependencies: tinyrainbow: ^2.0.0 - checksum: 1c0651979b44d58203b5a508e4e09d368ea3fbf2721fc555a701a7b35921b30fc363965686e026350d0870b17fb79ddcb20d386b8a51ae42bd0e82e1fe995aa9 + checksum: 447b53bd962bc5978cf3e8c67f0600e38470ea63ab6ae24fb048dca79305828f37d9d854a7db1abc97ebde66a65187f87a99ca7969e43c750998c944e3ec48c6 languageName: node linkType: hard -"@vitest/runner@npm:3.0.8": - version: 3.0.8 - resolution: "@vitest/runner@npm:3.0.8" +"@vitest/runner@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/runner@npm:3.0.9" dependencies: - "@vitest/utils": 3.0.8 + "@vitest/utils": 3.0.9 pathe: ^2.0.3 - checksum: 220449385e2064be48cc75ad74824e008c4ac493d6b5422433cf4ad67745802a69e55e8b81a5cd7615243e1c33f148ea5edb63b9a2b56e7c83838143a188abcc + checksum: fd3efa42a75aaa4eb370b9bf084a311f4b485786411e6dfecf28da70e05b1621f595510e4414f2d4ef1e7bf1a7400e2f6a9e17ca786f2f4842775339e606410d languageName: node linkType: hard -"@vitest/snapshot@npm:3.0.8": - version: 3.0.8 - resolution: "@vitest/snapshot@npm:3.0.8" +"@vitest/snapshot@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/snapshot@npm:3.0.9" dependencies: - "@vitest/pretty-format": 3.0.8 + "@vitest/pretty-format": 3.0.9 magic-string: ^0.30.17 pathe: ^2.0.3 - checksum: 1bccaf37de698a6b73a54afdcbfa2874f75bf0dcab6c00f01994294f166448856491ddaddb406325832ceb54b7623b5c35d132dbffad5575d3e0a7a0df84fa12 + checksum: 79c42c6b10f972ddcf9ab1f32f8e181fe54a2b253df2d7f09f1bd4162b976093442cbdcc8ae58046768b52c65cf3a49aa8694d5505d19c49b253c0d8089cd31d languageName: node linkType: hard -"@vitest/spy@npm:3.0.8": - version: 3.0.8 - resolution: "@vitest/spy@npm:3.0.8" +"@vitest/spy@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/spy@npm:3.0.9" dependencies: tinyspy: ^3.0.2 - checksum: 2e35b0fb0434baff243b26ebf4b57665b07e6f51efedd70ebb9422cd30942893612f6aed68c32956212f3f22d4ef335ac0d12987480d536c12892e0a45255f34 + checksum: 1b90f40c4ac34529e7d098c745396a51e9b2f187d31d50a664ac7374db56edb3792862a35d1b8049e421705db6445761d687f9f8c5e298a9ca6cfa47d55625d7 languageName: node linkType: hard -"@vitest/utils@npm:3.0.8": - version: 3.0.8 - resolution: "@vitest/utils@npm:3.0.8" +"@vitest/utils@npm:3.0.9": + version: 3.0.9 + resolution: "@vitest/utils@npm:3.0.9" dependencies: - "@vitest/pretty-format": 3.0.8 + "@vitest/pretty-format": 3.0.9 loupe: ^3.1.3 tinyrainbow: ^2.0.0 - checksum: 20bac67702c8f32316dba3af165db23bd588913050cabaf8f86512a26389078c84eee7900dc2da2fcca452c540f8a55c42dd48a8cc808016a021f6dd41c1e31f + checksum: d31797594598817670cc49dfcd4ded2953d707c62e5dc7807737e8108073e97499cf7ef2eb3295f1fb52446a8a85ba50aacef21126689251092bc8566bff4bb6 languageName: node linkType: hard @@ -18214,28 +18221,29 @@ __metadata: linkType: hard "rollup@npm:^4.30.1": - version: 4.34.9 - resolution: "rollup@npm:4.34.9" - dependencies: - "@rollup/rollup-android-arm-eabi": 4.34.9 - "@rollup/rollup-android-arm64": 4.34.9 - "@rollup/rollup-darwin-arm64": 4.34.9 - "@rollup/rollup-darwin-x64": 4.34.9 - "@rollup/rollup-freebsd-arm64": 4.34.9 - "@rollup/rollup-freebsd-x64": 4.34.9 - "@rollup/rollup-linux-arm-gnueabihf": 4.34.9 - "@rollup/rollup-linux-arm-musleabihf": 4.34.9 - "@rollup/rollup-linux-arm64-gnu": 4.34.9 - "@rollup/rollup-linux-arm64-musl": 4.34.9 - "@rollup/rollup-linux-loongarch64-gnu": 4.34.9 - "@rollup/rollup-linux-powerpc64le-gnu": 4.34.9 - "@rollup/rollup-linux-riscv64-gnu": 4.34.9 - "@rollup/rollup-linux-s390x-gnu": 4.34.9 - "@rollup/rollup-linux-x64-gnu": 4.34.9 - "@rollup/rollup-linux-x64-musl": 4.34.9 - "@rollup/rollup-win32-arm64-msvc": 4.34.9 - "@rollup/rollup-win32-ia32-msvc": 4.34.9 - "@rollup/rollup-win32-x64-msvc": 4.34.9 + version: 4.37.0 + resolution: "rollup@npm:4.37.0" + dependencies: + "@rollup/rollup-android-arm-eabi": 4.37.0 + "@rollup/rollup-android-arm64": 4.37.0 + "@rollup/rollup-darwin-arm64": 4.37.0 + "@rollup/rollup-darwin-x64": 4.37.0 + "@rollup/rollup-freebsd-arm64": 4.37.0 + "@rollup/rollup-freebsd-x64": 4.37.0 + "@rollup/rollup-linux-arm-gnueabihf": 4.37.0 + "@rollup/rollup-linux-arm-musleabihf": 4.37.0 + "@rollup/rollup-linux-arm64-gnu": 4.37.0 + "@rollup/rollup-linux-arm64-musl": 4.37.0 + "@rollup/rollup-linux-loongarch64-gnu": 4.37.0 + "@rollup/rollup-linux-powerpc64le-gnu": 4.37.0 + "@rollup/rollup-linux-riscv64-gnu": 4.37.0 + "@rollup/rollup-linux-riscv64-musl": 4.37.0 + "@rollup/rollup-linux-s390x-gnu": 4.37.0 + "@rollup/rollup-linux-x64-gnu": 4.37.0 + "@rollup/rollup-linux-x64-musl": 4.37.0 + "@rollup/rollup-win32-arm64-msvc": 4.37.0 + "@rollup/rollup-win32-ia32-msvc": 4.37.0 + "@rollup/rollup-win32-x64-msvc": 4.37.0 "@types/estree": 1.0.6 fsevents: ~2.3.2 dependenciesMeta: @@ -18265,6 +18273,8 @@ __metadata: optional: true "@rollup/rollup-linux-riscv64-gnu": optional: true + "@rollup/rollup-linux-riscv64-musl": + optional: true "@rollup/rollup-linux-s390x-gnu": optional: true "@rollup/rollup-linux-x64-gnu": @@ -18281,7 +18291,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: ed7a5e382de5fe872abffdab614b7f745cbed7328cf4ced560c4d09214b3d30e167f8c7df9e8b63489497bdf3a6be07a2474f9ff3195026bdf2d49cdbeac38ae + checksum: bb6c82ab5a12750e7dd521651f7bb7f44e4c03f058f38995f65141d4032b53a9f4b14d777af1bec6f00cdbbd1cf856581b516d803c9c5ecaede0b77501239673 languageName: node linkType: hard @@ -20177,12 +20187,12 @@ __metadata: "@typescript-eslint/eslint-plugin": 8.29.0 "@typescript-eslint/parser": 8.29.0 "@typescript-eslint/utils": 8.29.0 - "@vitest/coverage-v8": ^3.0.8 + "@vitest/coverage-v8": ^3.0.9 downlevel-dts: "*" prettier: ^3.2.5 rimraf: "*" typescript: "*" - vitest: ^3.0.8 + vitest: ^3.0.9 peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" @@ -20616,9 +20626,9 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:3.0.8": - version: 3.0.8 - resolution: "vite-node@npm:3.0.8" +"vite-node@npm:3.0.9": + version: 3.0.9 + resolution: "vite-node@npm:3.0.9" dependencies: cac: ^6.7.14 debug: ^4.4.0 @@ -20627,13 +20637,13 @@ __metadata: vite: ^5.0.0 || ^6.0.0 bin: vite-node: vite-node.mjs - checksum: 58532ba5bab923dedad7c28fb8b37afc4ef009a8b62dde31f38919958bc3cd47d580b56ad82f321873c3d0d67e691a8eac10c26b06c70843eb357ed2105a44c2 + checksum: 6a40628da3d3098aa10404106b12b77327301260f3979dacce0d579a6ee09258982ee81183118f13c0703c0a0cf77118ae56a29354a4bed79565d35d1187d42d languageName: node linkType: hard -"vite@npm:^5.0.0 || ^6.0.0": - version: 6.2.1 - resolution: "vite@npm:6.2.1" +"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.3": + version: 6.2.3 + resolution: "vite@npm:6.2.3" dependencies: esbuild: ^0.25.0 fsevents: ~2.3.3 @@ -20679,73 +20689,21 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: d7379a9870c888681f7e4a861095e7f568ecd4cb99a5eed2dec65dc205ce863783d45c66a1a275868e23732087009533eadec999061c1ddef96aa8aaa0dcf6d2 + checksum: 5ce6c0ce9fd3591e1eb21ffaac9b1395cbd03926399cdb0f2a333c08fd9cab17da47d5203b88b574675c4a6ad5a77dd4a88ad51ea400ad6d75d993d5f05c8b64 languageName: node linkType: hard -"vite@npm:^6.2.2": - version: 6.2.5 - resolution: "vite@npm:6.2.5" - dependencies: - esbuild: ^0.25.0 - fsevents: ~2.3.3 - postcss: ^8.5.3 - rollup: ^4.30.1 - peerDependencies: - "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 - jiti: ">=1.21.0" - less: "*" - lightningcss: ^1.21.0 - sass: "*" - sass-embedded: "*" - stylus: "*" - sugarss: "*" - terser: ^5.16.0 - tsx: ^4.8.1 - yaml: ^2.4.2 - dependenciesMeta: - fsevents: - optional: true - peerDependenciesMeta: - "@types/node": - optional: true - jiti: - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - tsx: - optional: true - yaml: - optional: true - bin: - vite: bin/vite.js - checksum: 49a6529c5ae8d6e4926f2daa51d7e20c50d780d8d2ec8c08605e966983fe8d17ec69bc36a356c1a21141c5a630b7a4109f3690c5b33f579d3e2bf26f914a149d - languageName: node - linkType: hard - -"vitest@npm:^3.0.8": - version: 3.0.8 - resolution: "vitest@npm:3.0.8" - dependencies: - "@vitest/expect": 3.0.8 - "@vitest/mocker": 3.0.8 - "@vitest/pretty-format": ^3.0.8 - "@vitest/runner": 3.0.8 - "@vitest/snapshot": 3.0.8 - "@vitest/spy": 3.0.8 - "@vitest/utils": 3.0.8 +"vitest@npm:^3.0.9": + version: 3.0.9 + resolution: "vitest@npm:3.0.9" + dependencies: + "@vitest/expect": 3.0.9 + "@vitest/mocker": 3.0.9 + "@vitest/pretty-format": ^3.0.9 + "@vitest/runner": 3.0.9 + "@vitest/snapshot": 3.0.9 + "@vitest/spy": 3.0.9 + "@vitest/utils": 3.0.9 chai: ^5.2.0 debug: ^4.4.0 expect-type: ^1.1.0 @@ -20757,14 +20715,14 @@ __metadata: tinypool: ^1.0.2 tinyrainbow: ^2.0.0 vite: ^5.0.0 || ^6.0.0 - vite-node: 3.0.8 + vite-node: 3.0.9 why-is-node-running: ^2.3.0 peerDependencies: "@edge-runtime/vm": "*" "@types/debug": ^4.1.12 "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 - "@vitest/browser": 3.0.8 - "@vitest/ui": 3.0.8 + "@vitest/browser": 3.0.9 + "@vitest/ui": 3.0.9 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -20784,7 +20742,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: e4786f6127a261d61fec20c1a9cc2acae514696fc382d0cd9c62d83d7d872eaadf4d7d09495a04a6c5a8879306f197a35729c7c6c1929ef870ea063e4be87847 + checksum: f8ec160cf8f75e4344dfa8f330e2cac6a49635977319a04c36803ccec1b69918381e435cb9d01edafab293648c65e9b766bba71fdf3451cb927590be263687f9 languageName: node linkType: hard From e759da4670c4faa4a97ce51865349c8bcf7b21e4 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Wed, 26 Mar 2025 14:44:13 -0500 Subject: [PATCH 15/33] Update `@vitest/eslint-plugin` to version 1.1.38 --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 65234a0f7c06..15282a8f32d6 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@typescript-eslint/typescript-estree": "workspace:^", "@typescript-eslint/utils": "workspace:^", "@vitest/coverage-v8": "^3.0.9", - "@vitest/eslint-plugin": "^1.1.37", + "@vitest/eslint-plugin": "^1.1.38", "console-fail-test": "^0.5.0", "cross-fetch": "^4.0.0", "cspell": "^8.15.2", diff --git a/yarn.lock b/yarn.lock index 01bd9b7be388..55e58b73064e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6107,7 +6107,7 @@ __metadata: "@typescript-eslint/typescript-estree": "workspace:^" "@typescript-eslint/utils": "workspace:^" "@vitest/coverage-v8": ^3.0.9 - "@vitest/eslint-plugin": ^1.1.37 + "@vitest/eslint-plugin": ^1.1.38 console-fail-test: ^0.5.0 cross-fetch: ^4.0.0 cspell: ^8.15.2 @@ -6271,9 +6271,9 @@ __metadata: languageName: node linkType: hard -"@vitest/eslint-plugin@npm:^1.1.37": - version: 1.1.39 - resolution: "@vitest/eslint-plugin@npm:1.1.39" +"@vitest/eslint-plugin@npm:^1.1.38": + version: 1.1.38 + resolution: "@vitest/eslint-plugin@npm:1.1.38" peerDependencies: "@typescript-eslint/utils": ^8.24.0 eslint: ">= 8.57.0" @@ -6284,7 +6284,7 @@ __metadata: optional: true vitest: optional: true - checksum: 0730c7d2a24b6e72ad74478991f7426fe889d0a326f4dc5034db5bfb1fcedeb1f54f8d90d61587e66c447139fa5c72af07003d740753860de82a9b0565bd14aa + checksum: 139b3f3f6fbb4e3ef92a5228f6e73b881228351f0ff32fe0d1c3e63a0d3548eb8927c15ab41053dd18b642c111b291f9333b3db097a188af659ee7aa11993dd0 languageName: node linkType: hard From 1f44186e5482a89f44f9e89657c0bceee15e97dd Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Mon, 31 Mar 2025 09:16:47 -0500 Subject: [PATCH 16/33] Update `vitest` to version 3.1.1 --- package.json | 6 +- packages/eslint-plugin-internal/package.json | 4 +- packages/type-utils/package.json | 4 +- packages/typescript-eslint/package.json | 4 +- yarn.lock | 660 +++++++++++++------ 5 files changed, 466 insertions(+), 212 deletions(-) diff --git a/package.json b/package.json index 15282a8f32d6..e0da784ef01b 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@typescript-eslint/types": "workspace:^", "@typescript-eslint/typescript-estree": "workspace:^", "@typescript-eslint/utils": "workspace:^", - "@vitest/coverage-v8": "^3.0.9", + "@vitest/coverage-v8": "^3.1.1", "@vitest/eslint-plugin": "^1.1.38", "console-fail-test": "^0.5.0", "cross-fetch": "^4.0.0", @@ -126,8 +126,8 @@ "tsx": "*", "typescript": ">=4.8.4 <5.9.0", "typescript-eslint": "workspace:^", - "vite": "^6.2.3", - "vitest": "^3.0.9", + "vite": "^6.2.4", + "vitest": "^3.1.1", "yargs": "17.7.2" }, "resolutions": { diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 57bbbb8d28e5..2446f9acb6a3 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -31,8 +31,8 @@ "prettier": "^3.2.5" }, "devDependencies": { - "@vitest/coverage-v8": "^3.0.9", + "@vitest/coverage-v8": "^3.1.1", "rimraf": "*", - "vitest": "^3.0.9" + "vitest": "^3.1.1" } } diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 212e03dc58b7..4b8cd795657d 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -58,13 +58,13 @@ }, "devDependencies": { "@typescript-eslint/parser": "8.29.0", - "@vitest/coverage-v8": "^3.0.9", + "@vitest/coverage-v8": "^3.1.1", "ajv": "^6.12.6", "downlevel-dts": "*", "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", - "vitest": "^3.0.9" + "vitest": "^3.1.1" }, "funding": { "type": "opencollective", diff --git a/packages/typescript-eslint/package.json b/packages/typescript-eslint/package.json index 651097c9063b..20ad9339be6f 100644 --- a/packages/typescript-eslint/package.json +++ b/packages/typescript-eslint/package.json @@ -62,12 +62,12 @@ "typescript": ">=4.8.4 <5.9.0" }, "devDependencies": { - "@vitest/coverage-v8": "^3.0.9", + "@vitest/coverage-v8": "^3.1.1", "downlevel-dts": "*", "prettier": "^3.2.5", "rimraf": "*", "typescript": "*", - "vitest": "^3.0.9" + "vitest": "^3.1.1" }, "funding": { "type": "opencollective", diff --git a/yarn.lock b/yarn.lock index 55e58b73064e..e5be3b6e8ea2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3048,6 +3048,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/aix-ppc64@npm:0.25.2" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/android-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-arm64@npm:0.20.2" @@ -3062,6 +3069,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/android-arm64@npm:0.25.2" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/android-arm@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-arm@npm:0.20.2" @@ -3076,6 +3090,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/android-arm@npm:0.25.2" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@esbuild/android-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-x64@npm:0.20.2" @@ -3090,6 +3111,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/android-x64@npm:0.25.2" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + "@esbuild/darwin-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/darwin-arm64@npm:0.20.2" @@ -3104,6 +3132,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/darwin-arm64@npm:0.25.2" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/darwin-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/darwin-x64@npm:0.20.2" @@ -3118,6 +3153,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/darwin-x64@npm:0.25.2" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@esbuild/freebsd-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/freebsd-arm64@npm:0.20.2" @@ -3132,6 +3174,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/freebsd-arm64@npm:0.25.2" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/freebsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/freebsd-x64@npm:0.20.2" @@ -3146,6 +3195,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/freebsd-x64@npm:0.25.2" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/linux-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-arm64@npm:0.20.2" @@ -3160,6 +3216,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-arm64@npm:0.25.2" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/linux-arm@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-arm@npm:0.20.2" @@ -3174,6 +3237,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-arm@npm:0.25.2" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "@esbuild/linux-ia32@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-ia32@npm:0.20.2" @@ -3188,6 +3258,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ia32@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-ia32@npm:0.25.2" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/linux-loong64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-loong64@npm:0.20.2" @@ -3202,6 +3279,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-loong64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-loong64@npm:0.25.2" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + "@esbuild/linux-mips64el@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-mips64el@npm:0.20.2" @@ -3216,6 +3300,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-mips64el@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-mips64el@npm:0.25.2" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + "@esbuild/linux-ppc64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-ppc64@npm:0.20.2" @@ -3230,6 +3321,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ppc64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-ppc64@npm:0.25.2" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/linux-riscv64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-riscv64@npm:0.20.2" @@ -3244,6 +3342,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-riscv64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-riscv64@npm:0.25.2" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + "@esbuild/linux-s390x@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-s390x@npm:0.20.2" @@ -3258,6 +3363,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-s390x@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-s390x@npm:0.25.2" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + "@esbuild/linux-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-x64@npm:0.20.2" @@ -3272,6 +3384,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/linux-x64@npm:0.25.2" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + "@esbuild/netbsd-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/netbsd-arm64@npm:0.25.0" @@ -3279,6 +3398,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/netbsd-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/netbsd-arm64@npm:0.25.2" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/netbsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/netbsd-x64@npm:0.20.2" @@ -3293,6 +3419,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/netbsd-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/netbsd-x64@npm:0.25.2" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/openbsd-arm64@npm:0.25.0": version: 0.25.0 resolution: "@esbuild/openbsd-arm64@npm:0.25.0" @@ -3300,6 +3433,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/openbsd-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/openbsd-arm64@npm:0.25.2" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/openbsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/openbsd-x64@npm:0.20.2" @@ -3314,6 +3454,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/openbsd-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/openbsd-x64@npm:0.25.2" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/sunos-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/sunos-x64@npm:0.20.2" @@ -3328,6 +3475,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/sunos-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/sunos-x64@npm:0.25.2" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + "@esbuild/win32-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-arm64@npm:0.20.2" @@ -3342,6 +3496,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-arm64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/win32-arm64@npm:0.25.2" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/win32-ia32@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-ia32@npm:0.20.2" @@ -3356,6 +3517,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-ia32@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/win32-ia32@npm:0.25.2" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/win32-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-x64@npm:0.20.2" @@ -3370,6 +3538,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-x64@npm:0.25.2": + version: 0.25.2 + resolution: "@esbuild/win32-x64@npm:0.25.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint-community/eslint-plugin-eslint-comments@npm:^4.4.1": version: 4.4.1 resolution: "@eslint-community/eslint-plugin-eslint-comments@npm:4.4.1" @@ -4528,142 +4703,142 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.37.0" +"@rollup/rollup-android-arm-eabi@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.39.0" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-android-arm64@npm:4.37.0" +"@rollup/rollup-android-arm64@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-android-arm64@npm:4.39.0" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-darwin-arm64@npm:4.37.0" +"@rollup/rollup-darwin-arm64@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-darwin-arm64@npm:4.39.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-darwin-x64@npm:4.37.0" +"@rollup/rollup-darwin-x64@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-darwin-x64@npm:4.39.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-freebsd-arm64@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-freebsd-arm64@npm:4.37.0" +"@rollup/rollup-freebsd-arm64@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.39.0" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-freebsd-x64@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-freebsd-x64@npm:4.37.0" +"@rollup/rollup-freebsd-x64@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-freebsd-x64@npm:4.39.0" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.37.0" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.39.0" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.37.0" +"@rollup/rollup-linux-arm-musleabihf@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.39.0" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.37.0" +"@rollup/rollup-linux-arm64-gnu@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.39.0" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.37.0" +"@rollup/rollup-linux-arm64-musl@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.39.0" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-loongarch64-gnu@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.37.0" +"@rollup/rollup-linux-loongarch64-gnu@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.39.0" conditions: os=linux & cpu=loong64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.37.0" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.39.0" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.37.0" +"@rollup/rollup-linux-riscv64-gnu@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.39.0" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-musl@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-riscv64-musl@npm:4.37.0" +"@rollup/rollup-linux-riscv64-musl@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-riscv64-musl@npm:4.39.0" conditions: os=linux & cpu=riscv64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.37.0" +"@rollup/rollup-linux-s390x-gnu@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.39.0" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.37.0" +"@rollup/rollup-linux-x64-gnu@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.39.0" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.37.0" +"@rollup/rollup-linux-x64-musl@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.39.0" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.37.0" +"@rollup/rollup-win32-arm64-msvc@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.39.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.37.0" +"@rollup/rollup-win32-ia32-msvc@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.39.0" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.37.0": - version: 4.37.0 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.37.0" +"@rollup/rollup-win32-x64-msvc@npm:4.39.0": + version: 4.39.0 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.39.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -5888,10 +6063,10 @@ __metadata: "@typescript-eslint/scope-manager": "workspace:*" "@typescript-eslint/type-utils": "workspace:*" "@typescript-eslint/utils": "workspace:*" - "@vitest/coverage-v8": ^3.0.9 + "@vitest/coverage-v8": ^3.1.1 prettier: ^3.2.5 rimraf: "*" - vitest: ^3.0.9 + vitest: ^3.1.1 languageName: unknown linkType: soft @@ -6037,7 +6212,7 @@ __metadata: "@typescript-eslint/parser": 8.29.0 "@typescript-eslint/typescript-estree": 8.29.0 "@typescript-eslint/utils": 8.29.0 - "@vitest/coverage-v8": ^3.0.9 + "@vitest/coverage-v8": ^3.1.1 ajv: ^6.12.6 debug: ^4.3.4 downlevel-dts: "*" @@ -6045,7 +6220,7 @@ __metadata: rimraf: "*" ts-api-utils: ^2.0.1 typescript: "*" - vitest: ^3.0.9 + vitest: ^3.1.1 peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" @@ -6106,7 +6281,7 @@ __metadata: "@typescript-eslint/types": "workspace:^" "@typescript-eslint/typescript-estree": "workspace:^" "@typescript-eslint/utils": "workspace:^" - "@vitest/coverage-v8": ^3.0.9 + "@vitest/coverage-v8": ^3.1.1 "@vitest/eslint-plugin": ^1.1.38 console-fail-test: ^0.5.0 cross-fetch: ^4.0.0 @@ -6143,8 +6318,8 @@ __metadata: tsx: "*" typescript: ">=4.8.4 <5.9.0" typescript-eslint: "workspace:^" - vite: ^6.2.3 - vitest: ^3.0.9 + vite: ^6.2.4 + vitest: ^3.1.1 yargs: 17.7.2 languageName: unknown linkType: soft @@ -6245,9 +6420,9 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-v8@npm:^3.0.9": - version: 3.0.9 - resolution: "@vitest/coverage-v8@npm:3.0.9" +"@vitest/coverage-v8@npm:^3.1.1": + version: 3.1.1 + resolution: "@vitest/coverage-v8@npm:3.1.1" dependencies: "@ampproject/remapping": ^2.3.0 "@bcoe/v8-coverage": ^1.0.2 @@ -6262,18 +6437,18 @@ __metadata: test-exclude: ^7.0.1 tinyrainbow: ^2.0.0 peerDependencies: - "@vitest/browser": 3.0.9 - vitest: 3.0.9 + "@vitest/browser": 3.1.1 + vitest: 3.1.1 peerDependenciesMeta: "@vitest/browser": optional: true - checksum: cb6d05fb696356e5dbc7a8bb136e285c34501fe0991904e69f42df5a45c114488d80e27175dc607b934547afb2255c4444efe0f789883082c50d770d2d4ffd92 + checksum: 5f55207c0f3ccf66cb56267643fffdce06bece64eb7f777c49257094c82371fb087e83976821f1c234dc796bc396dd89a3e26c59ad1534dcc639c39caa116532 languageName: node linkType: hard "@vitest/eslint-plugin@npm:^1.1.38": - version: 1.1.38 - resolution: "@vitest/eslint-plugin@npm:1.1.38" + version: 1.1.39 + resolution: "@vitest/eslint-plugin@npm:1.1.39" peerDependencies: "@typescript-eslint/utils": ^8.24.0 eslint: ">= 8.57.0" @@ -6284,27 +6459,27 @@ __metadata: optional: true vitest: optional: true - checksum: 139b3f3f6fbb4e3ef92a5228f6e73b881228351f0ff32fe0d1c3e63a0d3548eb8927c15ab41053dd18b642c111b291f9333b3db097a188af659ee7aa11993dd0 + checksum: 0730c7d2a24b6e72ad74478991f7426fe889d0a326f4dc5034db5bfb1fcedeb1f54f8d90d61587e66c447139fa5c72af07003d740753860de82a9b0565bd14aa languageName: node linkType: hard -"@vitest/expect@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/expect@npm:3.0.9" +"@vitest/expect@npm:3.1.1": + version: 3.1.1 + resolution: "@vitest/expect@npm:3.1.1" dependencies: - "@vitest/spy": 3.0.9 - "@vitest/utils": 3.0.9 + "@vitest/spy": 3.1.1 + "@vitest/utils": 3.1.1 chai: ^5.2.0 tinyrainbow: ^2.0.0 - checksum: 6df325d45e0ad4b6ad73a55e5328f615f92171fc4dbf3875972c08013727cfa435b9916636c7f3902a45f1874db10805d449311b70125edf1422dceb325ac982 + checksum: a345dbdf60470853fc7641268bea2721ab6c117c77b2195fce74aab187284fedf81e7d1d2292336184804993139734169ee8a7af2ac8e7d67f3f8b5b89797f77 languageName: node linkType: hard -"@vitest/mocker@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/mocker@npm:3.0.9" +"@vitest/mocker@npm:3.1.1": + version: 3.1.1 + resolution: "@vitest/mocker@npm:3.1.1" dependencies: - "@vitest/spy": 3.0.9 + "@vitest/spy": 3.1.1 estree-walker: ^3.0.3 magic-string: ^0.30.17 peerDependencies: @@ -6315,57 +6490,57 @@ __metadata: optional: true vite: optional: true - checksum: e8e8fb8eb938316a8444160859a0c1413488fa3f347b3f80597e3e4fc695597132c9f5f55280b4c35bf4dc3b13fc968b38c804d62f1effbfd49c147d05f73643 + checksum: a97f5b730360a13e9b6da99c110928eff9c87fe853f18578826025485dc89a42c6870d3c11c30bbe07cac40d45163d3d1b21fc7ed85035dc782b8ecbe4264b96 languageName: node linkType: hard -"@vitest/pretty-format@npm:3.0.9, @vitest/pretty-format@npm:^3.0.9": - version: 3.0.9 - resolution: "@vitest/pretty-format@npm:3.0.9" +"@vitest/pretty-format@npm:3.1.1, @vitest/pretty-format@npm:^3.1.1": + version: 3.1.1 + resolution: "@vitest/pretty-format@npm:3.1.1" dependencies: tinyrainbow: ^2.0.0 - checksum: 447b53bd962bc5978cf3e8c67f0600e38470ea63ab6ae24fb048dca79305828f37d9d854a7db1abc97ebde66a65187f87a99ca7969e43c750998c944e3ec48c6 + checksum: 9f036086bf46b65fb062a6e9f796b17dd64f81eeb237ea141f3bcda413bc71a1f17546cd9def4ee75ea0c47f1120a083b048e65cf877ab114a4355105f64e14d languageName: node linkType: hard -"@vitest/runner@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/runner@npm:3.0.9" +"@vitest/runner@npm:3.1.1": + version: 3.1.1 + resolution: "@vitest/runner@npm:3.1.1" dependencies: - "@vitest/utils": 3.0.9 + "@vitest/utils": 3.1.1 pathe: ^2.0.3 - checksum: fd3efa42a75aaa4eb370b9bf084a311f4b485786411e6dfecf28da70e05b1621f595510e4414f2d4ef1e7bf1a7400e2f6a9e17ca786f2f4842775339e606410d + checksum: 9d05418116bd8a40415c17fa4a90c5f852b0ab0fe8403655fcaef6d6a8943d511f8e948f775a0c5e49b767c0aaa2372aea44bb0f62c68791e035717638097129 languageName: node linkType: hard -"@vitest/snapshot@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/snapshot@npm:3.0.9" +"@vitest/snapshot@npm:3.1.1": + version: 3.1.1 + resolution: "@vitest/snapshot@npm:3.1.1" dependencies: - "@vitest/pretty-format": 3.0.9 + "@vitest/pretty-format": 3.1.1 magic-string: ^0.30.17 pathe: ^2.0.3 - checksum: 79c42c6b10f972ddcf9ab1f32f8e181fe54a2b253df2d7f09f1bd4162b976093442cbdcc8ae58046768b52c65cf3a49aa8694d5505d19c49b253c0d8089cd31d + checksum: 00079c18e21c7271a6b27198f6604645ec5e4cda8f86716ee658a0993d1baaa47ac0064a92ed0a61a29c27a7f2877f3fa6e11a90d3d597c119623732ecaf1f7b languageName: node linkType: hard -"@vitest/spy@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/spy@npm:3.0.9" +"@vitest/spy@npm:3.1.1": + version: 3.1.1 + resolution: "@vitest/spy@npm:3.1.1" dependencies: tinyspy: ^3.0.2 - checksum: 1b90f40c4ac34529e7d098c745396a51e9b2f187d31d50a664ac7374db56edb3792862a35d1b8049e421705db6445761d687f9f8c5e298a9ca6cfa47d55625d7 + checksum: 7ab13a9fed9fa41a2eee2d098c5026938f7899f41bd1a5ae8db6bd3ed2d3fc4ac6d9142e5028391d5d36c54f989c15450ea89d1fb326bc7fcce590cefd290a41 languageName: node linkType: hard -"@vitest/utils@npm:3.0.9": - version: 3.0.9 - resolution: "@vitest/utils@npm:3.0.9" +"@vitest/utils@npm:3.1.1": + version: 3.1.1 + resolution: "@vitest/utils@npm:3.1.1" dependencies: - "@vitest/pretty-format": 3.0.9 + "@vitest/pretty-format": 3.1.1 loupe: ^3.1.3 tinyrainbow: ^2.0.0 - checksum: d31797594598817670cc49dfcd4ded2953d707c62e5dc7807737e8108073e97499cf7ef2eb3295f1fb52446a8a85ba50aacef21126689251092bc8566bff4bb6 + checksum: 6d93b0876b1c708b3b9f5a1203ab3838811798ee1f989e5b06a1de3aca2c61493075a1a44de220c77ddf914b9f0888845612c9a8175d965b98715196fc169ebe languageName: node linkType: hard @@ -9843,35 +10018,35 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.25.0, esbuild@npm:~0.25.0": - version: 0.25.0 - resolution: "esbuild@npm:0.25.0" - dependencies: - "@esbuild/aix-ppc64": 0.25.0 - "@esbuild/android-arm": 0.25.0 - "@esbuild/android-arm64": 0.25.0 - "@esbuild/android-x64": 0.25.0 - "@esbuild/darwin-arm64": 0.25.0 - "@esbuild/darwin-x64": 0.25.0 - "@esbuild/freebsd-arm64": 0.25.0 - "@esbuild/freebsd-x64": 0.25.0 - "@esbuild/linux-arm": 0.25.0 - "@esbuild/linux-arm64": 0.25.0 - "@esbuild/linux-ia32": 0.25.0 - "@esbuild/linux-loong64": 0.25.0 - "@esbuild/linux-mips64el": 0.25.0 - "@esbuild/linux-ppc64": 0.25.0 - "@esbuild/linux-riscv64": 0.25.0 - "@esbuild/linux-s390x": 0.25.0 - "@esbuild/linux-x64": 0.25.0 - "@esbuild/netbsd-arm64": 0.25.0 - "@esbuild/netbsd-x64": 0.25.0 - "@esbuild/openbsd-arm64": 0.25.0 - "@esbuild/openbsd-x64": 0.25.0 - "@esbuild/sunos-x64": 0.25.0 - "@esbuild/win32-arm64": 0.25.0 - "@esbuild/win32-ia32": 0.25.0 - "@esbuild/win32-x64": 0.25.0 +"esbuild@npm:^0.25.0": + version: 0.25.2 + resolution: "esbuild@npm:0.25.2" + dependencies: + "@esbuild/aix-ppc64": 0.25.2 + "@esbuild/android-arm": 0.25.2 + "@esbuild/android-arm64": 0.25.2 + "@esbuild/android-x64": 0.25.2 + "@esbuild/darwin-arm64": 0.25.2 + "@esbuild/darwin-x64": 0.25.2 + "@esbuild/freebsd-arm64": 0.25.2 + "@esbuild/freebsd-x64": 0.25.2 + "@esbuild/linux-arm": 0.25.2 + "@esbuild/linux-arm64": 0.25.2 + "@esbuild/linux-ia32": 0.25.2 + "@esbuild/linux-loong64": 0.25.2 + "@esbuild/linux-mips64el": 0.25.2 + "@esbuild/linux-ppc64": 0.25.2 + "@esbuild/linux-riscv64": 0.25.2 + "@esbuild/linux-s390x": 0.25.2 + "@esbuild/linux-x64": 0.25.2 + "@esbuild/netbsd-arm64": 0.25.2 + "@esbuild/netbsd-x64": 0.25.2 + "@esbuild/openbsd-arm64": 0.25.2 + "@esbuild/openbsd-x64": 0.25.2 + "@esbuild/sunos-x64": 0.25.2 + "@esbuild/win32-arm64": 0.25.2 + "@esbuild/win32-ia32": 0.25.2 + "@esbuild/win32-x64": 0.25.2 dependenciesMeta: "@esbuild/aix-ppc64": optional: true @@ -9925,7 +10100,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: 4d1e0cb7c059a373ea3edb20ca5efcea29efada03e4ea82b2b8ab1f2f062e4791e9744213308775d26e07a0225a7d8250da93da5c8e07ef61bb93d58caab8cf9 + checksum: 2c4e91948b939e711e9342e692fc3c8b0a95acbc1fc9c7628db6092c4aef7c32aa643b2782111625871756084536cebc4831b3f1d5c3b6bd4e4774e21bc4bbea languageName: node linkType: hard @@ -10009,6 +10184,92 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.25.0": + version: 0.25.0 + resolution: "esbuild@npm:0.25.0" + dependencies: + "@esbuild/aix-ppc64": 0.25.0 + "@esbuild/android-arm": 0.25.0 + "@esbuild/android-arm64": 0.25.0 + "@esbuild/android-x64": 0.25.0 + "@esbuild/darwin-arm64": 0.25.0 + "@esbuild/darwin-x64": 0.25.0 + "@esbuild/freebsd-arm64": 0.25.0 + "@esbuild/freebsd-x64": 0.25.0 + "@esbuild/linux-arm": 0.25.0 + "@esbuild/linux-arm64": 0.25.0 + "@esbuild/linux-ia32": 0.25.0 + "@esbuild/linux-loong64": 0.25.0 + "@esbuild/linux-mips64el": 0.25.0 + "@esbuild/linux-ppc64": 0.25.0 + "@esbuild/linux-riscv64": 0.25.0 + "@esbuild/linux-s390x": 0.25.0 + "@esbuild/linux-x64": 0.25.0 + "@esbuild/netbsd-arm64": 0.25.0 + "@esbuild/netbsd-x64": 0.25.0 + "@esbuild/openbsd-arm64": 0.25.0 + "@esbuild/openbsd-x64": 0.25.0 + "@esbuild/sunos-x64": 0.25.0 + "@esbuild/win32-arm64": 0.25.0 + "@esbuild/win32-ia32": 0.25.0 + "@esbuild/win32-x64": 0.25.0 + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 4d1e0cb7c059a373ea3edb20ca5efcea29efada03e4ea82b2b8ab1f2f062e4791e9744213308775d26e07a0225a7d8250da93da5c8e07ef61bb93d58caab8cf9 + languageName: node + linkType: hard + "escalade@npm:^3.1.1, escalade@npm:^3.2.0": version: 3.2.0 resolution: "escalade@npm:3.2.0" @@ -10622,10 +10883,10 @@ __metadata: languageName: node linkType: hard -"expect-type@npm:^1.1.0": - version: 1.2.0 - resolution: "expect-type@npm:1.2.0" - checksum: fb6cce8e0d8cd2d2b329afeacad08dbf01297b0363494a826cb3dad7d22d45e5283a1c2c3f8cdef5765afefab4676a7cb9a46c9c5a506fdd1ee255e429debe96 +"expect-type@npm:^1.2.0": + version: 1.2.1 + resolution: "expect-type@npm:1.2.1" + checksum: 4fc41ff0c784cb8984ab7801326251d3178083661f0ad08bbd3e5ca789293e6b66d5082f0cef83ebf9849c85d0280a19df5e4e2c57999a2464db9a01c7e3344f languageName: node linkType: hard @@ -18221,30 +18482,30 @@ __metadata: linkType: hard "rollup@npm:^4.30.1": - version: 4.37.0 - resolution: "rollup@npm:4.37.0" - dependencies: - "@rollup/rollup-android-arm-eabi": 4.37.0 - "@rollup/rollup-android-arm64": 4.37.0 - "@rollup/rollup-darwin-arm64": 4.37.0 - "@rollup/rollup-darwin-x64": 4.37.0 - "@rollup/rollup-freebsd-arm64": 4.37.0 - "@rollup/rollup-freebsd-x64": 4.37.0 - "@rollup/rollup-linux-arm-gnueabihf": 4.37.0 - "@rollup/rollup-linux-arm-musleabihf": 4.37.0 - "@rollup/rollup-linux-arm64-gnu": 4.37.0 - "@rollup/rollup-linux-arm64-musl": 4.37.0 - "@rollup/rollup-linux-loongarch64-gnu": 4.37.0 - "@rollup/rollup-linux-powerpc64le-gnu": 4.37.0 - "@rollup/rollup-linux-riscv64-gnu": 4.37.0 - "@rollup/rollup-linux-riscv64-musl": 4.37.0 - "@rollup/rollup-linux-s390x-gnu": 4.37.0 - "@rollup/rollup-linux-x64-gnu": 4.37.0 - "@rollup/rollup-linux-x64-musl": 4.37.0 - "@rollup/rollup-win32-arm64-msvc": 4.37.0 - "@rollup/rollup-win32-ia32-msvc": 4.37.0 - "@rollup/rollup-win32-x64-msvc": 4.37.0 - "@types/estree": 1.0.6 + version: 4.39.0 + resolution: "rollup@npm:4.39.0" + dependencies: + "@rollup/rollup-android-arm-eabi": 4.39.0 + "@rollup/rollup-android-arm64": 4.39.0 + "@rollup/rollup-darwin-arm64": 4.39.0 + "@rollup/rollup-darwin-x64": 4.39.0 + "@rollup/rollup-freebsd-arm64": 4.39.0 + "@rollup/rollup-freebsd-x64": 4.39.0 + "@rollup/rollup-linux-arm-gnueabihf": 4.39.0 + "@rollup/rollup-linux-arm-musleabihf": 4.39.0 + "@rollup/rollup-linux-arm64-gnu": 4.39.0 + "@rollup/rollup-linux-arm64-musl": 4.39.0 + "@rollup/rollup-linux-loongarch64-gnu": 4.39.0 + "@rollup/rollup-linux-powerpc64le-gnu": 4.39.0 + "@rollup/rollup-linux-riscv64-gnu": 4.39.0 + "@rollup/rollup-linux-riscv64-musl": 4.39.0 + "@rollup/rollup-linux-s390x-gnu": 4.39.0 + "@rollup/rollup-linux-x64-gnu": 4.39.0 + "@rollup/rollup-linux-x64-musl": 4.39.0 + "@rollup/rollup-win32-arm64-msvc": 4.39.0 + "@rollup/rollup-win32-ia32-msvc": 4.39.0 + "@rollup/rollup-win32-x64-msvc": 4.39.0 + "@types/estree": 1.0.7 fsevents: ~2.3.2 dependenciesMeta: "@rollup/rollup-android-arm-eabi": @@ -18291,7 +18552,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: bb6c82ab5a12750e7dd521651f7bb7f44e4c03f058f38995f65141d4032b53a9f4b14d777af1bec6f00cdbbd1cf856581b516d803c9c5ecaede0b77501239673 + checksum: e5205be3107221bc0de467c6f9d2cc4bef18019f5111fa84f24dd640cb1c82c0c46a5f51c052df956fe24bd6a1e34398fb5abe08470f94d29aa7ad08208115e9 languageName: node linkType: hard @@ -19169,13 +19430,6 @@ __metadata: languageName: node linkType: hard -"std-env@npm:^3.8.0": - version: 3.8.1 - resolution: "std-env@npm:3.8.1" - checksum: 20114a5270aa2a3fc50d897461c6ab73329cf2d3c6bff1c124bb969577493aeebda8ee1916588b2657afcee9881bc652437cfdec6360e3f30be36c8675ea0cbb - languageName: node - linkType: hard - "std-env@npm:^3.8.1": version: 3.9.0 resolution: "std-env@npm:3.9.0" @@ -20187,12 +20441,12 @@ __metadata: "@typescript-eslint/eslint-plugin": 8.29.0 "@typescript-eslint/parser": 8.29.0 "@typescript-eslint/utils": 8.29.0 - "@vitest/coverage-v8": ^3.0.9 + "@vitest/coverage-v8": ^3.1.1 downlevel-dts: "*" prettier: ^3.2.5 rimraf: "*" typescript: "*" - vitest: ^3.0.9 + vitest: ^3.1.1 peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" @@ -20626,9 +20880,9 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:3.0.9": - version: 3.0.9 - resolution: "vite-node@npm:3.0.9" +"vite-node@npm:3.1.1": + version: 3.1.1 + resolution: "vite-node@npm:3.1.1" dependencies: cac: ^6.7.14 debug: ^4.4.0 @@ -20637,13 +20891,13 @@ __metadata: vite: ^5.0.0 || ^6.0.0 bin: vite-node: vite-node.mjs - checksum: 6a40628da3d3098aa10404106b12b77327301260f3979dacce0d579a6ee09258982ee81183118f13c0703c0a0cf77118ae56a29354a4bed79565d35d1187d42d + checksum: 34f214413cdbdf77bd2ff786934fa6c3e7c6628cfae6e6aba92fc7c0438ad0642166e43077954216b7737aed9de5dec4b6a916dea0384b791e1521e242dd2d56 languageName: node linkType: hard -"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.3": - version: 6.2.3 - resolution: "vite@npm:6.2.3" +"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.4": + version: 6.2.5 + resolution: "vite@npm:6.2.5" dependencies: esbuild: ^0.25.0 fsevents: ~2.3.3 @@ -20689,40 +20943,40 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 5ce6c0ce9fd3591e1eb21ffaac9b1395cbd03926399cdb0f2a333c08fd9cab17da47d5203b88b574675c4a6ad5a77dd4a88ad51ea400ad6d75d993d5f05c8b64 + checksum: 49a6529c5ae8d6e4926f2daa51d7e20c50d780d8d2ec8c08605e966983fe8d17ec69bc36a356c1a21141c5a630b7a4109f3690c5b33f579d3e2bf26f914a149d languageName: node linkType: hard -"vitest@npm:^3.0.9": - version: 3.0.9 - resolution: "vitest@npm:3.0.9" - dependencies: - "@vitest/expect": 3.0.9 - "@vitest/mocker": 3.0.9 - "@vitest/pretty-format": ^3.0.9 - "@vitest/runner": 3.0.9 - "@vitest/snapshot": 3.0.9 - "@vitest/spy": 3.0.9 - "@vitest/utils": 3.0.9 +"vitest@npm:^3.1.1": + version: 3.1.1 + resolution: "vitest@npm:3.1.1" + dependencies: + "@vitest/expect": 3.1.1 + "@vitest/mocker": 3.1.1 + "@vitest/pretty-format": ^3.1.1 + "@vitest/runner": 3.1.1 + "@vitest/snapshot": 3.1.1 + "@vitest/spy": 3.1.1 + "@vitest/utils": 3.1.1 chai: ^5.2.0 debug: ^4.4.0 - expect-type: ^1.1.0 + expect-type: ^1.2.0 magic-string: ^0.30.17 pathe: ^2.0.3 - std-env: ^3.8.0 + std-env: ^3.8.1 tinybench: ^2.9.0 tinyexec: ^0.3.2 tinypool: ^1.0.2 tinyrainbow: ^2.0.0 vite: ^5.0.0 || ^6.0.0 - vite-node: 3.0.9 + vite-node: 3.1.1 why-is-node-running: ^2.3.0 peerDependencies: "@edge-runtime/vm": "*" "@types/debug": ^4.1.12 "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 - "@vitest/browser": 3.0.9 - "@vitest/ui": 3.0.9 + "@vitest/browser": 3.1.1 + "@vitest/ui": 3.1.1 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -20742,7 +20996,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: f8ec160cf8f75e4344dfa8f330e2cac6a49635977319a04c36803ccec1b69918381e435cb9d01edafab293648c65e9b766bba71fdf3451cb927590be263687f9 + checksum: 817198380f249388bebc64cdae27e64d04570bc6ca98c13b3518059a655ebf94f413e17bbe5d71bfc2ca444e9ab93d0b39e9da4f455a51600fd92d4fa6c50664 languageName: node linkType: hard From 4dd2332d6bfbc54d9256c2242163c21bc7b9fd6d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Wed, 2 Apr 2025 11:46:40 -0500 Subject: [PATCH 17/33] Update `@vitest/eslint-plugin` to version 1.1.39 --- package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e0da784ef01b..061e0233531f 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@typescript-eslint/typescript-estree": "workspace:^", "@typescript-eslint/utils": "workspace:^", "@vitest/coverage-v8": "^3.1.1", - "@vitest/eslint-plugin": "^1.1.38", + "@vitest/eslint-plugin": "^1.1.39", "console-fail-test": "^0.5.0", "cross-fetch": "^4.0.0", "cspell": "^8.15.2", diff --git a/yarn.lock b/yarn.lock index e5be3b6e8ea2..b864667f0e48 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6282,7 +6282,7 @@ __metadata: "@typescript-eslint/typescript-estree": "workspace:^" "@typescript-eslint/utils": "workspace:^" "@vitest/coverage-v8": ^3.1.1 - "@vitest/eslint-plugin": ^1.1.38 + "@vitest/eslint-plugin": ^1.1.39 console-fail-test: ^0.5.0 cross-fetch: ^4.0.0 cspell: ^8.15.2 @@ -6446,7 +6446,7 @@ __metadata: languageName: node linkType: hard -"@vitest/eslint-plugin@npm:^1.1.38": +"@vitest/eslint-plugin@npm:^1.1.39": version: 1.1.39 resolution: "@vitest/eslint-plugin@npm:1.1.39" peerDependencies: From ed9a35f04da6aebd41fef0aba3d7edb41019b7d3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 3 Apr 2025 00:10:27 -0500 Subject: [PATCH 18/33] Fix `knip` config --- knip.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/knip.ts b/knip.ts index 594dc6e49d92..140c1485e885 100644 --- a/knip.ts +++ b/knip.ts @@ -11,9 +11,14 @@ export default { types: 'off', unresolved: 'off', }, + + vite: false, + vitest: { - config: ['vitest.config.mts', 'packages/*/vitest.config.mts'], + config: ['vitest.config.mts'], + entry: ['tests/**/*.{bench,test,test-d}.?(c|m)ts?(x)'], }, + workspaces: { '.': { entry: ['tools/release/changelog-renderer.js', 'tools/scripts/**/*.mts'], From 777707ecdd321629dc3ce4216bf04f469a397537 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 3 Apr 2025 06:06:34 -0500 Subject: [PATCH 19/33] Update `vite` to version 6.2.5 --- package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 061e0233531f..10b2c4fc30d9 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "tsx": "*", "typescript": ">=4.8.4 <5.9.0", "typescript-eslint": "workspace:^", - "vite": "^6.2.4", + "vite": "^6.2.5", "vitest": "^3.1.1", "yargs": "17.7.2" }, diff --git a/yarn.lock b/yarn.lock index b864667f0e48..7cf758e23c4d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6318,7 +6318,7 @@ __metadata: tsx: "*" typescript: ">=4.8.4 <5.9.0" typescript-eslint: "workspace:^" - vite: ^6.2.4 + vite: ^6.2.5 vitest: ^3.1.1 yargs: 17.7.2 languageName: unknown @@ -20895,7 +20895,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.4": +"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.5": version: 6.2.5 resolution: "vite@npm:6.2.5" dependencies: From 99133cdd51678d57fae0d7cc443c13fea0df2e3f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 10 Apr 2025 09:13:03 -0500 Subject: [PATCH 20/33] Update `vite` to version 6.2.6 --- package.json | 2 +- yarn.lock | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 10b2c4fc30d9..f964215b5f89 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "tsx": "*", "typescript": ">=4.8.4 <5.9.0", "typescript-eslint": "workspace:^", - "vite": "^6.2.5", + "vite": "^6.2.6", "vitest": "^3.1.1", "yargs": "17.7.2" }, diff --git a/yarn.lock b/yarn.lock index 54bc28d7364d..57a027fca713 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6318,7 +6318,7 @@ __metadata: tsx: "*" typescript: ">=4.8.4 <5.9.0" typescript-eslint: "workspace:^" - vite: ^6.2.5 + vite: ^6.2.6 vitest: ^3.1.1 yargs: 17.7.2 languageName: unknown @@ -6447,10 +6447,9 @@ __metadata: linkType: hard "@vitest/eslint-plugin@npm:^1.1.39": - version: 1.1.39 - resolution: "@vitest/eslint-plugin@npm:1.1.39" + version: 1.1.40 + resolution: "@vitest/eslint-plugin@npm:1.1.40" peerDependencies: - "@typescript-eslint/utils": ^8.24.0 eslint: ">= 8.57.0" typescript: ">= 5.0.0" vitest: "*" @@ -6459,7 +6458,7 @@ __metadata: optional: true vitest: optional: true - checksum: 0730c7d2a24b6e72ad74478991f7426fe889d0a326f4dc5034db5bfb1fcedeb1f54f8d90d61587e66c447139fa5c72af07003d740753860de82a9b0565bd14aa + checksum: bb8c4d7654945890f666be6ef0ebd8c21b6f896416099655bfd286ad0d388b6e5b83e11a9cdd044daeb11dac1bc1ee03d41db02db27426a8cedfdd33a6675645 languageName: node linkType: hard @@ -20895,9 +20894,9 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.5": - version: 6.2.5 - resolution: "vite@npm:6.2.5" +"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.2.6": + version: 6.2.6 + resolution: "vite@npm:6.2.6" dependencies: esbuild: ^0.25.0 fsevents: ~2.3.3 @@ -20943,7 +20942,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 49a6529c5ae8d6e4926f2daa51d7e20c50d780d8d2ec8c08605e966983fe8d17ec69bc36a356c1a21141c5a630b7a4109f3690c5b33f579d3e2bf26f914a149d + checksum: ddeb36d29c053c6d6f0e70eb01939848db611135878d85e9497fc4b899667f58ce35ea4014acf01342ee1cf115879280fac809c0a806ad6432833cde87fe90dc languageName: node linkType: hard From e71694db23a3249128c7ab678415606296b533f8 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 10 Apr 2025 09:20:46 -0500 Subject: [PATCH 21/33] Update `@vitest/eslint-plugin` to version 1.1.40 --- package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f964215b5f89..4bcaff55bf93 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@typescript-eslint/typescript-estree": "workspace:^", "@typescript-eslint/utils": "workspace:^", "@vitest/coverage-v8": "^3.1.1", - "@vitest/eslint-plugin": "^1.1.39", + "@vitest/eslint-plugin": "^1.1.40", "console-fail-test": "^0.5.0", "cross-fetch": "^4.0.0", "cspell": "^8.15.2", diff --git a/yarn.lock b/yarn.lock index 57a027fca713..dbfcd81cac9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6282,7 +6282,7 @@ __metadata: "@typescript-eslint/typescript-estree": "workspace:^" "@typescript-eslint/utils": "workspace:^" "@vitest/coverage-v8": ^3.1.1 - "@vitest/eslint-plugin": ^1.1.39 + "@vitest/eslint-plugin": ^1.1.40 console-fail-test: ^0.5.0 cross-fetch: ^4.0.0 cspell: ^8.15.2 @@ -6446,7 +6446,7 @@ __metadata: languageName: node linkType: hard -"@vitest/eslint-plugin@npm:^1.1.39": +"@vitest/eslint-plugin@npm:^1.1.40": version: 1.1.40 resolution: "@vitest/eslint-plugin@npm:1.1.40" peerDependencies: From d938588fa2294d8e64e78c01391f32099387bff3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 10 Apr 2025 19:22:40 -0500 Subject: [PATCH 22/33] Update `@vitest/eslint-plugin` to version 1.1.42 --- package.json | 2 +- yarn.lock | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 48b8bfbf4e68..b41ff68c1177 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@typescript-eslint/typescript-estree": "workspace:^", "@typescript-eslint/utils": "workspace:^", "@vitest/coverage-v8": "^3.1.1", - "@vitest/eslint-plugin": "^1.1.40", + "@vitest/eslint-plugin": "^1.1.42", "console-fail-test": "^0.5.0", "cross-fetch": "^4.0.0", "cspell": "^8.15.2", diff --git a/yarn.lock b/yarn.lock index 5b2de442a7bb..a4950b81e933 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6282,7 +6282,7 @@ __metadata: "@typescript-eslint/typescript-estree": "workspace:^" "@typescript-eslint/utils": "workspace:^" "@vitest/coverage-v8": ^3.1.1 - "@vitest/eslint-plugin": ^1.1.40 + "@vitest/eslint-plugin": ^1.1.42 console-fail-test: ^0.5.0 cross-fetch: ^4.0.0 cspell: ^8.15.2 @@ -6446,19 +6446,18 @@ __metadata: languageName: node linkType: hard -"@vitest/eslint-plugin@npm:^1.1.40": - version: 1.1.40 - resolution: "@vitest/eslint-plugin@npm:1.1.40" +"@vitest/eslint-plugin@npm:^1.1.42": + version: 1.1.42 + resolution: "@vitest/eslint-plugin@npm:1.1.42" peerDependencies: + "@typescript-eslint/utils": ">= 8.24.0" eslint: ">= 8.57.0" typescript: ">= 5.0.0" vitest: "*" peerDependenciesMeta: typescript: optional: true - vitest: - optional: true - checksum: bb8c4d7654945890f666be6ef0ebd8c21b6f896416099655bfd286ad0d388b6e5b83e11a9cdd044daeb11dac1bc1ee03d41db02db27426a8cedfdd33a6675645 + checksum: 0b78745fde3cd6c35ce2cecd097133a41ff0c3787f9827538be1196e54b22d41a63c8ce2ac4571f29132399e96d6cf5ee47dcaf8a8f618bed8de80ad86851046 languageName: node linkType: hard From b27008479cfb6c5126e20cf0e45f830a6aa6ebf3 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 10 Apr 2025 20:27:20 -0500 Subject: [PATCH 23/33] Enable the new `vitest/prefer-describe-function-title` rule --- eslint.config.mjs | 1 + packages/type-utils/tests/discriminateAnyType.test.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 59ba2c20cfd6..f7beef6a7203 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -441,6 +441,7 @@ export default tseslint.config( 'vitest/no-identical-title': 'error', 'vitest/no-test-prefixes': 'error', 'vitest/no-test-return-statement': 'error', + 'vitest/prefer-describe-function-title': 'error', 'vitest/prefer-each': 'error', 'vitest/prefer-spy-on': 'error', 'vitest/prefer-to-be': 'error', diff --git a/packages/type-utils/tests/discriminateAnyType.test.ts b/packages/type-utils/tests/discriminateAnyType.test.ts index 67a84298b057..bcadb32b7f81 100644 --- a/packages/type-utils/tests/discriminateAnyType.test.ts +++ b/packages/type-utils/tests/discriminateAnyType.test.ts @@ -8,7 +8,7 @@ import { expectToHaveParserServices } from './test-utils/expectToHaveParserServi type GetNode = (ast: TSESTree.Program) => TSESTree.Node; -describe('discriminateAnyType', () => { +describe(discriminateAnyType, () => { const rootDir = path.join(__dirname, 'fixtures'); function getDeclarationId(ast: TSESTree.Program): TSESTree.Node { From 14f14e265af8db3855e78393a453c708057a701f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 11 Apr 2025 00:47:14 -0500 Subject: [PATCH 24/33] Use `vitestPlugin.configs.env` --- eslint.config.mjs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index f7beef6a7203..f01204377f39 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -380,11 +380,7 @@ export default tseslint.config( // define the vitest globals for all test files { files: vitestFiles, - languageOptions: { - globals: { - ...vitestPlugin.environments.env.globals, - }, - }, + ...vitestPlugin.configs.env, }, // test file specific configuration { From 60b6c6055e2309aa8ea290084a0fcb8eee4f879c Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 11 Apr 2025 17:36:33 -0500 Subject: [PATCH 25/33] Run `ast-spec:typecheck` during `postinstall` --- tools/scripts/postinstall.mts | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/scripts/postinstall.mts b/tools/scripts/postinstall.mts index ba5dbc9d809e..5d123b1991d5 100644 --- a/tools/scripts/postinstall.mts +++ b/tools/scripts/postinstall.mts @@ -44,5 +44,6 @@ void (async function (): Promise { // Build all the packages ready for use await $`yarn build`; + await $`yarn nx typecheck ast-spec`; } })(); From bddd2bea4215b93f435f4f452c709fb46e8c928f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 11 Apr 2025 17:36:47 -0500 Subject: [PATCH 26/33] Fix `ast-spec:test` --- packages/ast-spec/project.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/ast-spec/project.json b/packages/ast-spec/project.json index bb045ad1f6be..fcd5321b19f3 100644 --- a/packages/ast-spec/project.json +++ b/packages/ast-spec/project.json @@ -16,6 +16,9 @@ "executor": "@nx/eslint:lint", "outputs": ["{options.outputFile}"] }, + "test": { + "dependsOn": ["typecheck"] + }, "typecheck": { "dependsOn": ["typescript-estree:build"] } From d57f66bc79d38d96643db259cd598610ff26df35 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 11 Apr 2025 18:23:39 -0500 Subject: [PATCH 27/33] Fix `ast-spec:build` --- packages/ast-spec/project.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/ast-spec/project.json b/packages/ast-spec/project.json index fcd5321b19f3..a46843d6def3 100644 --- a/packages/ast-spec/project.json +++ b/packages/ast-spec/project.json @@ -1,15 +1,12 @@ { "name": "ast-spec", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "type": "library", + "projectType": "library", "implicitDependencies": ["!typescript-estree"], + "root": "packages/ast-spec", + "sourceRoot": "packages/ast-spec/src", "targets": { "build": { - "executor": "nx:run-commands", - "options": { - "cwd": "packages/ast-spec", - "commands": ["yarn build"] - }, "outputs": ["{projectRoot}/dist/**/*.ts"] }, "lint": { From d4f77e92d64b4d45cabc16202ad7bd5428d1c3a4 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 11 Apr 2025 20:03:57 -0500 Subject: [PATCH 28/33] Try disabling remote cache --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 398c05e17baa..bc63f90d355c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,6 +182,10 @@ jobs: # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -' COLLECT_COVERAGE: false + NX_SKIP_NX_CACHE: true + NX_DISABLE_NX_CACHE: true + NX_SKIP_REMOTE_CACHE: true + NX_DISABLE_REMOTE_CACHE: true steps: - name: Checkout uses: actions/checkout@v4 @@ -205,6 +209,10 @@ jobs: if: env.PRIMARY_NODE_VERSION != matrix.node-version || matrix.os != 'ubuntu-latest' run: npx nx test ${{ matrix.package }} env: + NX_SKIP_REMOTE_CACHE: true + NX_DISABLE_NX_CACHE: true + NX_SKIP_NX_CACHE: true + NX_DISABLE_REMOTE_CACHE: true CI: true - name: Store coverage for uploading From 7137af9390581c1b61ccd34acd1805a29e92c0b2 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 11 Apr 2025 20:24:06 -0500 Subject: [PATCH 29/33] Try disabling remote cache --- .github/workflows/ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc63f90d355c..398c05e17baa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,10 +182,6 @@ jobs: # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -' COLLECT_COVERAGE: false - NX_SKIP_NX_CACHE: true - NX_DISABLE_NX_CACHE: true - NX_SKIP_REMOTE_CACHE: true - NX_DISABLE_REMOTE_CACHE: true steps: - name: Checkout uses: actions/checkout@v4 @@ -209,10 +205,6 @@ jobs: if: env.PRIMARY_NODE_VERSION != matrix.node-version || matrix.os != 'ubuntu-latest' run: npx nx test ${{ matrix.package }} env: - NX_SKIP_REMOTE_CACHE: true - NX_DISABLE_NX_CACHE: true - NX_SKIP_NX_CACHE: true - NX_DISABLE_REMOTE_CACHE: true CI: true - name: Store coverage for uploading From 971aec3c271770e65b091cb84cd49efcf21425fa Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 11 Apr 2025 21:45:39 -0500 Subject: [PATCH 30/33] Update `typecheck` output path in `nx.json` --- nx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx.json b/nx.json index 6f69941fe0d4..a63ac186a25a 100644 --- a/nx.json +++ b/nx.json @@ -132,7 +132,7 @@ }, "typecheck": { "dependsOn": ["types:copy-ast-spec"], - "outputs": ["{workspaceRoot}/dist/out-tsc/{projectRoot}"], + "outputs": ["{workspaceRoot}/dist"], "cache": true } }, From b40e0374c8f2eb035c770c55f5d4e45b84e4b9d7 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 11 Apr 2025 23:32:13 -0500 Subject: [PATCH 31/33] Set `testTimeout` to `10_000` --- packages/type-utils/vitest.config.mts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/type-utils/vitest.config.mts b/packages/type-utils/vitest.config.mts index ddc038f86b56..674ea2ded3b5 100644 --- a/packages/type-utils/vitest.config.mts +++ b/packages/type-utils/vitest.config.mts @@ -14,6 +14,7 @@ const vitestConfig = mergeConfig( dir: path.join(import.meta.dirname, 'tests'), name: packageJson.name.replace('@typescript-eslint/', ''), root: import.meta.dirname, + testTimeout: 10_000, }, }), ); From 7af2d6f83504d9bf46a6f9d707a71a0cc160001e Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 12 Apr 2025 00:18:40 -0500 Subject: [PATCH 32/33] Switch to `it.for` --- .../tests/TypeOrValueSpecifier.test.ts | 86 +++++++++++-------- .../tests/containsAllTypesByName.test.ts | 39 ++++++--- .../tests/discriminateAnyType.test.ts | 53 +++++++----- packages/type-utils/tests/getTypeName.test.ts | 10 ++- .../tests/isSymbolFromDefaultLibrary.test.ts | 25 ++++-- .../type-utils/tests/typeFlagUtils.test.ts | 30 ++++--- 6 files changed, 155 insertions(+), 88 deletions(-) diff --git a/packages/type-utils/tests/TypeOrValueSpecifier.test.ts b/packages/type-utils/tests/TypeOrValueSpecifier.test.ts index 40b9d76b4faf..70ae2bda9313 100644 --- a/packages/type-utils/tests/TypeOrValueSpecifier.test.ts +++ b/packages/type-utils/tests/TypeOrValueSpecifier.test.ts @@ -1,4 +1,5 @@ import type { TSESTree } from '@typescript-eslint/utils'; +import type { TestContext } from 'vitest'; import { parseForESLint } from '@typescript-eslint/parser'; import Ajv from 'ajv'; @@ -17,20 +18,26 @@ describe('TypeOrValueSpecifier', () => { const ajv = new Ajv(); const validate = ajv.compile(typeOrValueSpecifiersSchema); - function runTestPositive(typeOrValueSpecifier: unknown): void { + function runTestPositive( + [typeOrValueSpecifier]: readonly [typeOrValueSpecifier: unknown], + { expect }: TestContext, + ): void { expect(validate([typeOrValueSpecifier])).toBe(true); } - function runTestNegative(typeOrValueSpecifier: unknown): void { + function runTestNegative( + [typeOrValueSpecifier]: readonly [typeOrValueSpecifier: unknown], + { expect }: TestContext, + ): void { expect(validate([typeOrValueSpecifier])).toBe(false); } - it.each([['MyType'], ['myValue'], ['any'], ['void'], ['never']] as const)( + it.for([['MyType'], ['myValue'], ['any'], ['void'], ['never']] as const)( 'matches a simple string specifier %s', runTestPositive, ); - it.each([ + it.for([ [42], [false], [null], @@ -39,14 +46,14 @@ describe('TypeOrValueSpecifier', () => { [(): void => {}], ] as const)("doesn't match any non-string basic type: %s", runTestNegative); - it.each([ + it.for([ [{ from: 'file', name: 'MyType' }], [{ from: 'file', name: ['MyType', 'myValue'] }], [{ from: 'file', name: 'MyType', path: './filename.js' }], [{ from: 'file', name: ['MyType', 'myValue'], path: './filename.js' }], ] as const)('matches a file specifier: %s', runTestPositive); - it.each([ + it.for([ [{ from: 'file', name: 42 }], [{ from: 'file', name: ['MyType', 42] }], [{ from: 'file', name: ['MyType', 'MyType'] }], @@ -68,12 +75,12 @@ describe('TypeOrValueSpecifier', () => { runTestNegative, ); - it.each([ + it.for([ [{ from: 'lib', name: 'MyType' }], [{ from: 'lib', name: ['MyType', 'myValue'] }], ] as const)('matches a lib specifier: %s', runTestPositive); - it.each([ + it.for([ [{ from: 'lib', name: 42 }], [{ from: 'lib', name: ['MyType', 42] }], [{ from: 'lib', name: ['MyType', 'MyType'] }], @@ -82,7 +89,7 @@ describe('TypeOrValueSpecifier', () => { [{ from: 'lib', name: 'MyType', unrelatedProperty: '' }], ] as const)("doesn't match a malformed lib specifier: %s", runTestNegative); - it.each([ + it.for([ [{ from: 'package', name: 'MyType', package: 'jquery' }], [ { @@ -93,7 +100,7 @@ describe('TypeOrValueSpecifier', () => { ], ] as const)('matches a package specifier: %s', runTestPositive); - it.each([ + it.for([ [{ from: 'package', name: 42, package: 'jquery' }], [{ from: 'package', name: ['MyType', 42], package: 'jquery' }], [ @@ -137,6 +144,7 @@ describe('TypeOrValueSpecifier', () => { code: string, specifier: TypeOrValueSpecifier, expected: boolean, + expect: TestContext['expect'], ): void { const rootDir = path.join(__dirname, 'fixtures'); const { ast, services } = parseForESLint(code, { @@ -159,20 +167,30 @@ describe('TypeOrValueSpecifier', () => { } function runTestPositive( - code: string, - specifier: TypeOrValueSpecifier, + [code, specifier]: readonly [ + code: string, + specifier: TypeOrValueSpecifier, + ], + testContext: Partial & Pick = { + expect, + }, ): void { - runTests(code, specifier, true); + runTests(code, specifier, true, testContext.expect); } function runTestNegative( - code: string, - specifier: TypeOrValueSpecifier, + [code, specifier]: readonly [ + code: string, + specifier: TypeOrValueSpecifier, + ], + testContext: Partial & Pick = { + expect, + }, ): void { - runTests(code, specifier, false); + runTests(code, specifier, false, testContext.expect); } - it.each([ + it.for([ ['interface Foo {prop: string}; type Test = Foo;', 'Foo'], ['type Test = RegExp;', 'RegExp'], ] as const satisfies [string, TypeOrValueSpecifier][])( @@ -180,7 +198,7 @@ describe('TypeOrValueSpecifier', () => { runTestPositive, ); - it.each([ + it.for([ ['interface Foo {prop: string}; type Test = Foo;', 'Bar'], ['interface Foo {prop: string}; type Test = Foo;', 'RegExp'], ['type Test = RegExp;', 'Foo'], @@ -190,7 +208,7 @@ describe('TypeOrValueSpecifier', () => { runTestNegative, ); - it.each([ + it.for([ [ 'interface Foo {prop: string}; type Test = Foo;', { from: 'file', name: 'Foo' }, @@ -264,7 +282,7 @@ describe('TypeOrValueSpecifier', () => { runTestPositive, ); - it.each([ + it.for([ [ 'interface Foo {prop: string}; type Test = Foo;', { from: 'file', name: 'Bar' }, @@ -290,7 +308,7 @@ describe('TypeOrValueSpecifier', () => { runTestNegative, ); - it.each([ + it.for([ ['type Test = RegExp;', { from: 'lib', name: 'RegExp' }], ['type Test = RegExp;', { from: 'lib', name: ['RegExp', 'BigInt'] }], ] as const satisfies [string, TypeOrValueSpecifier][])( @@ -298,7 +316,7 @@ describe('TypeOrValueSpecifier', () => { runTestPositive, ); - it.each([ + it.for([ ['type Test = RegExp;', { from: 'lib', name: 'BigInt' }], ['type Test = RegExp;', { from: 'lib', name: ['BigInt', 'Date'] }], ] as const satisfies [string, TypeOrValueSpecifier][])( @@ -306,7 +324,7 @@ describe('TypeOrValueSpecifier', () => { runTestNegative, ); - it.each([ + it.for([ ['type Test = string;', { from: 'lib', name: 'string' }], ['type Test = string;', { from: 'lib', name: ['string', 'number'] }], ] as const satisfies [string, TypeOrValueSpecifier][])( @@ -314,7 +332,7 @@ describe('TypeOrValueSpecifier', () => { runTestPositive, ); - it.each([ + it.for([ ['type Test = string;', { from: 'lib', name: 'number' }], ['type Test = string;', { from: 'lib', name: ['number', 'boolean'] }], ] as const satisfies [string, TypeOrValueSpecifier][])( @@ -322,7 +340,7 @@ describe('TypeOrValueSpecifier', () => { runTestNegative, ); - it.each([ + it.for([ [ 'import type {Node} from "typescript"; type Test = Node;', { from: 'package', name: 'Node', package: 'typescript' }, @@ -407,7 +425,7 @@ describe('TypeOrValueSpecifier', () => { runTestPositive, ); - it.each([ + it.for([ [ ` type Other = { __otherBrand: true }; @@ -430,7 +448,7 @@ describe('TypeOrValueSpecifier', () => { runTestNegative, ); - it.each([ + it.for([ [ ` type SafePromise = Promise & { __safeBrand: string }; @@ -444,7 +462,7 @@ describe('TypeOrValueSpecifier', () => { runTestPositive, ); - it.each([ + it.for([ [ ` declare module "node:test" { @@ -469,7 +487,7 @@ describe('TypeOrValueSpecifier', () => { runTestPositive, ); - it.each([ + it.for([ [ ` declare module "node:test" { @@ -495,7 +513,7 @@ describe('TypeOrValueSpecifier', () => { ); it("does not match a `declare global` with the 'global' package name", () => { - runTestNegative( + runTestNegative([ ` declare global { export type URL = {}; @@ -508,10 +526,10 @@ describe('TypeOrValueSpecifier', () => { name: 'URL', package: 'global', }, - ); + ]); }); - it.each([ + it.for([ [ 'import type {Node} from "typescript"; type Test = Node;', { from: 'package', name: 'Symbol', package: 'typescript' }, @@ -541,7 +559,7 @@ describe('TypeOrValueSpecifier', () => { runTestNegative, ); - it.each([ + it.for([ [ 'interface Foo {prop: string}; type Test = Foo;', { from: 'lib', name: 'Foo' }, @@ -604,7 +622,7 @@ describe('TypeOrValueSpecifier', () => { runTestNegative, ); - it.each([ + it.for([ ['type Test = Foo;', { from: 'lib', name: 'Foo' }], ['type Test = Foo;', { from: 'lib', name: ['Foo', 'number'] }], ] as const satisfies [string, TypeOrValueSpecifier][])( diff --git a/packages/type-utils/tests/containsAllTypesByName.test.ts b/packages/type-utils/tests/containsAllTypesByName.test.ts index a3851417eeb7..351e5fb84c91 100644 --- a/packages/type-utils/tests/containsAllTypesByName.test.ts +++ b/packages/type-utils/tests/containsAllTypesByName.test.ts @@ -1,5 +1,6 @@ import type { TSESTree } from '@typescript-eslint/typescript-estree'; import type * as ts from 'typescript'; +import type { TestContext } from 'vitest'; import { parseForESLint } from '@typescript-eslint/parser'; import path from 'node:path'; @@ -27,6 +28,7 @@ describe(containsAllTypesByName, () => { code: string, allowAny: boolean, expected: boolean, + { expect }: TestContext, ): void { const type = getType(code); const result = containsAllTypesByName(type, allowAny, new Set()); @@ -34,11 +36,14 @@ describe(containsAllTypesByName, () => { } describe('is true', () => { - function runTest(code: string, expected: boolean): void { - runTestForAliasDeclaration(code, true, expected); + function runTest( + [code, expected]: readonly [code: string, expected: boolean], + testContext: TestContext, + ): void { + runTestForAliasDeclaration(code, true, expected, testContext); } - it.each([ + it.for([ ['type Test = unknown;', false], ['type Test = any;', false], ['type Test = string;', false], @@ -46,11 +51,14 @@ describe(containsAllTypesByName, () => { }); describe('is false', () => { - function runTest(code: string, expected: boolean): void { - runTestForAliasDeclaration(code, false, expected); + function runTest( + [code, expected]: readonly [code: string, expected: boolean], + testContext: TestContext, + ): void { + runTestForAliasDeclaration(code, false, expected, testContext); } - it.each([ + it.for([ ['type Test = unknown;', true], ['type Test = any;', true], ['type Test = string;', false], @@ -63,6 +71,7 @@ describe(containsAllTypesByName, () => { code: string, matchAnyInstead: boolean, expected: boolean, + { expect }: TestContext, ): void { const type = getType(code); const result = containsAllTypesByName( @@ -75,11 +84,14 @@ describe(containsAllTypesByName, () => { } describe('is true', () => { - function runTest(code: string, expected: boolean): void { - runTestForAliasDeclaration(code, true, expected); + function runTest( + [code, expected]: readonly [code: string, expected: boolean], + testContext: TestContext, + ): void { + runTestForAliasDeclaration(code, true, expected, testContext); } - it.each([ + it.for([ [`type Test = Promise & string`, true], ['type Test = Promise | string', true], ['type Test = Promise | Object', true], @@ -87,11 +99,14 @@ describe(containsAllTypesByName, () => { }); describe('is false', () => { - function runTest(code: string, expected: boolean): void { - runTestForAliasDeclaration(code, false, expected); + function runTest( + [code, expected]: readonly [code: string, expected: boolean], + testContext: TestContext, + ): void { + runTestForAliasDeclaration(code, false, expected, testContext); } - it.each([ + it.for([ ['type Test = Promise & string', false], ['type Test = Promise | string', false], ['type Test = Promise | Object', true], diff --git a/packages/type-utils/tests/discriminateAnyType.test.ts b/packages/type-utils/tests/discriminateAnyType.test.ts index bcadb32b7f81..6b933322086e 100644 --- a/packages/type-utils/tests/discriminateAnyType.test.ts +++ b/packages/type-utils/tests/discriminateAnyType.test.ts @@ -1,4 +1,5 @@ import type { TSESTree } from '@typescript-eslint/typescript-estree'; +import type { TestContext } from 'vitest'; import { parseForESLint } from '@typescript-eslint/parser'; import path from 'node:path'; @@ -36,9 +37,12 @@ describe(discriminateAnyType, () => { } function runTest( - code: string, - expected: AnyType, - getNode: GetNode = getDeclarationId, + [code, expected, getNode = getDeclarationId]: readonly [ + code: string, + expected: AnyType, + getNode?: GetNode, + ], + { expect }: TestContext, ): void { const { checker, program, tsNode, type } = getTypes(code, getNode); const result = discriminateAnyType(type, checker, program, tsNode); @@ -46,13 +50,13 @@ describe(discriminateAnyType, () => { } describe('returns Safe', () => { - it.each([ + it.for([ ['const foo = "foo";', AnyType.Safe], ['const foo = 1;', AnyType.Safe], ['const foo = [1, 2];', AnyType.Safe], - ])('when code is %s, returns %s', runTest); + ] as const)('when code is %s, returns %s', runTest); - it('should returns Safe for a recursive thenable.', () => { + it('should returns Safe for a recursive thenable.', testContext => { const code = ` class Foo { foo() { @@ -63,39 +67,46 @@ class Foo { } }; `; - runTest(code, AnyType.Safe, ast => { - const classDeclration = ast.body[0] as TSESTree.ClassDeclaration; - const method = classDeclration.body - .body[0] as TSESTree.MethodDefinition; - const returnStatement = method.value.body?.body.at( - -1, - ) as TSESTree.ReturnStatement; - return returnStatement.argument!; - }); + runTest( + [ + code, + AnyType.Safe, + ast => { + const classDeclration = ast.body[0] as TSESTree.ClassDeclaration; + const method = classDeclration.body + .body[0] as TSESTree.MethodDefinition; + const returnStatement = method.value.body?.body.at( + -1, + ) as TSESTree.ReturnStatement; + return returnStatement.argument!; + }, + ], + testContext, + ); }); }); describe('returns Any', () => { - it.each([ + it.for([ ['const foo = 1 as any;', AnyType.Any], ['let foo;', AnyType.Any], - ])('when code is %s, returns %s', runTest); + ] as const)('when code is %s, returns %s', runTest); }); describe('returns PromiseAny', () => { - it.each([ + it.for([ ['const foo = Promise.resolve({} as any);', AnyType.PromiseAny], [ 'const foo = Promise.resolve(Promise.resolve({} as any));', AnyType.PromiseAny, ], - ])('when code is %s, returns %s', runTest); + ] as const)('when code is %s, returns %s', runTest); }); describe('returns AnyArray', () => { - it.each([ + it.for([ ['const foo = [{} as any];', AnyType.AnyArray], ['const foo = [{} as any, 2];', AnyType.AnyArray], - ])('when code is %s, returns %s', runTest); + ] as const)('when code is %s, returns %s', runTest); }); }); diff --git a/packages/type-utils/tests/getTypeName.test.ts b/packages/type-utils/tests/getTypeName.test.ts index fc6ca5efc8fb..92aa0140204b 100644 --- a/packages/type-utils/tests/getTypeName.test.ts +++ b/packages/type-utils/tests/getTypeName.test.ts @@ -1,5 +1,6 @@ import type { TSESTree } from '@typescript-eslint/typescript-estree'; import type * as ts from 'typescript'; +import type { TestContext } from 'vitest'; import { parseForESLint } from '@typescript-eslint/parser'; import path from 'node:path'; @@ -24,14 +25,17 @@ describe(getTypeName, () => { return { checker, type: services.getTypeAtLocation(declaration.id) }; } - function runTest(code: string, expected: string): void { + function runTest( + [code, expected]: readonly [code: string, expected: string], + { expect }: TestContext, + ): void { const { checker, type } = getTypes(code); const result = getTypeName(checker, type); expect(result).toBe(expected); } describe('returns primitive type', () => { - it.each([ + it.for([ ['type Test = string;', 'string'], ['type Test = "text";', 'string'], ['type Test = string | "text";', 'string'], @@ -49,7 +53,7 @@ describe(getTypeName, () => { }); describe('returns non-primitive type', () => { - it.each([ + it.for([ ['type Test = 123;', '123'], ['type Test = true;', 'true'], ['type Test = false;', 'false'], diff --git a/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts b/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts index 3e1581b58bd4..eb4ecbf55b83 100644 --- a/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts +++ b/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts @@ -1,5 +1,6 @@ import type { TSESTree } from '@typescript-eslint/typescript-estree'; import type * as ts from 'typescript'; +import type { TestContext } from 'vitest'; import { parseForESLint } from '@typescript-eslint/parser'; import path from 'node:path'; @@ -26,18 +27,25 @@ describe(isSymbolFromDefaultLibrary, () => { return { program: services.program, symbol: type.getSymbol() }; } - function runTestForAliasDeclaration(code: string, expected: boolean): void { + function runTestForAliasDeclaration( + code: string, + expected: boolean, + expect: TestContext['expect'], + ): void { const { program, symbol } = getTypes(code); const result = isSymbolFromDefaultLibrary(program, symbol); expect(result).toBe(expected); } describe('is symbol from default library', () => { - function runTest(code: string): void { - runTestForAliasDeclaration(code, true); + function runTest( + [code]: readonly [code: string], + { expect }: TestContext, + ): void { + runTestForAliasDeclaration(code, true, expect); } - it.each([ + it.for([ ['type Test = Array;'], ['type Test = Map;'], ['type Test = Promise'], @@ -47,11 +55,14 @@ describe(isSymbolFromDefaultLibrary, () => { }); describe('is not symbol from default library', () => { - function runTest(code: string): void { - runTestForAliasDeclaration(code, false); + function runTest( + [code]: readonly [code: string], + { expect }: TestContext, + ): void { + runTestForAliasDeclaration(code, false, expect); } - it.each([ + it.for([ ['const test: Array = [1,2,3];'], ['type Test = number;'], ['interface Test { bar: string; };'], diff --git a/packages/type-utils/tests/typeFlagUtils.test.ts b/packages/type-utils/tests/typeFlagUtils.test.ts index 03f1526343aa..c5d6fcc4f552 100644 --- a/packages/type-utils/tests/typeFlagUtils.test.ts +++ b/packages/type-utils/tests/typeFlagUtils.test.ts @@ -1,4 +1,5 @@ import type { TSESTree } from '@typescript-eslint/typescript-estree'; +import type { TestContext } from 'vitest'; import { parseForESLint } from '@typescript-eslint/parser'; import path from 'node:path'; @@ -25,15 +26,15 @@ describe('typeFlagUtils', () => { describe(getTypeFlags, () => { function runTestForAliasDeclaration( - code: string, - expected: ts.TypeFlags, + [code, expected]: readonly [code: string, expected: ts.TypeFlags], + { expect }: TestContext, ): void { const type = getType(code); const result = getTypeFlags(type); expect(result).toBe(expected); } - it.each([ + it.for([ ['type Test = any;', 1], ['type Test = unknown;', 2], ['type Test = string;', 4], @@ -56,6 +57,7 @@ describe('typeFlagUtils', () => { code: string, flagsToCheck: ts.TypeFlags, expected: boolean, + { expect }: TestContext, ): void { const type = getType(code); const result = isTypeFlagSet(type, flagsToCheck); @@ -64,13 +66,16 @@ describe('typeFlagUtils', () => { describe('is type flags set', () => { function runTestIsTypeFlagSet( - code: string, - flagsToCheck: ts.TypeFlags, + [code, flagsToCheck]: readonly [ + code: string, + flagsToCheck: ts.TypeFlags, + ], + testContext: TestContext, ): void { - runTestForAliasDeclaration(code, flagsToCheck, true); + runTestForAliasDeclaration(code, flagsToCheck, true, testContext); } - it.each([ + it.for([ ['type Test = any;', ts.TypeFlags.Any], ['type Test = string;', ts.TypeFlags.String], ['type Test = string | number;', ts.TypeFlags.String], @@ -83,13 +88,16 @@ describe('typeFlagUtils', () => { describe('is not type flags set', () => { function runTestIsNotTypeFlagSet( - code: string, - flagsToCheck: ts.TypeFlags, + [code, flagsToCheck]: readonly [ + code: string, + flagsToCheck: ts.TypeFlags, + ], + testContext: TestContext, ): void { - runTestForAliasDeclaration(code, flagsToCheck, false); + runTestForAliasDeclaration(code, flagsToCheck, false, testContext); } - it.each([ + it.for([ ['type Test = string', ts.TypeFlags.Any], ['type Test = string | number;', ts.TypeFlags.Any], ['type Test = string & { foo: string }', ts.TypeFlags.String], From 7d7d5b22a102b1b720a3c652036b01686251461f Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 12 Apr 2025 02:47:11 -0500 Subject: [PATCH 33/33] Fix `vitest` coverage output when run with `nx` --- nx.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nx.json b/nx.json index a63ac186a25a..ac7a356e5991 100644 --- a/nx.json +++ b/nx.json @@ -103,12 +103,11 @@ "{workspaceRoot}/vitest.config.base.mts", "{projectRoot}/vitest.config.mts" ], - "outputs": ["{options.reportsDirectory}"], + "outputs": ["{projectRoot}/coverage"], "cache": true, "options": { "config": "{projectRoot}/vitest.config.mts", - "watch": false, - "reportsDirectory": "{projectRoot}/coverage" + "watch": false } }, "lint": { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy