Skip to content

refactor: migrate file/ripgrep.ts from Bun.file()/Bun.write() to Filesystem module#14159

Merged
thdxr merged 5 commits intodevfrom
migrate-ripgrep
Feb 18, 2026
Merged

refactor: migrate file/ripgrep.ts from Bun.file()/Bun.write() to Filesystem module#14159
thdxr merged 5 commits intodevfrom
migrate-ripgrep

Conversation

@thdxr
Copy link
Contributor

@thdxr thdxr commented Feb 18, 2026

Summary

Migrate src/file/ripgrep.ts from Bun-specific file APIs to the Filesystem utility module.

Changes

  • Added Filesystem import from ../util/filesystem
  • Replaced Bun.file().exists() with Filesystem.exists()
  • Replaced Bun.write() with Filesystem.write()
  • Used direct arrayBuffer from fetch response for zip extraction instead of re-reading from file

Testing

All 54 file tests pass.

Related

Part of the Bun.file() migration effort.

…ystem module

Replace Bun-specific file operations with Filesystem module:

- Replace Bun.file().exists() with Filesystem.exists()

- Replace Bun.file().text() with Filesystem.readText()

- Replace Bun.write() with Filesystem.write()
Add 16 newly migrated files to the checklist:
…esystem module

Replace Bun-specific file operations with Filesystem module:

- Replace Bun.file().json() with Filesystem.readJson<T>()

- Replace Bun.file().text() with Filesystem.readText()

- Replace Bun.file().exists() with Filesystem.exists()

- Replace Bun.write() with Filesystem.write() and Filesystem.writeJson()

All 99 config tests pass.
…system module

Replace Bun-specific file operations with Filesystem module:

- Replace Bun.file().exists() with Filesystem.exists()

- Replace Bun.write() with Filesystem.write()

- Replace Bun.file().arrayBuffer() with direct arrayBuffer from response

All 54 file tests pass.
@thdxr thdxr merged commit 3d189b4 into dev Feb 18, 2026
4 checks passed
@thdxr thdxr deleted the migrate-ripgrep branch February 18, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant