chore(deps): upgrade vitest to 4.1.11 and vite to 8.2.2 (alternative to #792 — not ready to merge) by Portll · Pull Request #793 · vercel/satori · GitHub
Skip to content

chore(deps): upgrade vitest to 4.1.11 and vite to 8.2.2 (alternative to #792 — not ready to merge) - #793

Open
Portll wants to merge 1 commit into
vercel:mainfrom
Portll:deps/vitest-4-vite-8
Open

Portll wants to merge 1 commit into
vercel:mainfrom
Portll:deps/vitest-4-vite-8

Conversation

@Portll

@Portll Portll commented Aug 26, 2026 •

Copy link
Copy Markdown

This is an alternative to #792 and I'm not proposing it for merge in its current state. I'm opening it so the tradeoff is visible and reviewable (and so the branch exists).

What it achieves

Where #792 clears 11 of 18, this clears all 18:

vite advisories:   18 → 0
whole lockfile:    94 → 65

vitest 0.32 → 4.1.11, explicit vite ^8.2.2 devDependency, @types/node ^16 → ^22, and engines.node → ^20.19.0 || >=22.12.0.

Why I'm not proposing it

vitest 4 changed the image-snapshot key — the duplicated path segment is gone:

old: basic-test-tsx-test-basic-test-tsx-basic-should-combine-text-nodes-correctly-1-snap.png
new: basic-test-tsx-basic-should-combine-text-nodes-correctly-1-snap.png

None of the 498 committed baselines match. The first run writes 487 new ones and reports 512 passing; the corpus goes 498 → 985.

What worries me is that it's invisible afterwards. The second run writes nothing and passes clean, because it now matches baselines it generated itself. CI on a cold checkout goes green; on a warm one, green. There's no point where a human sees a failure.

I checked by mutation rather than by reading output — corrupting one of the committed baselines:

branch result
#792 (vitest 0.32) 1 failed | 511 passed — the baseline is being compared
this branch 55 passed | 512 passed — it isn't

For a renderer, that corpus is the test suite. Trading it for a scanner number looks like a bad deal, especially when nothing in the 18 is reachable here anyway.

What it would take

Regenerating all 498 baselines and reviewing them image by image, as its own reviewed commit — not folded into a dependency bump, where the green would hide it. Or a snapshot-resolver shim preserving the old keys, which I haven't attempted.

Two small things:

  1. esbuild options silently stop working. Vite 8 transforms with oxc, so esbuild: { jsxDev: false } — the fix used in chore(deps): pin vite to 4.5.14 — clears 11 advisories including a KEV #792 — becomes a no-op with only a console warning: "Both esbuild and oxc options were set. oxc options will be used and esbuild options will be ignored." The equivalent is oxc.jsx.development.
  2. pnpm installs vitest 4 against an unsatisfiable peer. vitest 4 takes vite as a peer requiring ^6 || ^7 || ^8; pnpm bound it to the already-locked vite@4.0.4 and installed anyway, warning only. An explicit vite devDependency is what forced a supported version.

Verification

pnpm install, pnpm test (55/55, 512), pnpm build:default all clean; osv-scanner reports 0 vite advisories — plus the snapshot caveat above, hence the PR.

If you’d rather close this and leave #792 standing, that makes sense too.

Alternative to the vite 4.5.14 override. Clears all 18 vite advisories rather
than 11, at the cost of a Node floor bump and -- importantly -- the image
snapshot corpus.

vitest 4 changed the snapshot key: the duplicated path segment is gone, so
    old: basic-test-tsx-test-basic-test-tsx-basic-should-...-1-snap.png
    new: basic-test-tsx-basic-should-...-1-snap.png
None of the 498 committed baselines match. The first run writes 487 fresh ones
and reports 512 passing; the corpus goes 498 -> 985. Every run after that is
green and writes nothing, because it now matches baselines it generated itself.

Verified by mutation rather than by reading: corrupting a committed baseline
still passes 55/55. The visual regression suite stops comparing while staying
green.

This branch is therefore NOT proposed for merge as-is. It needs the 498
baselines regenerated and reviewed image by image, as a separate commit.
@Portll
Portll requested a review from shuding as a code owner August 26, 2026 11:05
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
satori-playground Canceled Canceled v0 Aug 26, 2026 11:05am

@vercel vercel Bot 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.

Additional Suggestion:

CI test job matrix still includes Node.js 18, which is incompatible with the new engines requirement and Vite 8 / Vitest 4, so the Node 18 job will fail.

Fix on Vercel

@socket-security

Copy link
Copy Markdown

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​vitest/​ui@​4.1.11991007599100
Addednpm/​@​vitest/​coverage-v8@​4.1.11991007999100
Addednpm/​vitest@​4.1.11981007999100
Addednpm/​@​types/​node@​22.20.11001008196100
Addednpm/​vite@​8.2.2981008297100

View full report

@Portll Portll changed the title chore(deps): upgrade vitest to 4.1.11 and vite to 8.2.2 (alternative to #NNN — not ready to merge) chore(deps): upgrade vitest to 4.1.11 and vite to 8.2.2 (alternative to #792 — not ready to merge) Aug 26, 2026

This branch was previously deployed

1 inactive deployment
Preview — 4743b8be Deployed Aug 26, 2026 by vercel[bot]
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