Skip to content

chore(deps): upgrade vitest 1.4.0 -> 5.1.1 - #2144

Open
tac0turtle wants to merge 2 commits into
dydxprotocol:mainfrom
tac0turtle:chore/deps-vitest-5-upstream
Open

tac0turtle wants to merge 2 commits into
dydxprotocol:mainfrom
tac0turtle:chore/deps-vitest-5-upstream

Conversation

@tac0turtle

Copy link
Copy Markdown

Changes

  • vitest 1.4.0 -> 5.1.1. This clears two critical advisories:

    • <1.6.1: RCE when visiting a malicious site while vitest is running.
    • <3.2.6: arbitrary file read and exec via the UI server.

    The test files needed no changes.

Depends on #2142. vitest 5 requires Node >=22.12, and CI currently runs Node 18. This branch is stacked on #2142's commit (ci: use .nvmrc), so until #2142 merges this PR shows two commits. Merge #2142 first, after which only the vitest commit remains.

Follow-up: @ladle/react 4 still pulls in a vulnerable Vite 5.4.20. That's dev-only, and it's a separate upgrade.

Verification

  • pnpm install --frozen-lockfile --ignore-scripts (the CI install path): OK
  • vitest run on 5.1.1 under Node 24.12: 14 files, 110 tests pass
  • tsc --noEmit: clean, pnpm lint: 0 errors

The lockfile is in v6 format. If #2141 (pnpm 10) merges first, this branch needs its lockfile regenerated under pnpm 10.

Issue

Four workflows ran Node 18 (EOL) and commitlint ran 22, while
package.json engines and .nvmrc require 24. The deploy workflows run
vite build, and Vite 7 needs Node >=20.19, so they could not build on 18.

Read the version from .nvmrc via setup-node's node-version-file so CI
cannot drift from the repo's declared runtime again.
vitest <1.6.1 allows RCE when visiting a malicious site while the dev
server runs (critical), and <3.2.6 allows arbitrary file read/exec via
the UI server (critical). No test changes needed.

vitest 5 requires Node >=22.12; CI moves to Node 24 in the preceding
commit (ci: use .nvmrc).
@tac0turtle
tac0turtle requested review from a team as code owners November 20, 2026 13:31
@vercel

vercel Bot commented Nov 20, 2026

Copy link
Copy Markdown

@tac0turtle is attempting to deploy a commit to the dYdX Trading Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant