refactor: migrate file/ripgrep.ts from Bun.file()/Bun.write() to Filesystem module#14159
Merged
refactor: migrate file/ripgrep.ts from Bun.file()/Bun.write() to Filesystem module#14159
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate
src/file/ripgrep.tsfrom Bun-specific file APIs to the Filesystem utility module.Changes
Filesystemimport from../util/filesystemBun.file().exists()withFilesystem.exists()Bun.write()withFilesystem.write()arrayBufferfrom fetch response for zip extraction instead of re-reading from fileTesting
All 54 file tests pass.
Related
Part of the Bun.file() migration effort.