Skip to content

Update TypeScript and Vite, use Vitest for tests - #445

Merged
dmarcos merged 3 commits into
sparkjsdev:mainfrom
mrxz:update-dev-dependencies
Sep 21, 2026
Merged

dmarcos merged 3 commits into
sparkjsdev:mainfrom
mrxz:update-dev-dependencies

Conversation

@mrxz

@mrxz mrxz commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

This PR updates several of the devDependencies, mainly motivated by the goal of updating TypeScript, where the other changes followed naturally:

  • TypeScript updated to version 7.0.2
  • Newer version of Vite required for TypeScript 7
  • Updated version of vite-plugin-glsl needed for Vite 7+ support
  • vite-plugin-dts can be made to work, but effectively requires including TS 6.X as well, instead replaced with native tsc
  • ts-node does not work with TypeScript 7.0.2 (ts-node doesn't work with Typescript 7.0.2 TypeStrong/ts-node#2174), replaced with Vitest for unit tests

Removing vite-plugin-dts has several benefits, as it turns out this was a good chunk of the build time (~90%), additionally it was performed for both dev and production builds. The output of tsc is near identical, only differing in things like used quotes and order of properties/types (see mrxz@5383545).

Adding Vitest to replace the ts-node based "test runner" is up for debate. I do think a proper testing framework makes sense over raw node asserts, but it doesn't have to be Vitest. Given Vite is already used though, it is a natural choice IMHO.

@oscarlorentzon oscarlorentzon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good overall, and Vitest is a reasonable choice with Vite already in use.

Comment thread tsconfig.json Outdated
@dmarcos

dmarcos commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@dmarcos
dmarcos merged commit f92685f into sparkjsdev:main Sep 21, 2026
2 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.

3 participants