Add support for Bun#255
Merged
jamescmartinez merged 6 commits intomainfrom Feb 5, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR adds support for the Bun runtime to OpenWorkflow by implementing runtime detection for SQLite backends. It fixes the issue from the reverted PR #249 where the code depended on global require, which isn't available in Node ESM environments.
Changes:
- Implements runtime detection to use
bun:sqlitefor Bun andnode:sqlitefor Node.js - Creates a common
Databaseinterface that both SQLite implementations satisfy - Uses
createRequirefromnode:moduleto avoid dependency on globalrequire - Adds comprehensive Bun support to all documentation
- Adds a separate Bun test CI workflow
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/openworkflow/sqlite/sqlite.ts | Implements runtime detection and common Database interface for Bun and Node.js SQLite drivers |
| packages/openworkflow/sqlite/sqlite.test.ts | Adds test to verify no dependency on global require |
| packages/openworkflow/sqlite/backend.ts | Simplifies type casting by removing unnecessary as unknown as |
| vitest.config.ts | Adds inline deps configuration to fix ESM resolution issues with Bun |
| .github/workflows/ci.yaml | Adds separate Bun test job to CI workflow |
| packages/openworkflow/README.md | Updates quick start with Bun commands |
| packages/docs/**/*.mdx | Adds Bun command examples throughout documentation |
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.
#247
second attempt to add support for Bun - first was #249 but had to be reverted (see #249 comments)