Skip to content

Migrate from Jest to Vitest and resolve security vulnerabilities - #51

Merged
cgalvan merged 3 commits into
aws-geospatial:mainfrom
cgalvan:WHATNEXT
Jul 27, 2026
Merged

Migrate from Jest to Vitest and resolve security vulnerabilities#51
cgalvan merged 3 commits into
aws-geospatial:mainfrom
cgalvan:WHATNEXT

Conversation

@cgalvan

@cgalvan cgalvan commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

Resolved all open security vulnerabilities. The largest impact change of this was migrating to vitest instead of jest. Jest hasn't published an update in 4+ months and so has been accumulating many vulnerabilities, and vitest has surpassed them with 2x the monthly downloads, and we are already using it in many of our repos.

  • Replace jest/ts-jest with vitest@4.1.10 and @vitest/coverage-v8
  • Upgrade eslint 9 -> 10.8.0 (adds jiti peer dep), resolving all remaining brace-expansion CVEs
  • Upgrade @rollup/plugin-commonjs 26 -> 28 and typedoc 0.25 -> 0.28
  • Replace unmaintained npm-run-all with npm-run-all2
  • Remove jest.config.js, add vitest.config.ts with equivalent settings
  • Result: 0 npm audit vulnerabilities (down from 35)

Testing

Built/ran unit tests and linter locally. Also tested local polyline demo.

- Replace jest/ts-jest with vitest@4.1.10 and @vitest/coverage-v8
- Upgrade eslint 9 -> 10.8.0 (adds jiti peer dep), resolving all remaining brace-expansion CVEs
- Upgrade @rollup/plugin-commonjs 26 -> 28 and typedoc 0.25 -> 0.28
- Replace unmaintained npm-run-all with npm-run-all2
- Remove jest.config.js, add vitest.config.ts with equivalent settings
- Result: 0 npm audit vulnerabilities (down from 35)
@cgalvan
cgalvan requested a review from a team as a code owner July 27, 2026 16:56
cgalvan added 2 commits July 27, 2026 12:02
Drop EOL Node 18.x and 20.x from the build matrix and bump the
engines field in package.json to reflect the new minimum of Node 22.
Array.prototype.at() requires es2022. Now that Node 18/20 are dropped
and the minimum is Node 22, es2022 is a safe target.
@cgalvan
cgalvan merged commit caf81dc into aws-geospatial:main Jul 27, 2026
5 checks passed
@cgalvan
cgalvan deleted the WHATNEXT branch July 27, 2026 18:58
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.

4 participants