Skip to content

fix: stop hanging project typechecks - #11064

Open
christopher-buss wants to merge 2 commits into
vitest-dev:mainfrom
christopher-buss:fix/typechecker-watch-9494
Open

fix: stop hanging project typechecks#11064
christopher-buss wants to merge 2 commits into
vitest-dev:mainfrom
christopher-buss:fix/typechecker-watch-9494

Conversation

@christopher-buss

Copy link
Copy Markdown

Description

Closes #9494 - vitest run hanging after successful project typechecking and leaving an orphaned tsc or tsgo --watch process.

Project configs previously resolved watch from configDefaults instead of inheriting the root configuration. In an interactive terminal, this produced watch: false at the root but watch: true in the project, causing the typechecker to start in watch mode during vitest run.

This PR:

  • propagates the root watch value to project configs
  • destroys the typechecker output streams during shutdown
  • terminates the complete process tree on Windows
  • uses a detached process group for tree termination on other platforms
  • adds regression coverage for project configuration and process cleanup

The terminal-specific behavior was also verified using a forced interactive-terminal reproduction. After the fix, both root and project resolve watch: false, Vitest exits normally, and no watched typechecker process remains.

AI-assisted by Codex and reviewed using Claude Opus + a human (myself)!

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

christopher-buss and others added 2 commits August 25, 2026 20:01
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 39cfff5
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6a8e28ba75f0370008f88c70
😎 Deploy Preview https://deploy-preview-11064--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.

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.

Hanging process in test project with typecheck enabled on windows

1 participant