Skip to content

Commit 409dcd2

Browse files
committed
chore(gate): drive the dead-export guard with knip, drop ts-prune
ts-prune has been unmaintained since 2022 and pulls ts-morph@13 plus a hand-rolled output parser that false-positived on satisfies/boolean/ Record narrowing and could not resolve path-alias fan-in. The guard unions knip's default scan with a production agent-workspace scan (knip.agents.json; --production ignores test-file consumers so the director surface stays enforced); parsing is fail-closed and config carries no spawn args, so the tsPruneArgs race is gone. Allowlist semantics are unchanged. Entries go 70 to 83: 42 superseded ts-prune artifacts removed; tax entries added for 22 consumer-less exports plus 4 unreachable files (owner-reason blocks, pending cleanup lanes) and the 29 director-surface names consumed only by workspace package tests. Deleting them belongs to the cleanup lanes.
1 parent f6e5b93 commit 409dcd2

8 files changed

Lines changed: 861 additions & 401 deletions

‎bun.lock‎

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

‎knip.agents.json‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@6/schema.json",
3+
"entry": [
4+
"src/index.ts",
5+
"src/tui/smoke.ts",
6+
"scripts/*.ts",
7+
"e2e/*.test.ts",
8+
"evals/*.ts"
9+
],
10+
"project": [
11+
"src/**/*.ts",
12+
"testkit/**/*.ts",
13+
"packages/**/*.ts",
14+
"e2e/**/*.ts",
15+
"evals/**/*.ts",
16+
"scripts/**/*.ts",
17+
"agents/**/*.ts",
18+
"vendor/**/*.ts"
19+
],
20+
"workspaces": {
21+
"agents/*": {
22+
"entry": ["src/index.ts!"],
23+
"project": ["src/**/*.ts!"]
24+
}
25+
},
26+
"includeEntryExports": true,
27+
"rules": {
28+
"exports": "error",
29+
"types": "error",
30+
"files": "error",
31+
"enumMembers": "error",
32+
"namespaceMembers": "error",
33+
"nsExports": "off",
34+
"nsTypes": "off",
35+
"duplicates": "off",
36+
"cycles": "off"
37+
},
38+
"ignoreExportsUsedInFile": true
39+
}

‎knip.json‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@6/schema.json",
3+
"entry": [
4+
"src/index.ts",
5+
"src/tui/smoke.ts",
6+
"scripts/*.ts",
7+
"e2e/*.test.ts",
8+
"evals/*.ts"
9+
],
10+
"project": [
11+
"src/**/*.ts",
12+
"testkit/**/*.ts",
13+
"packages/**/*.ts",
14+
"e2e/**/*.ts",
15+
"evals/**/*.ts",
16+
"scripts/**/*.ts",
17+
"agents/**/*.ts",
18+
"vendor/**/*.ts"
19+
],
20+
"includeEntryExports": true,
21+
"rules": {
22+
"exports": "error",
23+
"types": "error",
24+
"files": "error",
25+
"enumMembers": "error",
26+
"namespaceMembers": "error",
27+
"nsExports": "off",
28+
"nsTypes": "off",
29+
"duplicates": "off",
30+
"cycles": "off"
31+
},
32+
"ignoreExportsUsedInFile": true
33+
}

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@
118118
"devDependencies": {
119119
"@intx/inference-testing": "0.3.0",
120120
"@types/bun": "1.4.3",
121+
"knip": "^6.41.0",
121122
"oxfmt": "^0.73.0",
122123
"oxlint": "^1.88.0",
123-
"ts-prune": "0.10.3",
124124
"typescript": "5.9.3",
125125
"typescript-language-server": "^4.3.4",
126126
"ws": "^8.21.0"

0 commit comments

Comments
 (0)