Skip to content

Add support for Bun#249

Merged
jamescmartinez merged 3 commits intomainfrom
bun-support
Feb 4, 2026
Merged

Add support for Bun#249
jamescmartinez merged 3 commits intomainfrom
bun-support

Conversation

@jamescmartinez
Copy link
Copy Markdown
Contributor

Closes #247

Summary

Adds SQLite support for Bun, which makes OpenWorkflow Bun-compatible 🎊

Copilot AI review requested due to automatic review settings February 4, 2026 23:26
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/openworkflow/sqlite/sqlite.ts 71.42% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Bun runtime support to OpenWorkflow's SQLite backend, making OpenWorkflow compatible with both Node.js and Bun. The changes introduce runtime detection to dynamically load either node:sqlite (for Node.js) or bun:sqlite (for Bun), along with a common Database interface that both drivers satisfy.

Changes:

  • Introduced runtime detection to support both Node.js (node:sqlite) and Bun (bun:sqlite) for SQLite operations
  • Defined a common Database interface that abstracts the differences between the two SQLite implementations
  • Simplified type casting in backend.ts by removing unnecessary double casts

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/openworkflow/sqlite/sqlite.ts Added runtime detection logic, Database interface abstraction, and dynamic require() for node:sqlite vs bun:sqlite
packages/openworkflow/sqlite/backend.ts Simplified type casting from row as unknown as Type to row as Type for better readability

Comment thread packages/openworkflow/sqlite/sqlite.ts
Comment thread packages/openworkflow/sqlite/sqlite.ts
@jamescmartinez jamescmartinez merged commit 41de670 into main Feb 4, 2026
6 of 7 checks passed
@jamescmartinez
Copy link
Copy Markdown
Contributor Author

this had to be reverted in 5d6c607

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Bun runtime (bun:sqlite) for SQLite backend

2 participants