Bun Hybrid Implementation Checklist
Use this checklist to integrate best practices while adopting a Bun‑hybrid workflow. Check items off as we implement them.
Packaging & TypeScript
- package.json: add
sideEffects: false(after auditing side effects) - package.json: add
exports["./package.json"] = "./package.json" - package.json: include
CHANGELOG.mdinfiles - tsconfig.json: enable
declarationMap: true(build config only; base doesn't require) - tsconfig.base.json: enable
verbatimModuleSyntax: true - tsconfig.base.json: enable
preserveShebang: true(or add wrapper bin) - Verify dist CLI shebang is preserved or add small wrapper bin script
Testing (Vitest primary; Bun optional)
- vitest.config.ts: set
coverage.all: true - vitest.config.ts: per‑file coverage thresholds (lines/statements 80, branches 75, functions 80)
- vitest.config.ts: add
testTimeout(e.g., 20000) andhookTimeoutif needed - package.json: add optional
dev:bun,smoke:bun,test:bun:expscripts
ESLint & Prettier
- Add
eslint-plugin-importas a devDependency - eslint.config.js: add
import/orderrule (alphabetize, groups, newlines) - Optional: add
typecheckscript (tsc -p tsconfig.eslint.json --noEmit) - Optional: add lint‑staged & husky hooks
Changesets & Release hygiene
- .changeset/config.json: update repo to
nathanvale/chatline - package.json
files: addCHANGELOG.md
Bun Hybrid Adoption
- Add Bun scripts without changing pnpm as the package manager
- Document Node/Vitest as primary; Bun as optional speedup
- (Optional CI) Add a Bun canary job to run
smoke:bun
CI Canary Tasks
- Create
.github/workflows/bun-canary.yml(install Bun, pnpm install, build, run smoke & limited tests)
Firecrawl / MCP
- Keep Firecrawl MCP server on Node (no change needed)
- (Optional) Add Bun runtime smoke test for Firecrawl SDK usage
Progress Log
- Initialize checklist file
- Updated package.json (sideEffects, exports mapping, CHANGELOG in files, typecheck & Bun scripts)
- Added Bun canary workflow
- Added Firecrawl Bun smoke script
- Added lint-staged configuration & Husky pre-commit hook
- Documented Bun hybrid usage in README
- Fixed all lint errors (0 errors remain; 16 console warnings are pre-existing)
- Updated test builders to fix type issues (removed non-existent TapbackPayload, fixed TestMessage type)
- Configured declarationMap only in tsconfig.json (build config) to avoid eslint issues
Status: ✅ COMPLETE
All 14 initial checklist items are complete. The implementation includes:
- Full TypeScript 5.9+ configuration with strict checking and modern features
- Vitest testing with coverage thresholds (80% lines/statements, 75% branches)
- ESLint flat config with import ordering and no-console warnings
- Prettier with lint-staged pre-commit hooks via Husky
- Bun optional scripts alongside pnpm-locked primary workflow
- CI canary workflow for Bun compatibility testing
- All lint/type errors resolved; build succeeds