Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 11, 2025

https://trello.com/c/7GkdzEfj/1819-20-fe-fix-vitest-workspace-deprecation-warning-by-migrating-to-projects-config

This PR addresses deprecation warnings in vitest v3 by migrating from the deprecated workspace configuration to the new projects-based setup.

Changes Made

Vitest Configuration Migration:

  • Removed deprecated vitest.workspace.json file
  • Created new root-level vitest.config.ts using the test.projects field
  • Migrated project references: ["front/vite.config.ts", "shared-components/vitest.config.ts"]

Configuration Updates:

  • Updated root tsconfig.json to include the new vitest.config.ts file
  • Modified .eslintrc.cjs to support root-level TypeScript files by adding ./tsconfig.json to the project paths

Issue Resolution

The main deprecation warning was:

DEPRECATED  The workspace file is deprecated and will be removed in the next major. Please, use the `test.projects` field in the root config file instead.

This warning appeared every time pnpm test was run. The new configuration follows vitest v4 best practices and eliminates the deprecation warning.

Verification

  • ✅ All frontend builds pass: pnpm -C front build and pnpm -C statviz build
  • ✅ All tests pass: pnpm test runs without deprecation warnings
  • ✅ ESLint and TypeScript configurations work correctly with the new setup
  • ✅ No vitest-related deprecation warnings are present

The codebase is now ready for vitest v4 and uses the recommended configuration patterns.

Fixes #2258.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link

codecov bot commented Aug 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.18%. Comparing base (ceb9308) to head (96c5b72).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2298   +/-   ##
=======================================
  Coverage   75.18%   75.18%           
=======================================
  Files         275      275           
  Lines       18958    18958           
  Branches     1773     1773           
=======================================
  Hits        14253    14253           
  Misses       4661     4661           
  Partials       44       44           
Flag Coverage Δ
backend 99.67% <ø> (ø)
frontend 66.32% <ø> (ø)
sharedComponents 66.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Copilot Copilot AI changed the title [WIP] Fix deprecation warnings using vitest Fix vitest workspace deprecation warning by migrating to projects config Aug 11, 2025
@Copilot Copilot AI requested a review from pylipp August 11, 2025 07:59
Copilot finished work on behalf of pylipp August 11, 2025 07:59
@pylipp pylipp marked this pull request as ready for review August 11, 2025 09:26
@pylipp pylipp requested a review from HaGuesto August 12, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix deprecation warnings using vitest

2 participants