Skip to content

feat(test): upgrade to Vitest v5 with migration support - #2551

Draft
fengmk2 wants to merge 5 commits into
mainfrom
rfc/vitest-v5-upgrade
Draft

feat(test): upgrade to Vitest v5 with migration support#2551
fengmk2 wants to merge 5 commits into
mainfrom
rfc/vitest-v5-upgrade

Conversation

@fengmk2

@fengmk2 fengmk2 commented Aug 24, 2026

Copy link
Copy Markdown
Member

Upgrade vp test and the vite-plus/test* API to Vitest 5.0.0. Update the package graph and config integration. Preserve supported compatibility aliases. Require Node.js ^22.18.0 || ^24.11.0 || >=26.0.0.

Add a Vitest v5 pass to vp migrate. Preserve v4 behavior where compatible options exist. Apply safe source changes. Report changes that need manual review. Add runtime guards, regression fixtures, and a migration guide.

Keep this PR as a draft until we resolve these upstream issues:

  • Preview locator clicks fail with real timers.
  • Browser globals retain JSON-encoded define values.
  • Node and browser matcher declarations conflict with @testing-library/jest-dom.

See rfcs/vitest-v5-upgrade.md for the design and release requirements. This work supports #2405.

@netlify

netlify Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview ready!

Name Link
🔨 Latest commit 88d0647
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a9ed69fc7071d000884db81
😎 Deploy Preview https://deploy-preview-2551--viteplus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@fengmk2 fengmk2 self-assigned this Aug 30, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 3, 2026

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://rfc-vitest-v5-upgrade-viteplus-dev.voidzero-docs.workers.dev (commit 88d0647)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://85e9d21c-viteplus-dev.voidzero-docs.workers.dev 88d0647 2026-09-07T15:23:45.847Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://862ed814-viteplus-dev.voidzero-docs.workers.dev a60f750 2026-09-06T16:05:48.929Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://4f5dde6e-viteplus-dev.voidzero-docs.workers.dev 0cc40f3 2026-09-06T15:47:56.670Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://de831f5a-viteplus-dev.voidzero-docs.workers.dev 5787285 2026-09-06T15:34:33.759Z Visit the dashboard ↗
  • Build: Failed ❌

View logs ↗
2d55279 2026-09-04T16:42:33.879Z View logs ↗
  • Build: Failed ❌

View logs ↗
8186f1e 2026-09-04T02:00:42.355Z View logs ↗
  • Build: Failed ❌

View logs ↗
9b2b1ea 2026-09-03T13:35:15.624Z View logs ↗

@fengmk2
fengmk2 force-pushed the rfc/vitest-v5-upgrade branch 2 times, most recently from 8186f1e to 2d55279 Compare September 4, 2026 16:41
@fengmk2 fengmk2 changed the title docs(rfc): plan Vitest v5 upgrade feat(test): upgrade to Vitest v5 with migration support Sep 6, 2026
@fengmk2
fengmk2 force-pushed the rfc/vitest-v5-upgrade branch from 5787285 to 0cc40f3 Compare September 6, 2026 15:46
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 88d0647

@socket-security

socket-security Bot commented Sep 6, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm data-urls is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_v5_optional_packages/package.jsonnpm/jsdom@27.2.0npm/data-urls@6.0.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/data-urls@6.0.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@fengmk2
fengmk2 force-pushed the rfc/vitest-v5-upgrade branch from a60f750 to 88d0647 Compare September 7, 2026 15:22
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.

1 participant