Skip to content

chore(deps): vite-plus sync - #3244

Open
setchy wants to merge 3 commits into
mainfrom
chore/vite-plus-sync
Open

chore(deps): vite-plus sync#3244
setchy wants to merge 3 commits into
mainfrom
chore/vite-plus-sync

Conversation

@setchy

@setchy setchy commented Aug 31, 2026

Copy link
Copy Markdown
Member

Why

vite-plus, vite, vitest, and the @vitest/* family are version-coupled — vite-plus bundles/targets a specific vite/vitest release internally, and this project depends on the same real packages directly.

When they drift apart, pnpm loads two different vitest copies into the test workers, breaking every rejects/.resolves.toThrow() assertion.

This has already happened once on main (#3215, 152 test failures) and was narrowly avoided twice more by hand (#3224, #3226-era fix).

Two open Renovate PRs today — #3237 (@vitest/* → 4.1.11) and #3240 (vite-plus → 0.3.0) — could each merge independently and reproduce it a fourth time.

Supersedes #3237 and #3240.

What Changes

  • Dependency reconciliation — combined both PRs' intent and ran vp migrate, which went further than a manual fix would have: it aliased vite and vite-plus themselves to catalog references (not just @vitest/browser-playwright/@vitest/coverage-v8), making the pnpm catalog the single source of truth for the whole toolchain.
  • renovate.json — grouped vite-plus + vite + vitest + @vitest/** into one packageRules entry (same pattern as the existing @octokit/** group) so Renovate can never split them across PRs again. Added gitIgnoredAuthors for the new automation's commit identity.
  • New workflow (.github/workflows/renovate-vite-migrate.yml) — runs vp migrate --no-interactive on Renovate's grouped PR branch and pushes back any reconciliation, before human review. Triggers on changed dependency files rather than branch name (Renovate's grouped branch naming isn't confirmed yet).
  • New CI job (vite-toolchain-drift in lint.yml) — fails if vp migrate would produce a diff, catching drift from any source (Renovate or manual edit). Advisory only for now — not yet in required status checks, promote once proven stable across a few real PRs.
  • CONTRIBUTING.md — documented the coupling and why Mend's postUpgradeTasks/allowedCommands (the "native" alternative to the new workflow) wasn't pursued: it's a global, Mend-admin-only setting requiring an out-of-band request.

Signed-off-by: Adam Setch <adam.setch@outlook.com>
@setchy
setchy requested a review from afonsojramos as a code owner August 31, 2026 16:23
@github-actions github-actions Bot added the dependency Dependency updates label Aug 31, 2026
Comment thread .github/workflows/renovate-vite-migrate.yml Fixed
persist-credentials: false

- name: Setup Node.js
uses: ./.github/actions/setup-node

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this breaks our actionlint step

persist-credentials: true

- name: Setup Node.js
uses: ./.github/actions/setup-node

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this breaks our actionlint step

setchy added 2 commits August 31, 2026 12:32
… 0.3.0

- renovate-vite-migrate.yml: route github.event.pull_request.head.ref
  through an env var instead of interpolating it directly in a run:
  script (actionlint/zizmor script-injection finding)
- renovate-vite-migrate.yml, lint.yml: use GitHub's self-repository
  uses: $/... syntax instead of ./... for the local setup-node action
  (zizmor self-repository finding)
- AvatarWithFallback.tsx: oxlint 1.79.0 (bundled by vite-plus 0.3.0)
  now flags react(static-components) for selecting an icon component
  via a function call and rendering it as a dynamic JSX tag. Replaced
  with a small statically-declared component that renders a literal
  JSX element per userType branch.
- SystemSettings.tsx: oxlint now flags react(set-state-in-effect) for
  resetting liveModifierAccelerator synchronously inside an effect.
  Reset it at the point recording starts (the button's onClick) instead
  of synchronizing it via an effect.

Signed-off-by: Adam Setch <adam.setch@outlook.com>
…ort $/ yet

zizmor recommends GitHub's new self-repository uses: $/... syntax (added
July 2026), but the actionlint:1.7.12 container pinned in
.github/workflows/lint.yml predates it and errors with 'invalid format
because ref is missing'. actionlint is a required status check;
zizmor is advisory only (not in branch protection's required list), so
keep ./ for now. Revisit once actionlint's pin is upgraded to a version
that recognizes $/.

Signed-off-by: Adam Setch <adam.setch@outlook.com>
Comment thread src/renderer/components/settings/SystemSettings.tsx
Comment thread src/renderer/components/avatars/AvatarWithFallback.tsx
@sonarqubecloud

Copy link
Copy Markdown

@afonsojramos afonsojramos left a comment

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.

Thanks for digging into this. Seeing how much tooling is needed to keep Vite+ and its underlying dependencies aligned, I’d rather remove Vite+ and use Vite, Vitest, Oxlint, and Oxfmt directly. I don’t think the unified CLI provides enough value to justify the added coupling and maintenance. Happy to discuss tho!

@setchy

setchy commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Thanks for digging into this. Seeing how much tooling is needed to keep Vite+ and its underlying dependencies aligned, I’d rather remove Vite+ and use Vite, Vitest, Oxlint, and Oxfmt directly. I don’t think the unified CLI provides enough value to justify the added coupling and maintenance. Happy to discuss tho!

I tend to agree... It's headscratching that this is how vite-plus handles optional deps. Maybe once it hits v1 it'll have a better solution...

I have one final play in motion - having vp migrate allow listed for our orgs by Renovate, that was we can reliably run it as a post upgrade task in their workflow without all this hackery...

If that turns out to be a dead end, let's pivot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependency Dependency updates

Development

Successfully merging this pull request may close these issues.

3 participants