Skip to content

Migrate to Vitest 5 - #8381

Open
joshblack with Copilot wants to merge 2 commits into
mainfrom
copilot/migrate-to-vitest-5
Open

Migrate to Vitest 5#8381
joshblack with Copilot wants to merge 2 commits into
mainfrom
copilot/migrate-to-vitest-5

Conversation

Copilot AI commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Migrates the test infrastructure from Vitest 4 to Vitest 5 while preserving existing test behavior.

Changelog

New

  • None

Changed

  • Upgrade vitest, @vitest/browser, and @vitest/browser-playwright to v5.
  • Align the shared Vitest configuration peer dependency.
  • Temporarily exempt newly released Vitest packages and tinybench from npm’s release-age policy.
  • Replace a timer-based SelectPanel assertion with waitFor to account for asynchronous updates.

Removed

  • None

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; development dependency and test-only changes

Testing & Reviewing

Review the dependency graph, temporary release-age exclusions, and Vitest 5 migration compatibility.

Copilot AI and others added 2 commits September 3, 2026 20:41
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 80ae74a

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@joshblack joshblack added the skip changeset This change does not need a changelog label Sep 3, 2026 — with Copilot SWE Agent
Copilot AI requested a review from joshblack September 3, 2026 20:58
@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

@joshblack joshblack added the integration-tests: skipped manually Changes in this PR do not require an integration test label Sep 3, 2026
@joshblack
joshblack marked this pull request as ready for review September 3, 2026 21:03
Copilot AI lite review requested due to automatic review settings September 3, 2026 21:03
@joshblack
joshblack requested a review from a team as a code owner September 3, 2026 21:03
Comment thread .npmrc
Comment on lines +10 to +12
min-release-age-exclude[]=vitest
min-release-age-exclude[]=@vitest/*
min-release-age-exclude[]=tinybench

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
min-release-age-exclude[]=vitest
min-release-age-exclude[]=@vitest/*
min-release-age-exclude[]=tinybench

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Vitest 5’s Node engine floor (>=22.12) appears to conflict with the repo’s declared Node engine support (allows 22.11), which should be aligned to prevent install/test issues.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Migrates the repo’s test tooling from Vitest 4 to Vitest 5, keeping existing behavior stable while accounting for Vitest’s new package set and some async timing differences in tests.

Changes:

  • Upgrades vitest, @vitest/browser, and @vitest/browser-playwright to ^5.0.0 and aligns the internal @primer/vitest-config peer dependency.
  • Adds npm min-release-age exclusions for the newly released Vitest packages and tinybench to avoid install blocks during the initial release window.
  • Updates a SelectPanel test to use waitFor instead of a 0ms timer tick to accommodate async updates.
File summaries
File Description
packages/vitest-config/package.json Bumps the internal shared config’s vitest peer dependency to v5.
packages/react/src/SelectPanel/SelectPanel.test.tsx Replaces a timer-based assertion with waitFor for async stability.
package.json Updates root devDependencies to Vitest 5-related packages.
package-lock.json Lockfile updates reflecting Vitest 5 and its updated dependency tree (including new engine constraints).
.npmrc Temporarily exempts Vitest-related packages and tinybench from npm’s release-age policy.
Review details
  • Files reviewed: 4/5 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@primer-integration

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

@joshblack
joshblack requested a review from liuliu-dev September 4, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants