Skip to content

Require Node 20 and move to Vitest 4.1.11 - #13

Merged
imanimanyara merged 2 commits into
mainfrom
chore/node-20-vitest-4
Oct 13, 2026
Merged

imanimanyara merged 2 commits into
mainfrom
chore/node-20-vitest-4

Conversation

@imanimanyara

@imanimanyara imanimanyara commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Fixes Dependabot alert GHSA-82fw-gwwq-j7x9 (Vitest, development scope). The patched release is 4.1.11, and no 3.x release is patched. Vitest 4 supports Node ^20 || ^22 || >=24, so Node 18 goes.

Changes

  • vitest and @vitest/coverage-v8: ^3.2.6 to ^4.1.11. Coverage-v8 4.1.11 peers on exactly vitest 4.1.11.
  • engines.node: >=18 to >=20. Node 18 reached end of life in April 2025.
  • CI test matrix: [18, 20, 22, 24] to [20, 22, 24].
  • README Install and docs/installation.md now state that the Node entry points and the CLI need Node.js 20 or later.
  • CHANGELOG: a Security entry for the Vitest bump, and a Changed entry recording that Node 18 support is dropped.

Verification (local, Node 22)

npm run lint, npm run typecheck, npm test (147 passed, 5 files) and npm run build all pass. The build output is unchanged.

CI installs with npm 11

The first run failed at npm install on Node 22, in both the test job and the visual job, with Cannot read properties of null (reading 'edgesOut'). This is npm/cli#9787: npm 10.9, which ships with Node 20 and 22, crashes in #loadPeerSet while resolving Vitest 4's optional peer set. A fresh install with no lockfile is enough to trigger it, and npm 11 resolves the same manifest.

Both jobs now run npm install -g npm@11 before installing. The alternative was legacy-peer-deps=true in .npmrc, which would skip peer resolution for everyone, so it was not used.

Contributors on Node 20 or 22 with npm 10.9 will hit the same crash locally. npm 10.8.2 resolved this manifest cleanly in a local test.

Vitest below 4.1.11 is affected by GHSA-82fw-gwwq-j7x9 and has no
patched 3.x release. Vitest 4 supports Node 20 or later, so the engines
floor rises from 18 (end of life) to 20 and CI drops its Node 18 leg.
Copilot AI balanced review requested due to automatic review settings October 13, 2026 13:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

npm 10, which Node 20 and 22 bundle, crashes building the ideal tree for
Vitest 4's optional peer set (npm/cli#9787). npm 11 resolves it.
@imanimanyara
imanimanyara merged commit fddd806 into main Oct 13, 2026
8 checks passed
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.

2 participants