Skip to content

Commit d719e9d

Browse files
Boshenclaude
andcommitted
test: add tests for tsconfig include/exclude/files support
Add comprehensive test suite for TypeScript's include, exclude, and files fields from tsconfig.json. Tests are ported from vite-tsconfig-paths. This is part of implementing issue #764 to support include/exclude/files for Vite/Rolldown integration. Test Coverage: - Basic include pattern matching (src/**/*.ts) - Exclude pattern filtering (**/*.test.ts) - Files field priority over exclude - Default include/exclude values - ${configDir} template variable substitution - Extends inheritance behavior - Empty files/include arrays - Globstar (**) and wildcard (*) patterns - Character sets ([A-Z]*.ts) - Monorepo patterns (packages/*/src/**) - Project references with include/exclude - Paths outside project root - outDir auto-exclusion - Complex multi-glob patterns - Case sensitivity handling Fixtures: - 19 test fixture directories with tsconfig.json and source files - Covers real-world patterns from vite-tsconfig-paths Tests currently fail as expected (TDD approach) - implementation follows. Related: #764 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9de3088 commit d719e9d

File tree

87 files changed

+857
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+857
-2
lines changed

Cargo.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ name = "resolver"
7878

7979
[dependencies]
8080
cfg-if = "1"
81+
fast-glob = "1.0.0"
8182
indexmap = { version = "2", features = ["serde"] }
8283
json-strip-comments = "3"
8384
once_cell = "1" # Use `std::sync::OnceLock::get_or_try_init` when it is stable.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const excluded = "excluded";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const index = "index";
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"include": ["src/**/*.ts"],
3+
"exclude": ["excluded"]
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const upper = "upper";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"include": ["src/**/*.ts"]
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const app2 = "app2";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const button2 = "button2";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"include": ["[A-Z]*.ts"]
3+
}

0 commit comments

Comments
 (0)