Skip to content

Commit

Permalink
chore(web): upgrade Vitest and related packages
Browse files Browse the repository at this point in the history
Update Vitest to version 3.0.0-beta.1 and adjust dependencies to
accommodate this change. Modify TypeScript and Vite configuration
files to support new Vitest configurations. These upgrades aim to
enhance compatibility with newer features and maintain alignment with
 upstream package improvements.

Signed-off-by: suddenlyGiovanni <[email protected]>
  • Loading branch information
suddenlyGiovanni committed Dec 9, 2024
1 parent 5b3cdbe commit 5bee86e
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 370 deletions.
6 changes: 3 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
"@types/node": "22.10.1",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.1",
"@vitest/coverage-v8": "2.1.8",
"@vitest/ui": "2.1.8",
"@vitest/coverage-v8": "^3.0.0-beta.1",
"@vitest/ui": "^3.0.0-beta.1",
"react-router-devtools": "2.0.0-beta.0",
"tailwindcss": "4.0.0-beta.6",
"tailwindcss-animate": "1.0.7",
"vite": "6.0.3",
"vite-tsconfig-paths": "5.1.4",
"vitest": "2.1.8"
"vitest": "^3.0.0-beta.1"
},
"engines": {
"node": ">=22.10"
Expand Down
2 changes: 1 addition & 1 deletion apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"react/canary",
"react-dom",
"vite/client",
"vitest",
"vitest/config",
"@react-router/node"
],
"rootDirs": [".", "./.react-router/types"]
Expand Down
6 changes: 3 additions & 3 deletions apps/web/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { exec } from 'node:child_process'
import process from 'node:process'
import { codecovVitePlugin } from '@codecov/vite-plugin'
import { reactRouter } from '@react-router/dev/vite'
import tailwindcss from '@tailwindcss/vite'
import { reactRouterDevTools } from 'react-router-devtools'
import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'

/// <reference types="vitest" />
/// <reference types="vitest/config" />
import { defineConfig } from 'vite'

export default defineConfig({
plugins: [
Expand Down Expand Up @@ -78,7 +79,6 @@ export default defineConfig({
}),
],
test: {
// biome-ignore lint/nursery/noProcessEnv: it is fine
// biome-ignore lint/complexity/useLiteralKeys: TS4111: Property 'CODECOV_TOKEN' comes from an index signature, so it must be accessed with ['CODECOV_TOKEN'].
reporters: process.env['GITHUB_ACTIONS'] ? ['dot', 'github-actions'] : ['default'],
globalSetup: './app/tests/test-globals.ts',
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
"peerDependencyRules": {
"allowedVersions": {
"@codecov/[email protected]>vite": "^6",
"@react-router/[email protected]>vite": "^6"
"@react-router/[email protected]>vite": "^6",
"@vitest/[email protected]>vite": "^6"
}
},
"overrides": {
"react": "^19.0.0",
"react-dom": "19.0.0",
"@types/react": "^19.0.0"
"@types/react": "^19.0.0",
"vite": "^6"
}
},
"private": true,
Expand Down
Loading

0 comments on commit 5bee86e

Please sign in to comment.