Skip to content

Replace karma-typescript with karma-esbuild - #301

Closed
keichi wants to merge 1 commit into
masterfrom
replace-karma-typescript
Closed

keichi wants to merge 1 commit into
masterfrom
replace-karma-typescript

Conversation

@keichi

@keichi keichi commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Replace the unmaintained karma-typescript (last release 2023) with karma-esbuild for npm run test:browser.
  • Polyfill the Node built-ins used by the tests (Buffer, assert, zlib) with esbuild-plugin-polyfill-node.

Why

karma-typescript runs out of memory (heap OOM) with TypeScript >= 5.3, so TypeScript can't be upgraded past 5.2 while it's in use. TypeScript itself is unchanged in this PR; the upgrade will come in a separate PR.

Testing

  • npm run test:browser (ChromeHeadless): 166 SUCCESS
  • npm test on Node 20: 166 passing

Note

esbuild requires Node >= 18, but the test-nodejs matrix (Node 16) and the publish workflow (Node 14) still run npm ci. Since engines is only a warning, npm ci should still succeed there. I haven't verified this; CI will show it.

karma-typescript is unmaintained since 2023 and runs out of memory with
TypeScript >= 5.3, which blocks upgrading TypeScript. Bundle tests with
esbuild instead and polyfill Node built-ins (Buffer, assert, zlib) with
esbuild-plugin-polyfill-node.
@keichi
keichi force-pushed the replace-karma-typescript branch from 2e6ad84 to 7f2844c Compare October 15, 2026 13:47
@keichi

keichi commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

Closing: karma itself is deprecated and esbuild-plugin-polyfill-node is archived. Migrating to Vitest instead (Node tests first, then browser tests).

@keichi keichi closed this Oct 15, 2026
@keichi
keichi deleted the replace-karma-typescript branch October 15, 2026 13:56
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.

1 participant