Skip to content

Comments

chore: release v0.22.1#354

Merged
kexi merged 5 commits intomainfrom
develop
Feb 12, 2026
Merged

chore: release v0.22.1#354
kexi merged 5 commits intomainfrom
develop

Conversation

@kexi
Copy link
Owner

@kexi kexi commented Feb 12, 2026

Summary

  • Release v0.22.1 (patch) to main

Changes since v0.22.0

  • fix: Enable CoW (Copy-on-Write) native cloning on Bun runtime
  • fix: Clarify runtimeType reports "node" for Bun in interface docs

Test plan

🤖 Generated with Claude Code

kexi and others added 5 commits February 12, 2026 20:05
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>
@kexi kexi merged commit 401bfce into main Feb 12, 2026
44 checks passed
@claude
Copy link

claude bot commented Feb 12, 2026

PR Review: Release v0.22.1 - Enable CoW on Bun Runtime

Summary

This 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 Practices

Excellent

  • ✅ Consistent pattern: All changes follow the same approach (IS_NODE || IS_BUN) across the codebase
  • ✅ Documentation updated: Comments clarify that Bun uses the same N-API path as Node.js
  • ✅ Clear rationale: Comments explain why Bun reports as "node" in the interface (N-API compatibility)
  • ✅ Version bumps: All package.json files updated consistently (0.22.0 → 0.22.1)
  • ✅ Changelog updated: Both English and Japanese versions include the fix

Files Modified (9 total)

  • Version bumps: jsr.json, package.json, packages/*/package.json (5 files)
  • Core logic: packages/core/src/native/index.ts, packages/core/src/utils/copy/native/detector.ts
  • Documentation: packages/docs/src/content/docs/changelog.mdx (EN/JA)

🔒 Security Assessment

No security concerns identified

  • ✅ No new dependencies introduced
  • ✅ No GPL-licensed dependencies (all existing dependencies remain Apache-2.0/MIT compatible)
  • ✅ N-API native module usage is already audited (@kexi/vibe-native is workspace package)
  • ✅ No changes to security-critical code paths (auth, validation, shell execution)

🐛 Potential Issues

None identified

The implementation is straightforward and low-risk:

  • Bun's N-API compatibility is well-documented and stable
  • The same @kexi/vibe-native module already works with Node.js
  • Fallback behavior remains unchanged if native module isn't available

⚡ Performance Considerations

Positive impact

  • ✅ Enables fast CoW cloning on Bun runtime (previously fell back to slower methods)
  • ✅ No performance regression for Node.js or Deno (logic is additive)
  • ✅ Maintains lazy loading pattern for native module

🧪 Test Coverage

Adequate for patch release

  • ✅ Existing tests cover runtime detection (packages/npm/test/bun/runtime-detection.test.ts)
  • ✅ Existing tests verify native clone functionality
  • ✅ PR description confirms all checks passed on release PR chore: release v0.22.1 #353

Recommendation: Consider adding integration tests specifically for Bun + native clone, though not blocking for this patch release.


📚 Documentation Updates

Complete and consistent

  • ✅ Changelog updated in both English and Japanese
  • ✅ Existing README.md already states: "Bun uses the same npm package as Node.js. Native bindings for Copy-on-Write file cloning are automatically used when available."
  • ✅ Comments in code clarified: "Bun reports as 'node' since it shares the same N-API implementation"

No additional README updates needed - The existing documentation already covers this functionality.


📝 Code Review Details

packages/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 runtimeType returns "node" for Bun.


🎯 Recommendations

Required: None

This PR is ready to merge as-is.

Optional Improvements (Future PRs)

  1. Testing: Add a Bun-specific integration test that verifies native clone operations work end-to-end
  2. Metrics: Consider adding telemetry to track runtime type distribution (if not already present)
  3. Documentation: Update architecture docs (if any) to explicitly list Bun as a supported runtime alongside Node.js and Deno

✅ Final Verdict

APPROVED

This is a clean, well-tested patch release that:

  • ✅ Follows established patterns
  • ✅ Introduces no security risks
  • ✅ Improves performance for Bun users
  • ✅ Maintains backward compatibility
  • ✅ Updates all necessary documentation
  • ✅ Adheres to project guidelines (CLAUDE.md)

Merge confidence: High 🚀

Great work on enabling CoW for Bun runtime! The implementation is minimal, focused, and follows best practices.

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.

1 participant