Skip to content

Replace jest with vitest, ts-node with tsx, upgrade eslint 10#96

Merged
bh2smith merged 2 commits into
mainfrom
bh2smith/pla-2049-step-2-major-dependency-updates-eslint-10-replace-jest-ts
May 5, 2026
Merged

Replace jest with vitest, ts-node with tsx, upgrade eslint 10#96
bh2smith merged 2 commits into
mainfrom
bh2smith/pla-2049-step-2-major-dependency-updates-eslint-10-replace-jest-ts

Conversation

@bh2smith
Copy link
Copy Markdown
Member

@bh2smith bh2smith commented May 5, 2026

Summary

  • Replace jest with vitest — removes jest, ts-jest, @types/jest (and their vulnerable transitive deps: picomatch, handlebars). Vitest runs in globals mode so no test file imports needed; migrated the one jest.mock/jest.fn usage to vi.mock/vi.fn.
  • Replace ts-node with tsx — removes the vulnerable diff transitive dependency.
  • Upgrade eslint 9 → 10 — resolves minimatch, ajv, brace-expansion vulnerabilities. Added pnpm.overrides for flatted>=3.4.2 since eslint 10 still ships a stale transitive version.
  • pnpm audit now reports 0 vulnerabilities (down from 22 open Dependabot alerts at the start of PLA-2016)

Net result: -2,089 lines of lockfile, 0 audit findings.

Test plan

  • pnpm run build passes
  • pnpm run lint passes (eslint 10, no config changes needed)
  • All 3 unit test suites pass under vitest
  • E2E tests run (fail only due to missing API key, same as before)
  • pnpm audit returns clean

Resolves https://linear.app/dune/issue/PLA-2049

- Remove jest, ts-jest, @types/jest, ts-node
- Add vitest (with globals mode) and tsx
- Upgrade eslint 9 → 10
- Override flatted to >=3.4.2 to fix remaining eslint transitive vuln
- Migrate jest.mock/jest.fn to vi.mock/vi.fn in deprecation test
- pnpm audit now reports 0 vulnerabilities
Vitest deprecated the done() callback pattern. Convert all
beforeEach(done => setTimeout(done, 1000)) to async promise-based waits.
@bh2smith bh2smith merged commit 698f1ff into main May 5, 2026
2 checks passed
@bh2smith bh2smith deleted the bh2smith/pla-2049-step-2-major-dependency-updates-eslint-10-replace-jest-ts branch May 5, 2026 15:03
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