Skip to content

build(deps): move the web UI to Vite 7 and Vitest 4 - #647

Merged
haksungjang merged 1 commit into
mainfrom
chore/vite7-vitest4
Aug 8, 2026
Merged

build(deps): move the web UI to Vite 7 and Vitest 4#647
haksungjang merged 1 commit into
mainfrom
chore/vite7-vitest4

Conversation

@haksungjang

Copy link
Copy Markdown
Member

Seven of the eight advisories npm audit reported on this tree came from the build toolchain, and none could be fixed alone.

before after
vite 5.4.21 7.3.6
vitest 2.1.9 4.1.10
@vitest/coverage-v8 2.1.9 4.1.10
esbuild (transitive) 0.21.5 0.28.1
npm audit 8 (2 critical, 3 high, 3 moderate) 1 high

What each one was:

  • vitest ≤3.2.5 (critical) — with the Vitest UI server listening, an arbitrary file can be read and executed. Needs a major.
  • vite ≤6.4.2 (high) — path traversal in optimized-deps .map handling, server.fs.deny bypass on Windows alternate paths, launch-editor NTLM disclosure. Needs a major.
  • esbuild ≤0.24.2 (moderate) — any website can send requests to the dev server and read the response. Fixed by the Vite that depends on it, not on its own.

Vite 7, not 8. 7.3.6 is past every advisory range, and @vitejs/plugin-react@4.7.0 already lists ^7 as an accepted peer — so the plugin stays put. Vite 8 would have dragged it along (plugin-react 6 peers ^8 only). One major instead of two, with less to break.

Node. Vite 7 wants ^20.19 || >=22.12. The image build stage is node:26-alpine and the pinned Playwright container is Node 24.17. Both clear it.

Nothing else moved. All 33 visual baselines pass unchanged — the toolchain bump did not alter a pixel — along with 90 Playwright tests and 315 unit tests.

Coverage thresholds are re-baselined, not relaxed. Vitest 4's v8 provider remaps coverage through the AST rather than counting raw v8 ranges, so the same tests over the same code measure branches at 69.38% (was 82%) and functions at 81.79% (was 88%). Nothing stopped being tested. The new thresholds sit just under the new measurement exactly as the old ones sat under the old, and the config comment records why.

One advisory left. nanoid — the fix shipped five days ago. We do not call nanoid, and pulling a release that fresh to fix a defect we cannot reach trades a real supply-chain risk for a theoretical one. Dependabot security updates were switched on for this repository today and will bring it once it has aged.

Local gates: build, typecheck, 315 unit tests, coverage thresholds, 90 Playwright UI tests, 33 visual baselines, token lint, i18n coverage, lib-test-gate, third-party notices (23 bundled packages, all with license text).

@haksungjang haksungjang added the run-heavy-e2e Opt this PR into the heavy e2e suites (full-e2e, docs-walkthrough) label Aug 8, 2026
Seven of the eight advisories `npm audit` reported on this package tree
came from the build toolchain, and none of them could be fixed on its
own: esbuild's dev-server CORS issue is fixed by the Vite that depends on
it, and Vite's own path-traversal and Windows `server.fs.deny` bypass
need a major. Vitest's was the serious one — with its UI server
listening, an arbitrary file can be read and executed — and that needs a
major too.

Vite 7 rather than 8: 7.3.6 is past every advisory range, and
@vitejs/plugin-react 4.7.0 already accepts it as a peer, so the plugin
stays where it is. Vite 8 would have taken the plugin with it.

Nothing else moved. The build output is byte-identical enough that all
thirty-three visual baselines pass unchanged, the ninety Playwright tests
pass, and the 315 unit tests pass.

Coverage thresholds are re-baselined, not lowered in spirit: Vitest 4's
v8 provider remaps through the AST instead of counting raw v8 ranges, so
the same tests over the same code measure branches at 69.38% where they
measured 82%, and functions at 81.79% where they measured 88%. The
comment in the config says so, and the new numbers sit just under the new
measurement exactly as the old ones sat under the old.

One advisory is left: nanoid, whose fix shipped five days ago. We do not
call nanoid, and taking a release that fresh to fix a defect we cannot
reach is the wrong trade. Dependabot security updates are on now and will
bring it when it has aged.
@haksungjang
haksungjang force-pushed the chore/vite7-vitest4 branch from 1e2ca06 to f6cf130 Compare August 8, 2026 13:49
@haksungjang
haksungjang merged commit c6c425b into main Aug 8, 2026
41 checks passed
@haksungjang
haksungjang deleted the chore/vite7-vitest4 branch August 8, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-heavy-e2e Opt this PR into the heavy e2e suites (full-e2e, docs-walkthrough)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant