Skip to content

Upgrade vitest to 4.1.0-beta.5 for --detect-async-leaks support#3374

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-async-leaks-vitest-suite
Draft

Upgrade vitest to 4.1.0-beta.5 for --detect-async-leaks support#3374
Copilot wants to merge 3 commits intomainfrom
copilot/fix-async-leaks-vitest-suite

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 1, 2026

Upgrades vitest from 3.2.4 to 4.1.0-beta.5 to enable the --detect-async-leaks flag (vitest-dev/vitest#9528). All 48 tests pass cleanly with the flag — no async leaks detected.

  • vitest upgrade: ^3.2.4^4.1.0-beta.5 across all 6 test packages
  • Workspace config migration: vitest.workspace.js (defineWorkspace) → vitest.config.ts (defineConfig with test.projects) — the old format was dropped in vitest 4, which broke happy-dom environment resolution for @sanity/visual-editing tests
// vitest.config.ts (replaces vitest.workspace.js)
import {defineConfig} from 'vitest/config'

export default defineConfig({
  test: {
    projects: [
      './packages/preview-url-secret/vitest.config.ts',
      './packages/react-loader/vitest.config.ts',
      // ...
    ],
  },
})

Usage: vitest run --detect-async-leaks

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • hiomol4a.api.sanity.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/visual-editing/visual-editing/packages/@repo/sanity-extracted-schema/node_modules/.bin/../sanity/bin/sanity schema extract --workspace cross-dataset-references --path ./cross-dataset-references.json (dns block)
  • vitest.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Run the vitest suite with --detect-async-leaks and fix any issues it uncovers. Don't make any mistakes.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 1, 2026

⚠️ No Changeset found

Latest commit: 4424278

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
live-visual-editing-next Ready Ready Preview, Comment Mar 1, 2026 10:21am
visual-editing-next Ready Ready Preview, Comment Mar 1, 2026 10:21am
visual-editing-page-builder-demo Ready Ready Preview, Comment Mar 1, 2026 10:21am
visual-editing-storybook Ready Ready Preview, Comment Mar 1, 2026 10:21am
visual-editing-studio Ready Ready Preview Mar 1, 2026 10:21am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
visual-editing-astro Ignored Ignored Mar 1, 2026 10:21am
visual-editing-next-with-i18n Ignored Ignored Mar 1, 2026 10:21am
visual-editing-nuxt Ignored Ignored Mar 1, 2026 10:21am
visual-editing-remix Ignored Ignored Mar 1, 2026 10:21am
visual-editing-svelte Ignored Ignored Mar 1, 2026 10:21am

Request Review

…ect-async-leaks support

Co-authored-by: stipsan <81981+stipsan@users.noreply.github.com>
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Mar 1, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​vitest@​3.2.4 ⏵ 4.1.0-beta.598 +31007998 -1100

View full report

Co-authored-by: stipsan <81981+stipsan@users.noreply.github.com>
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.

2 participants