From 1e0917eb9a183f548421651bdf2fdbe9a3be14b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Sun, 16 Jul 2023 23:10:52 +0200 Subject: [PATCH] Move to v8 coverage (#4075) * chore: select latest node lts by default * chore(dev-deps): coverage with v8 --------- Co-authored-by: Sebastien Vanvelthem --- apps/nextjs-app/package.json | 2 +- apps/nextjs-app/vitest.config.ts | 2 +- apps/remix-app/.gitignore | 2 ++ apps/vite-app/vite.config.ts | 2 +- packages/core-lib/package.json | 2 +- packages/core-lib/vitest.config.ts | 2 +- packages/db-main-prisma/package.json | 2 +- packages/db-main-prisma/vitest.config.ts | 2 +- packages/ts-utils/package.json | 2 +- packages/ts-utils/vitest.config.ts | 2 +- packages/ui-lib/package.json | 2 +- packages/ui-lib/vitest.config.ts | 2 +- yarn.lock | 35 +++++++++++++++++++----- 13 files changed, 41 insertions(+), 18 deletions(-) diff --git a/apps/nextjs-app/package.json b/apps/nextjs-app/package.json index 6c868826d4e..a12392c7329 100644 --- a/apps/nextjs-app/package.json +++ b/apps/nextjs-app/package.json @@ -129,7 +129,7 @@ "@types/react-test-renderer": "18.0.0", "@types/testing-library__jest-dom": "5.14.7", "@vitejs/plugin-react": "4.0.3", - "@vitest/coverage-istanbul": "0.33.0", + "@vitest/coverage-v8": "0.33.0", "@vitest/ui": "0.33.0", "autoprefixer": "10.4.14", "cross-env": "7.0.3", diff --git a/apps/nextjs-app/vitest.config.ts b/apps/nextjs-app/vitest.config.ts index 91b455631ad..4f158b673cc 100644 --- a/apps/nextjs-app/vitest.config.ts +++ b/apps/nextjs-app/vitest.config.ts @@ -31,7 +31,7 @@ export default defineConfig({ dir: '../../.cache/vitest/nextjs-app', }, coverage: { - provider: 'istanbul', + provider: 'v8', reporter: ['text', 'clover'], extension: ['js', 'jsx', 'ts', 'tsx'], }, diff --git a/apps/remix-app/.gitignore b/apps/remix-app/.gitignore index 1cf51bff6a6..5bbede71f30 100644 --- a/apps/remix-app/.gitignore +++ b/apps/remix-app/.gitignore @@ -1,5 +1,7 @@ node_modules +/coverage + .cache .vercel .output diff --git a/apps/vite-app/vite.config.ts b/apps/vite-app/vite.config.ts index 1edf91b9083..05f4298627f 100644 --- a/apps/vite-app/vite.config.ts +++ b/apps/vite-app/vite.config.ts @@ -30,7 +30,7 @@ export default defineConfig({ dir: '../../.cache/vitest/vite-app', }, coverage: { - provider: 'istanbul', + provider: 'v8', reporter: ['text', 'clover'], extension: ['js', 'jsx', 'ts', 'tsx'], }, diff --git a/packages/core-lib/package.json b/packages/core-lib/package.json index 03eca95dbb4..3d338ce0f48 100644 --- a/packages/core-lib/package.json +++ b/packages/core-lib/package.json @@ -43,7 +43,7 @@ "@types/react": "18.2.14", "@types/react-dom": "18.2.6", "@vitejs/plugin-react": "4.0.3", - "@vitest/coverage-istanbul": "0.33.0", + "@vitest/coverage-v8": "0.33.0", "@vitest/ui": "0.33.0", "@your-org/eslint-config-bases": "workspace:^", "cross-env": "7.0.3", diff --git a/packages/core-lib/vitest.config.ts b/packages/core-lib/vitest.config.ts index 4d024055608..7e61b8238bd 100644 --- a/packages/core-lib/vitest.config.ts +++ b/packages/core-lib/vitest.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ dir: '../../.cache/vitest/core-lib', }, coverage: { - provider: 'istanbul', + provider: 'v8', reporter: ['text', 'clover'], extension: ['js', 'jsx', 'ts', 'tsx'], all: true, diff --git a/packages/db-main-prisma/package.json b/packages/db-main-prisma/package.json index 8bb2725465b..a6e61986bb8 100644 --- a/packages/db-main-prisma/package.json +++ b/packages/db-main-prisma/package.json @@ -40,7 +40,7 @@ "@prisma/client": "4.16.2", "@soluble/dsn-parser": "1.9.1", "@types/node": "20.4.1", - "@vitest/coverage-istanbul": "0.33.0", + "@vitest/coverage-v8": "0.33.0", "@vitest/ui": "0.33.0", "@your-org/eslint-config-bases": "workspace:^", "camelcase": "7.0.1", diff --git a/packages/db-main-prisma/vitest.config.ts b/packages/db-main-prisma/vitest.config.ts index a9ec74cbef8..d7b9592cd38 100644 --- a/packages/db-main-prisma/vitest.config.ts +++ b/packages/db-main-prisma/vitest.config.ts @@ -15,7 +15,7 @@ export default defineConfig({ dir: '../../.cache/vitest/db-main-e2e', }, coverage: { - provider: 'istanbul', + provider: 'v8', reporter: ['text', 'clover'], extension: ['js', 'jsx', 'ts', 'tsx'], all: true, diff --git a/packages/ts-utils/package.json b/packages/ts-utils/package.json index 75b02d42e7d..98cac8990c5 100644 --- a/packages/ts-utils/package.json +++ b/packages/ts-utils/package.json @@ -40,7 +40,7 @@ "@size-limit/file": "8.2.6", "@types/jest": "29.5.3", "@types/node": "20.4.1", - "@vitest/coverage-istanbul": "0.33.0", + "@vitest/coverage-v8": "0.33.0", "@your-org/eslint-config-bases": "workspace:^", "cross-env": "7.0.3", "es-check": "7.1.1", diff --git a/packages/ts-utils/vitest.config.ts b/packages/ts-utils/vitest.config.ts index 6b5b70f5733..a82670f4cd2 100644 --- a/packages/ts-utils/vitest.config.ts +++ b/packages/ts-utils/vitest.config.ts @@ -13,7 +13,7 @@ export default defineConfig({ dir: '../../.cache/vitest/ts-utils', }, coverage: { - provider: 'istanbul', + provider: 'v8', reporter: ['text', 'clover'], extension: ['js', 'jsx', 'ts', 'tsx'], all: true, diff --git a/packages/ui-lib/package.json b/packages/ui-lib/package.json index d12e5f538a7..547fec2e591 100644 --- a/packages/ui-lib/package.json +++ b/packages/ui-lib/package.json @@ -53,7 +53,7 @@ "@types/node": "20.4.1", "@types/react": "18.2.14", "@types/react-dom": "18.2.6", - "@vitest/coverage-istanbul": "0.33.0", + "@vitest/coverage-v8": "0.33.0", "@your-org/eslint-config-bases": "workspace:^", "autoprefixer": "10.4.14", "cross-env": "7.0.3", diff --git a/packages/ui-lib/vitest.config.ts b/packages/ui-lib/vitest.config.ts index 4cc768cafc8..1f79aaba760 100644 --- a/packages/ui-lib/vitest.config.ts +++ b/packages/ui-lib/vitest.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ dir: '../../.cache/vitest/ui-lib', }, coverage: { - provider: 'istanbul', + provider: 'v8', reporter: ['text', 'clover'], extension: ['js', 'jsx', 'ts', 'tsx'], all: true, diff --git a/yarn.lock b/yarn.lock index e4fca9f31ff..d0bba25eee2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26,7 +26,7 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:^2.2.0": +"@ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.2.1": version: 2.2.1 resolution: "@ampproject/remapping@npm:2.2.1" dependencies: @@ -8398,6 +8398,27 @@ __metadata: languageName: node linkType: hard +"@vitest/coverage-v8@npm:0.33.0": + version: 0.33.0 + resolution: "@vitest/coverage-v8@npm:0.33.0" + dependencies: + "@ampproject/remapping": "npm:^2.2.1" + "@bcoe/v8-coverage": "npm:^0.2.3" + istanbul-lib-coverage: "npm:^3.2.0" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^4.0.1" + istanbul-reports: "npm:^3.1.5" + magic-string: "npm:^0.30.1" + picocolors: "npm:^1.0.0" + std-env: "npm:^3.3.3" + test-exclude: "npm:^6.0.0" + v8-to-istanbul: "npm:^9.1.0" + peerDependencies: + vitest: ">=0.32.0 <1" + checksum: c49f92640375b6fe6c773f4fcc1852c61c914e9f4a86ce9b33c4c87c939d2b90968234ca18e2cd69ed7278307776484dfe233188e111df007371e56113d49fc9 + languageName: node + linkType: hard + "@vitest/expect@npm:0.33.0": version: 0.33.0 resolution: "@vitest/expect@npm:0.33.0" @@ -8579,7 +8600,7 @@ __metadata: "@types/react": "npm:18.2.14" "@types/react-dom": "npm:18.2.6" "@vitejs/plugin-react": "npm:4.0.3" - "@vitest/coverage-istanbul": "npm:0.33.0" + "@vitest/coverage-v8": "npm:0.33.0" "@vitest/ui": "npm:0.33.0" "@your-org/eslint-config-bases": "workspace:^" "@your-org/ts-utils": "workspace:^" @@ -8614,7 +8635,7 @@ __metadata: "@prisma/client": "npm:4.16.2" "@soluble/dsn-parser": "npm:1.9.1" "@types/node": "npm:20.4.1" - "@vitest/coverage-istanbul": "npm:0.33.0" + "@vitest/coverage-v8": "npm:0.33.0" "@vitest/ui": "npm:0.33.0" "@your-org/eslint-config-bases": "workspace:^" camelcase: "npm:7.0.1" @@ -8709,7 +8730,7 @@ __metadata: "@size-limit/file": "npm:8.2.6" "@types/jest": "npm:29.5.3" "@types/node": "npm:20.4.1" - "@vitest/coverage-istanbul": "npm:0.33.0" + "@vitest/coverage-v8": "npm:0.33.0" "@your-org/eslint-config-bases": "workspace:^" cross-env: "npm:7.0.3" es-check: "npm:7.1.1" @@ -8751,7 +8772,7 @@ __metadata: "@types/node": "npm:20.4.1" "@types/react": "npm:18.2.14" "@types/react-dom": "npm:18.2.6" - "@vitest/coverage-istanbul": "npm:0.33.0" + "@vitest/coverage-v8": "npm:0.33.0" "@your-org/eslint-config-bases": "workspace:^" "@your-org/ts-utils": "workspace:^" autoprefixer: "npm:10.4.14" @@ -18432,7 +18453,7 @@ __metadata: "@types/testing-library__jest-dom": "npm:5.14.7" "@vercel/analytics": "npm:1.0.1" "@vitejs/plugin-react": "npm:4.0.3" - "@vitest/coverage-istanbul": "npm:0.33.0" + "@vitest/coverage-v8": "npm:0.33.0" "@vitest/ui": "npm:0.33.0" "@your-org/api-gateway": "workspace:^" "@your-org/common-i18n": "workspace:^" @@ -24422,7 +24443,7 @@ __metadata: languageName: node linkType: hard -"v8-to-istanbul@npm:^9.0.0, v8-to-istanbul@npm:^9.0.1": +"v8-to-istanbul@npm:^9.0.0, v8-to-istanbul@npm:^9.0.1, v8-to-istanbul@npm:^9.1.0": version: 9.1.0 resolution: "v8-to-istanbul@npm:9.1.0" dependencies: