[PR #7453] refactor(ripgrep): split into modular directory structure #12407

Open
opened 2026-02-16 18:17:19 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7453

State: open
Merged: No


Summary

  • Split monolithic ripgrep.ts (400+ lines) into modular directory structure
  • Add Global.Platform helpers for cross-platform binary handling
  • Add integration tests for ripgrep functionality

Changes

  • src/file/ripgrep.tssrc/file/ripgrep/
    • index.ts - Public API (files, tree, search, rg)
    • binary.ts - Binary download/extraction logic
    • tree.ts - Tree building and BFS truncation
    • io.ts - Stream line parsing utility
  • src/global/index.ts - Added Platform.isWindows and Platform.binExt
  • test/file/ripgrep.test.ts - 14 integration tests
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7453 **State:** open **Merged:** No --- ## Summary - Split monolithic `ripgrep.ts` (400+ lines) into modular directory structure - Add `Global.Platform` helpers for cross-platform binary handling - Add integration tests for ripgrep functionality ## Changes - `src/file/ripgrep.ts` → `src/file/ripgrep/` - `index.ts` - Public API (files, tree, search, rg) - `binary.ts` - Binary download/extraction logic - `tree.ts` - Tree building and BFS truncation - `io.ts` - Stream line parsing utility - `src/global/index.ts` - Added `Platform.isWindows` and `Platform.binExt` - `test/file/ripgrep.test.ts` - 14 integration tests
yindo added the pull-request label 2026-02-16 18:17:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12407