Skip to content

fix: resolve ancestor tsconfig for excluded nearest config#904

Merged
graphite-app[bot] merged 1 commit into
mainfrom
c/04-23-fix_resolve_ancestor_tsconfig_for_excluded_nearest_config
Apr 23, 2026
Merged

fix: resolve ancestor tsconfig for excluded nearest config#904
graphite-app[bot] merged 1 commit into
mainfrom
c/04-23-fix_resolve_ancestor_tsconfig_for_excluded_nearest_config

Conversation

@camc314

@camc314 camc314 commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

camc314 commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

How to use the Graphite Merge Queue

Add the label 0-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camc314 camc314 marked this pull request as ready for review April 23, 2026 10:22
Copilot AI review requested due to automatic review settings April 23, 2026 10:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes tsconfig resolution so that when the nearest tsconfig.json excludes a file, the resolver can fall back to an ancestor tsconfig.json (regression covered by voidzero-dev/vite-plus#1443).

Changes:

  • Update TsConfigResolver to continue searching ancestor configs when GetAncestorConfigFileName yields no result.
  • Add a Go regression unit test covering “nearest config excludes file” behavior for both sequential and parallel resolution.
  • Add an e2e fixture + snapshot test to ensure semantic linting runs without diagnostics in the reproduced scenario.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/utils/find_tsconfig.go Adjusts ancestor tsconfig lookup to handle “nearest config excludes file” by computing the next ancestor config.
internal/utils/find_tsconfig_test.go Adds regression test ensuring resolver returns the ancestor/root config when the nearest config excludes the file.
e2e/snapshot.test.ts Adds an e2e test asserting no diagnostics when nearest tsconfig excludes the file.
e2e/fixtures/issue-vp-1443/tsconfig.json Adds root fixture tsconfig enabling Node typing for semantic checks.
e2e/fixtures/issue-vp-1443/packages/cli/tsconfig.json Adds nested fixture tsconfig that excludes all files to reproduce the bug.
e2e/fixtures/issue-vp-1443/packages/cli/src/utils/terminal.ts Adds fixture TS file used by the e2e regression test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/utils/find_tsconfig_test.go Outdated
Comment thread internal/utils/find_tsconfig.go Outdated
@camc314 camc314 self-assigned this Apr 23, 2026

camc314 commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

@graphite-app graphite-app Bot force-pushed the c/04-23-fix_resolve_ancestor_tsconfig_for_excluded_nearest_config branch from 1fcd8dc to e75dc0e Compare April 23, 2026 10:38
@graphite-app graphite-app Bot merged commit e75dc0e into main Apr 23, 2026
9 checks passed
@graphite-app graphite-app Bot removed the 0-merge label Apr 23, 2026
@graphite-app graphite-app Bot deleted the c/04-23-fix_resolve_ancestor_tsconfig_for_excluded_nearest_config branch April 23, 2026 10:45
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.

bug(check): vp check --fix <single-file> spurious TS2591 "Cannot find name 'node:X'" for some files

2 participants