|
4 | 4 | // Unused exports, types, and duplicates are ratcheted by check:unused-exports, |
5 | 5 | // which reuses this config in the same knip pass. |
6 | 6 | "include": ["files", "dependencies", "unlisted", "unresolved"], |
7 | | - // knip's default, stated so it is a decision: no entry file's exports are reported. |
8 | | - // That keeps package `exports`/`main`/`bin` contracts (ts-sdk, emcn, cli, …) and framework |
9 | | - // entries (Next routes, Trigger tasks) public, and also exempts the other configured entries |
10 | | - // (scripts, `*.integration.ts`, `background/**`, desktop and SDK examples). |
11 | | - "includeEntryExports": false, |
| 7 | + // On by default: every workspace's `exports` map serves only this monorepo, so an entry export |
| 8 | + // no workspace imports is dead. The workspaces below turn it off because their entries are |
| 9 | + // public or standalone: the apps (framework entries such as Next routes and Trigger tasks), the |
| 10 | + // published packages (cli, sim-cli, sim-setup, ts-sdk), db (standalone scripts), and the root |
| 11 | + // (scripts). A new private package is checked without opting in. |
| 12 | + "includeEntryExports": true, |
12 | 13 | "workspaces": { |
13 | 14 | ".": { |
| 15 | + "includeEntryExports": false, |
14 | 16 | "entry": ["scripts/**/*.{ts,tsx}", "vitest.shared.ts"], |
15 | 17 | "paths": { "@/*": ["./apps/sim/*"] }, |
16 | 18 | // This alias selects the native tsc binary; see check-native-typecheck.ts. |
17 | 19 | "ignoreDependencies": ["@typescript/native"] |
18 | 20 | }, |
19 | 21 | "apps/sim": { |
| 22 | + "includeEntryExports": false, |
20 | 23 | "entry": [ |
21 | 24 | // Container bootstrap and Trigger's directory-discovered task graph. |
22 | 25 | "bootstrap.ts", |
|
69 | 72 | // Live test spawns this path with cwd=MSHIP_WORKER_ROOT (a sibling repo). |
70 | 73 | "ignoreUnresolved": ["tools/probes/src/controller-run-read.ts"] |
71 | 74 | }, |
72 | | - "apps/realtime": { "entry": ["src/bootstrap.ts"] }, |
| 75 | + "apps/realtime": { "includeEntryExports": false, "entry": ["src/bootstrap.ts"] }, |
73 | 76 | "apps/desktop": { |
| 77 | + "includeEntryExports": false, |
74 | 78 | // scripts/build.ts and e2e/updater.spec.ts supply these to esbuild by path. |
75 | 79 | "entry": [ |
76 | 80 | "src/main/index.ts", |
|
83 | 87 | // ensure-pty-prebuilds.ts assembles these package names for universal builds. |
84 | 88 | "ignoreDependencies": ["@lydell/node-pty-darwin-arm64", "@lydell/node-pty-darwin-x64"] |
85 | 89 | }, |
| 90 | + "apps/docs": { "includeEntryExports": false }, |
| 91 | + "apps/pii": { "includeEntryExports": false }, |
| 92 | + "packages/cli": { "includeEntryExports": false }, |
86 | 93 | "packages/db": { |
| 94 | + "includeEntryExports": false, |
87 | 95 | "entry": [ |
88 | 96 | "scripts/*.ts", |
89 | 97 | "script-migrations/*.ts", |
90 | 98 | "**/*.integration.ts", |
91 | 99 | "vitest.integration.setup.ts" |
92 | 100 | ] |
93 | 101 | }, |
94 | | - "packages/sim-cli": { |
95 | | - "entry": ["src/index.ts", "src/runtime.ts", "scripts/*.ts"] |
96 | | - }, |
97 | | - "packages/ts-sdk": { "entry": ["examples/*.ts"] }, |
98 | 102 | // The contract audit reads this snapshot by filename. |
99 | 103 | // Generated, so its export surface is not ratcheted either. |
100 | 104 | "packages/desktop-bridge": { |
101 | 105 | "entry": ["contract-snapshot.ts"], |
102 | 106 | "ignoreIssues": { "contract-snapshot.ts": ["exports", "types", "duplicates"] } |
103 | 107 | }, |
| 108 | + "packages/sim-cli": { |
| 109 | + "includeEntryExports": false, |
| 110 | + "entry": ["src/index.ts", "src/runtime.ts", "scripts/*.ts"] |
| 111 | + }, |
| 112 | + "packages/sim-setup": { "includeEntryExports": false }, |
| 113 | + "packages/ts-sdk": { "includeEntryExports": false, "entry": ["examples/*.ts"] }, |
104 | 114 | // This shared config is consumed by apps that own the Next dependency. |
105 | 115 | "packages/tsconfig": { "ignoreUnresolved": ["next"] } |
106 | 116 | } |
|
0 commit comments