Skip to content

Fix Vitest mock interceptor startup warnings - #8639

Open
joshblack with Copilot wants to merge 1 commit into
mainfrom
fix/vitest-interceptor-warning
Open

joshblack with Copilot wants to merge 1 commit into
mainfrom
fix/vitest-interceptor-warning

Conversation

Copilot AI commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

No linked repository issue.

Fix the two vitest:mocks:interceptor warnings printed when starting Vitest. The lockfile mixed vitest and @vitest/browser-playwright 5.0.0 with @vitest/browser 5.0.5. Both browser projects therefore loaded the old mock interceptor, which defined configureServer even when WebSocket registration was disabled.

Align Vitest and its Playwright provider on 5.0.5 and regenerate the lockfile. The upstream fix in vitest-dev/vitest#11377 only attaches that hook when enabled. No warning filters or local plugin workarounds are needed.

Changelog

New

None.

Changed

Update the minimum versions of the vitest and @vitest/browser-playwright development dependencies to ^5.0.5, matching the existing browser dependency and deduplicating the older browser/mocker packages.

Removed

The two mock interceptor startup warnings. Other warnings remain visible.

Rollout strategy

  • No changes needed in github/github-ui
  • Needs changes in github/github-ui
  • Ships with feature flag(s)
  • Not sure
  • None

Development dependency update only; no changeset is needed.

Testing & Reviewing

Reproduced exactly two matching warnings with the original lockfile. Verified zero matching warnings in the complete updated test run.

  • npm test -- --run — passed: 161 test files, 2,928 tests passed, 3 skipped, 10 todo.
  • npm ls vitest @vitest/browser @vitest/browser-playwright @vitest/mocker --depth=1 — passed: aligned 5.0.5 dependencies with no peer dependency errors.
  • npm run build — passed.
  • npm run type-check — passed.
  • npm run lint — passed after rerunning once the build completed; the initial concurrent run encountered a temporary build config file that had already been removed.
  • npm run lint:css — passed.
  • npm run format:diff — passed.
  • npx prettier --check package.json package-lock.json — passed.
  • npm run format and npm run lint:fix — passed before committing; no unrelated changes.
  • git diff --check — passed.

Installed the missing Playwright Chromium runtime to execute the browser tests. No component or visual changes; visual regression tests were not run.

Upgrade Vitest and its Playwright browser provider to 5.0.5 so both browser projects use the upstream mock interceptor fix instead of the locked 5.0.0 implementation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 32f420f

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 Oct 29, 2026 — with Copilot SWE Agent
@joshblack
joshblack marked this pull request as ready for review October 29, 2026 21:18
@joshblack
joshblack requested a review from a team as a code owner October 29, 2026 21:18
@joshblack
joshblack requested review from siddharthkp and a balanced review from Copilot October 29, 2026 21:18
@joshblack joshblack added the integration-tests: skipped manually Changes in this PR do not require an integration test label Oct 29, 2026
@joshblack
joshblack enabled auto-merge October 29, 2026 21:19

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.

🟢 Approval recommended

No active review issues are identified for the Vitest dependency update.

No open issues 🎉

What changed in this PR

Updates the repository’s Vitest development dependencies to pick up the upstream mock interceptor fix, addressing startup warnings without adding warning filters or local workarounds.

Changes:

  • Raises vitest and @vitest/browser-playwright minimum versions to ^5.0.5, matching @vitest/browser.
  • Regenerates the lockfile with aligned versions, removing older duplicate browser and mocker packages.
  • Leaves component code and published package behavior unchanged.
File Description
package.json Updates Vitest and its Playwright provider to ^5.0.5.
package-lock.json Locks aligned dependencies and updates their transitive packages.

Review effort: Balanced

This branch was successfully deployed

2 active deployments
storybook-preview-8639 — 32f420f4 Deployed Oct 29, 2026 by github-actions[bot]
github-pages — 32f420f4 Deployed Oct 29, 2026 by Copilot via deploy-preview #33970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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