Skip to content

refactor: migrate src/file/time.ts from Bun.file() to stat#14141

Merged
thdxr merged 3 commits intodevfrom
migrate-file-time
Feb 18, 2026
Merged

refactor: migrate src/file/time.ts from Bun.file() to stat#14141
thdxr merged 3 commits intodevfrom
migrate-file-time

Conversation

@thdxr
Copy link
Copy Markdown
Member

@thdxr thdxr commented Feb 18, 2026

Summary

Migrate src/file/time.ts from Bun-specific file APIs to Node.js fs module for better compatibility.

Changes

  • Added stat import from fs/promises
  • Replaced Bun.file().stat() with stat()

Testing

All 16 file/time tests pass.

Related

Part of the Bun.file() migration effort tracked in MIGRATION.md.

Replace Bun.file().stat() with stat() from fs/promises:

- Add stat import from fs/promises

All 16 file/time tests pass.
Refactors file modification time checking to use the centralized Filesystem utility instead of Bun.file() directly. This provides consistent error handling for stat operations and ensures reliable conflict detection when files are modified outside of opencode.
@thdxr thdxr force-pushed the migrate-file-time branch from c4674ec to aba78cb Compare February 18, 2026 21:16
@thdxr thdxr enabled auto-merge (squash) February 18, 2026 21:17
@thdxr thdxr merged commit a4b36a7 into dev Feb 18, 2026
7 checks passed
@thdxr thdxr deleted the migrate-file-time branch February 18, 2026 21:22
jonathanmiddleton pushed a commit to jonathanmiddleton/opencode that referenced this pull request Mar 10, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
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