Skip to content

Add support for Bun#255

Merged
jamescmartinez merged 6 commits intomainfrom
bun
Feb 5, 2026
Merged

Add support for Bun#255
jamescmartinez merged 6 commits intomainfrom
bun

Conversation

@jamescmartinez
Copy link
Copy Markdown
Contributor

@jamescmartinez jamescmartinez commented Feb 5, 2026

#247

second attempt to add support for Bun - first was #249 but had to be reverted (see #249 comments)

Copilot AI review requested due to automatic review settings February 5, 2026 15:40
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 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 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:sqlite for Bun and node:sqlite for Node.js
  • Creates a common Database interface that both SQLite implementations satisfy
  • Uses createRequire from node:module to avoid dependency on global require
  • 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

Copilot AI review requested due to automatic review settings February 5, 2026 15:59
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

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

Comment thread .github/workflows/ci.yaml
Comment thread packages/openworkflow/sqlite/sqlite.ts
Copilot AI review requested due to automatic review settings February 5, 2026 16:22
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

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.

@jamescmartinez jamescmartinez merged commit 6da48bf into main Feb 5, 2026
14 checks passed
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.

2 participants