Conversation
Bun runtime was not recognized in native clone detection, causing CoW optimization to be unavailable on macOS APFS when running under Bun. Since Bun is fully compatible with Node.js N-API, add IS_BUN checks alongside IS_NODE in both the native clone detector and the unified native adapter. Closes #351 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address PR review feedback: add comments explaining that Bun reports runtimeType as "node" since it shares the same N-API implementation path as Node.js. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: enable CoW (Copy-on-Write) native cloning on Bun runtime
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chore: release v0.22.1
PR Review: Release v0.22.1 - Enable CoW on Bun RuntimeSummaryThis patch release enables Copy-on-Write (CoW) native cloning functionality for the Bun runtime. The implementation is clean and follows the existing pattern of treating Bun as Node.js-compatible for N-API module usage. ✅ Code Quality & Best PracticesExcellent
Files Modified (9 total)
🔒 Security AssessmentNo security concerns identified
🐛 Potential IssuesNone identified The implementation is straightforward and low-risk:
⚡ Performance ConsiderationsPositive impact
🧪 Test CoverageAdequate for patch release
Recommendation: Consider adding integration tests specifically for Bun + native clone, though not blocking for this patch release. 📚 Documentation UpdatesComplete and consistent
No additional README updates needed - The existing documentation already covers this functionality. 📝 Code Review Detailspackages/core/src/native/index.ts:80-86// Node.js and Bun use the same N-API path
if (IS_NODE || IS_BUN) {
return getNodeAdapter();
}✅ Good: Clean, self-documenting change. The comment clearly explains the rationale. packages/core/src/utils/copy/native/detector.ts:24-25// Deno, Node.js, and Bun use N-API (@kexi/vibe-native)
return IS_DENO || IS_NODE || IS_BUN;✅ Good: Updated comment includes all three runtimes. packages/core/src/native/index.ts:20/** The runtime type (deno or node). Bun reports as "node" since it shares the same N-API implementation. */✅ Good: Interface documentation clarifies the behavior. This prevents confusion about why 🎯 RecommendationsRequired: NoneThis PR is ready to merge as-is. Optional Improvements (Future PRs)
✅ Final VerdictAPPROVED ✨ This is a clean, well-tested patch release that:
Merge confidence: High 🚀 Great work on enabling CoW for Bun runtime! The implementation is minimal, focused, and follows best practices. |
Summary
Changes since v0.22.0
Test plan
🤖 Generated with Claude Code