Skip to content

🍞 perf: Accelerate Typechecks With Optional Bun - #650

Merged
danny-avila merged 1 commit into
mainfrom
lia/bun-typecheck
Oct 30, 2026
Merged

danny-avila merged 1 commit into
mainfrom
lia/bun-typecheck

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Pin Bun 1.4.4 and use the same npm run typecheck command locally and in CI.
  • Prefer bun check; use local tsc --noEmit when Bun or its checker is unavailable. Preserve checker failures instead of retrying with a different compiler.
  • Address two TypeScript 7 compatibility diagnostics without changing library behavior: retain reasoning-summary field types and ArrayBuffer-backed upload types.
  • Keep npm, Node builds, tsc declaration generation, and type-aware ESLint unchanged.

Validation

Three local runs on the same tree, Node 24.16.0:

Checker Median Diagnostics
TypeScript 5.5.3 15.938 s None
Bun 1.4.4 0.975 s None

Bun is approximately 16.3× faster here. Before the compatibility fixes, tsc passed and Bun consistently reported the two diagnostics above.

  • Package command passes with Bun 1.4.4 and the installed Bun 1.4.2 fallback; both checkers pass the scripts workspace.
  • Runner regression tests: 8 passed. Both real checkers also reject the same TS2322 fixture. Workflow syntax: 2 passed.
  • Focused OpenAI/Cloudflare and tracing tests: 264 passed across 13 suites.
  • npm run build: passed, including tsc -p tsconfig.build.json. Light entry-point tests: 18 passed.
  • Touched-file ESLint: no errors; 31 inherited warnings in the OpenAI utility. Import-order checking flags its unchanged, pre-existing imports.

Based on latest main at 9db504f2777cad90fc1fef2791eb9945e958a556. Lint optimization and compile_check command selection are intentionally separate.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head 64896d93854fa88b04d07dca278648a46226b2cf: optional Bun 1.4.4 typechecking, local tsc fallback, pinned CI, runner regressions, and the two compatibility fixes. npm/Node builds, declaration generation, and type-aware lint remain unchanged. Based on main 9db504f2777cad90fc1fef2791eb9945e958a556.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Verified head 64896d93854fa88b04d07dca278648a46226b2cf includes latest main 9db504f2777cad90fc1fef2791eb9945e958a556. Independent review: complete, no findings. Local checks: both compilers and tsc fallback pass; 8 runner, 264 focused/tracing, 18 entry-point, and 2 workflow tests pass; Node build and tsc declaration generation pass. Median typecheck: Bun 1.4.4 0.975 s versus tsc 5.5.3 15.938 s over three runs. ESLint has no errors and 31 inherited warnings; the OpenAI import-order finding is unchanged from main.

@danny-avila
danny-avila merged commit 08aa5c6 into main Oct 30, 2026
14 checks passed
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.

2 participants