Skip to content

Fixes: 10697 - #10705

Merged
sheremet-va merged 2 commits into
vitest-dev:mainfrom
hitenkalda:fix/typecheck-crash
Jul 29, 2026
Merged

sheremet-va merged 2 commits into
vitest-dev:mainfrom
hitenkalda:fix/typecheck-crash

Conversation

@hitenkalda

Copy link
Copy Markdown
Contributor

Fixes #10697 by preventing vitest --typecheck from reporting a false success when the tsc process crashes (e.g. due to running out of memory).

The issue occurred because on POSIX systems an OOM terminates tsc with SIGABRT, leaving exitCode as null. Since the existing check only inspected exitCode, signal-terminated processes were incorrectly treated as successful.

This change adds support for detecting signal-based exits, updates the typecheck worker to fail when tsc exits with a non-zero code or is terminated by a signal, and provides a clearer error message for OOM crashes while preserving the existing behavior for normal non-zero exits. It also includes a cross-platform regression test that simulates an OOM using process.abort().

The new regression test passes with the fix and fails without it, while the existing TypeScript test suite, lint checks, and build all continue to pass.

…se green

When tsc crashes with SIGABRT (e.g. OOM), exitCode is null and the existing guard only checked checker.getExitCode(), so the run was incorrectly reported as passing with no errors on POSIX systems.

Fixes vitest-dev#10697
@netlify

netlify Bot commented Jul 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit bfa145e
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6a47a63594a7ed0008399250
😎 Deploy Preview https://deploy-preview-10705--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va
sheremet-va merged commit a1b0565 into vitest-dev:main Jul 29, 2026
27 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--typecheck reports "no type errors" (exit 0) when the tsc child process runs out of memory

2 participants