[PR #776] [MERGED] refactor: replace Bun.file usages with node:fs #1555

Closed
opened 2026-03-14 09:43:01 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/776
Author: @bienzaaron
Created: 3/4/2026
Status: Merged
Merged: 3/9/2026
Merged by: @kommander

Base: mainHead: main


📝 Commits (10+)

  • 4df540c docs: update AGENTS.md to remove Bun api preferences
  • 1da6c41 refactor(core): replace Bun.file(...).text() with fs.readFile(...)
  • 7498032 chore(core): remove unused imports and use consistent node: prefix on builtin modules
  • 08118d1 refactor(solid): replace Bun.file(...).text() with fs.readFile(...)
  • 5bc1c64 refactor(core): replace Bun.file(...).arrayBuffer() with fs.readFile(...)
  • e8d06ef refactor(core): replace Bun.file(...) usage in tree-sitter caching test
  • d5d6512 chore(core): use consistent node: prefix on builtin module
  • 38885ec refactor(core): replace synchronous Bun.file(...).writer() usage with fs.writeFileSync
  • 0744d1b refactor(core): replace Bun.file(...).stat() with fs.stat(...)
  • d94ed0a fix: formatting

📊 Changes

9 files changed (+38 additions, -57 deletions)

View changed files

📝 AGENTS.md (+1 -7)
📝 packages/core/src/3d/TextureUtils.ts (+2 -1)
📝 packages/core/src/benchmark/markdown-benchmark.ts (+2 -3)
📝 packages/core/src/examples/build.ts (+5 -5)
📝 packages/core/src/examples/text-wrap.ts (+4 -5)
📝 packages/core/src/lib/tree-sitter/cache.test.ts (+5 -4)
📝 packages/core/src/lib/tree-sitter/download-utils.ts (+7 -7)
📝 packages/core/src/zig.ts (+8 -19)
📝 packages/solid/scripts/solid-plugin.ts (+4 -6)

📄 Description

see #2.

Replaces Bun.file(...) usage with node:fs to start working toward node.js and deno compatibility.

I also updated AGENTS.md to recommend against Bun-specific APIs in generated code.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/776 **Author:** [@bienzaaron](https://github.com/bienzaaron) **Created:** 3/4/2026 **Status:** ✅ Merged **Merged:** 3/9/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (10+) - [`4df540c`](https://github.com/anomalyco/opentui/commit/4df540ce26a85fa698460c59162813c07503bc74) docs: update AGENTS.md to remove Bun api preferences - [`1da6c41`](https://github.com/anomalyco/opentui/commit/1da6c417d13c9621118ca149d389df6c658ac7e7) refactor(core): replace `Bun.file(...).text()` with `fs.readFile(...)` - [`7498032`](https://github.com/anomalyco/opentui/commit/74980324e1857367de6e6aa5337d1e54ec72257d) chore(core): remove unused imports and use consistent `node:` prefix on builtin modules - [`08118d1`](https://github.com/anomalyco/opentui/commit/08118d11e2973b4ab09435960a86c59caa1ac31b) refactor(solid): replace `Bun.file(...).text()` with `fs.readFile(...)` - [`5bc1c64`](https://github.com/anomalyco/opentui/commit/5bc1c64d2d7e6e16700d45f2e7d393bed40fe01a) refactor(core): replace `Bun.file(...).arrayBuffer()` with `fs.readFile(...)` - [`e8d06ef`](https://github.com/anomalyco/opentui/commit/e8d06ef0907982205830766648e2f3c91a5060a0) refactor(core): replace `Bun.file(...)` usage in tree-sitter caching test - [`d5d6512`](https://github.com/anomalyco/opentui/commit/d5d651227a6c108ec6efee0bd1a16dfdf4de1615) chore(core): use consistent `node:` prefix on builtin module - [`38885ec`](https://github.com/anomalyco/opentui/commit/38885ecaad2ad7aea0c2bee8430bf9c720890102) refactor(core): replace synchronous `Bun.file(...).writer()` usage with `fs.writeFileSync` - [`0744d1b`](https://github.com/anomalyco/opentui/commit/0744d1bc39b93b68313f021b5aaa192d6f52212b) refactor(core): replace `Bun.file(...).stat()` with `fs.stat(...)` - [`d94ed0a`](https://github.com/anomalyco/opentui/commit/d94ed0ac82375d5883030f38cb6d0cff4358efaf) fix: formatting ### 📊 Changes **9 files changed** (+38 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `AGENTS.md` (+1 -7) 📝 `packages/core/src/3d/TextureUtils.ts` (+2 -1) 📝 `packages/core/src/benchmark/markdown-benchmark.ts` (+2 -3) 📝 `packages/core/src/examples/build.ts` (+5 -5) 📝 `packages/core/src/examples/text-wrap.ts` (+4 -5) 📝 `packages/core/src/lib/tree-sitter/cache.test.ts` (+5 -4) 📝 `packages/core/src/lib/tree-sitter/download-utils.ts` (+7 -7) 📝 `packages/core/src/zig.ts` (+8 -19) 📝 `packages/solid/scripts/solid-plugin.ts` (+4 -6) </details> ### 📄 Description see #2. Replaces [`Bun.file(...)`](https://bun.com/reference/bun/file) usage with `node:fs` to start working toward node.js and deno compatibility. I also updated AGENTS.md to recommend against Bun-specific APIs in generated code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:43:01 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1555
No description provided.