Skip to content

Upgrade to Next 16 / React 19 to clear security advisories - #18

Merged
acesonic7 merged 1 commit into
mainfrom
chore/security-upgrade
Oct 7, 2026
Merged

acesonic7 merged 1 commit into
mainfrom
chore/security-upgrade

Conversation

@acesonic7

Copy link
Copy Markdown
Owner

Why

npm audit on main reported 1 critical and 3 high vulnerabilities in production dependencies:

  • Next 14.2.35: denial of service via the Image Optimizer and RSC deserialization;
  • PostCSS (bundled with Next), nanoid and source-map-js.

Vitest 3 also pulled in a critical tinypool advisory in development.

What changes

Package From To
next 14.2.35 16.4.0
react / react-dom 18.3 19.3
postcss 8.5.12 8.5.29
vitest 3.2 5.0.3
@types/node ^20 ^22 (Vitest 5 needs it; CI already runs Node 22)
  • package-lock.json is regenerated. npm 11.0.0 crashed on the Vitest 5 peer set (edgesOut); npm 11.21 resolves it.
  • The lint script is removed. It was already broken (ESLint is not installed), and Next 16 dropped next lint.
  • tsconfig.json: Next 16's own changes (jsx: react-jsx, plus .next/dev/types).
  • React 19 type fixes: refs typed as RefObject<T | null>, JSX imported from react, and useRef given an initial value.

Audit after

  • npm audit --omit=dev: 0 vulnerabilities.
  • Full audit: 0 critical. The remaining 5 high and 2 moderate are all inside Tailwind CSS 3's build tooling (braces, micromatch, chokidar, fast-glob, postcss-selector-parser). They run only at build time on our own config, never in the browser or the server function. Clearing them needs the Tailwind 4 migration, which is a separate change.

Test plan

  • npx tsc --noEmit, npm test (1034 passed on Vitest 5), npm run build (Next 16, Turbopack)
  • Production build in the browser, with no console errors or warnings:
    • landing screen and example;
    • D-optimal generation in the Web Worker;
    • Studies dialog and J/K pager;
    • Qualtrics preview iframe;
    • Diagnostics and methods paragraph;
    • Fill levels.
  • LimeSurvey push route: its tests against a fake RemoteControl 2 server pass
  • CI and the Vercel preview build

🤖 Generated with Claude Code

Next 14.2.35 carried a critical and a high advisory, and its PostCSS, nanoid
and source-map-js versions carried high ones. This moves to Next 16.4, React
19.3, PostCSS 8.5.29 and Vitest 5 (Vitest 3 pulled in a critical tinypool
advisory), with @types/node 22 to match CI. Production dependencies now audit
clean. The broken `lint` script is removed (Next 16 dropped `next lint`), and
five spots get the React 19 ref and JSX type changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
utilitylab Ready Ready Preview Oct 7, 2026 2:06pm UTC

@acesonic7
acesonic7 merged commit d18f4f1 into main Oct 7, 2026
3 checks passed
@acesonic7
acesonic7 deleted the chore/security-upgrade branch October 7, 2026 14:13

This branch was successfully deployed

1 active deployment
Preview — 3da3c798 Deployed Oct 7, 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