What happened?
Bun-native test files under packages/cli/test-bun/ are not covered by npm run typecheck.
packages/cli/tsconfig.json has an include list of only index.ts and src/**, so nothing in test-bun/ is ever fed to tsc --noEmit. The same applies to packages/agents/test-bun/.
What did you expect to happen?
Type errors in Bun test files should fail npm run typecheck like any other TypeScript in the repo.
Anything else we need to know?
Practical impact today is limited but real: these files import production types (TextBuffer, Key, InputHandlerDeps, KeyBinding, …). If a production interface changes shape, a stale test fixture will not be flagged by typecheck. It will still fail at runtime under bun test, so the error surfaces — just later and with a worse message than a type error would give.
Affected directories:
packages/cli/test-bun/ — settingsStorage.bun.ts, iContentToHistoryItems.issue2511.bun.ts, steerKey.win32.bun.ts, steerKey.darwin.bun.ts, steerKey.fixture.ts, resolveKeyBindings.bun.ts
packages/agents/test-bun/ — generatingModelStamp.issue2511.bun.ts, subagentAnthropicTextSettings.issue1738.bun.ts
Two options:
- Add
test-bun/**/*.ts to each package's tsconfig include. Needs bun-types available so bun:test imports resolve, and the files sit outside rootDir so that may need adjusting.
- Add a dedicated
tsconfig.test-bun.json per package and wire it into the typecheck script as a second tsc --noEmit -p pass. Keeps the build tsconfig clean.
Option 2 is probably tidier given the rootDir constraint.
Note this is pre-existing — test-bun/ has never been typechecked. Raised while working #2951 / #2992, where new files were added to that directory and the gap was noticed during review.
What happened?
Bun-native test files under
packages/cli/test-bun/are not covered bynpm run typecheck.packages/cli/tsconfig.jsonhas anincludelist of onlyindex.tsandsrc/**, so nothing intest-bun/is ever fed totsc --noEmit. The same applies topackages/agents/test-bun/.What did you expect to happen?
Type errors in Bun test files should fail
npm run typechecklike any other TypeScript in the repo.Anything else we need to know?
Practical impact today is limited but real: these files import production types (
TextBuffer,Key,InputHandlerDeps,KeyBinding, …). If a production interface changes shape, a stale test fixture will not be flagged by typecheck. It will still fail at runtime underbun test, so the error surfaces — just later and with a worse message than a type error would give.Affected directories:
packages/cli/test-bun/—settingsStorage.bun.ts,iContentToHistoryItems.issue2511.bun.ts,steerKey.win32.bun.ts,steerKey.darwin.bun.ts,steerKey.fixture.ts,resolveKeyBindings.bun.tspackages/agents/test-bun/—generatingModelStamp.issue2511.bun.ts,subagentAnthropicTextSettings.issue1738.bun.tsTwo options:
test-bun/**/*.tsto each package's tsconfiginclude. Needsbun-typesavailable sobun:testimports resolve, and the files sit outsiderootDirso that may need adjusting.tsconfig.test-bun.jsonper package and wire it into thetypecheckscript as a secondtsc --noEmit -ppass. Keeps the build tsconfig clean.Option 2 is probably tidier given the
rootDirconstraint.Note this is pre-existing —
test-bun/has never been typechecked. Raised while working #2951 / #2992, where new files were added to that directory and the gap was noticed during review.