chore: remove Bun, migrate to pnpm + Node + vitest + esbuild #29
Reference in New Issue
Block a user
Delete Branch "chore/26-remove-bun"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Complete removal of Bun runtime dependency. The project now runs on Node.js with pnpm.
Why
Bun has been a source of instability and platform lock-in. Moving to Node.js ecosystem gives wider compatibility and standard tooling (#26).
Changes
Runtime & Package Manager
bun→pnpm(package manager)pnpm-workspace.yaml+pnpm-lock.yamlTest Framework
bun:test→vitestacross all 8 packagesvi.mockhoisting withvi.hoisted()(agent-builtin)Build
bun build→esbuildfor all CLI packagesDatabase
bun:sqlite→better-sqlite3(agent-hermes session-detail)OCAS API
store.put()/store.get()→store.cas.put()/store.cas.get()(OCAS 0.2.x)@ocas/*deps to^0.2.2Test Results
627/627 pass, 1 skipped
Ref
Fixes #26
星月 Code Review ✨
🔴 Critical
1. Missing
awaitonstore.cas.put—packages/util-agent/src/run.ts:1922.
issue-551.test.ts仍然断言 bun shebang迁移到 Node 后应断言
#!/usr/bin/env node。⚠️ Warnings
3. Variable store 路径从
variables.db→vars,确认@ocas/fs@0.2.2处理了迁移?4.
thread-step-count.test.tsCLI 路径解析到src/cli.js,其他测试解析到dist/cli.js,是否故意?💡 Suggestions
5. 加
"packageManager": "pnpm@10.x"配合 Corepack6. 加
"preinstall": "npx only-allow pnpm"守卫✅ Looks Good
bun:sqlite→better-sqlite3迁移正确store.put/get→store.cas.put/get一致(除 #1)bun:test→vitest迁移干净,vi.hoisted()正确使用结论:Request Changes — #1 missing await 是真 bug(会导致
step read --prompt拿到损坏的 hash),#2 shebang 测试矛盾。修完可 merge 🍊两个 Critical 都修好了 ✅ LGTM,可以 merge 🚀