Skip to content

refactor: replace tsx with bun for TypeScript execution - #278

Merged
steipete merged 3 commits into
openclaw:mainfrom
obviyus:feat/replace-tsx-with-bun
Jan 6, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
obviyus:feat/replace-tsx-with-bun

Conversation

@obviyus

@obviyus obviyus commented Jan 6, 2026

Copy link
Copy Markdown
Collaborator

Replaces tsx with bun as the TypeScript runtime across the codebase:

  • Updated all 11 package.json scripts to use bun instead of tsx
  • Changed shebangs from #!/usr/bin/env tsx to #!/usr/bin/env bun
  • Updated src/daemon/program-args.ts to resolve and spawn bun for dev mode
  • Removed --import tsx pattern from test file spawns (bun runs TS natively)
  • Removed tsx from devDependencies

Motivation
Bun provides native TypeScript execution with faster startup times and no additional loader configuration. This simplifies the dev setup and aligns with modern tooling preferences.

Test plan

  • All 186 test files pass (1052 tests)
  • pnpm clawdbot --help works
  • pnpm dev, pnpm start work
  • Protocol generation scripts work
  • Shebang scripts execute correctly

AI-assisted 🤖

  • AI-assisted (Claude Code)
  • Fully tested locally
  • I understand what the code does

@steipete
steipete merged commit 7a48b90 into openclaw:main Jan 6, 2026
@obviyus
obviyus deleted the feat/replace-tsx-with-bun branch January 6, 2026 07:14
@steipete

steipete commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Thanks @obviyus — merged. Follow-up on main: Bun-first AGENTS instructions + changelog entry.

azade-c added a commit to azade-c/openclaw that referenced this pull request Jan 6, 2026
Bun's WebSocket implementation doesn't fully support Playwright's CDP
connection because Playwright bundles its own 'ws' module. This causes
connectOverCDP to timeout.

The patch makes Playwright use the native 'ws' module when running
under Bun, which works with Bun's WebSocket shim.

Fixes browser snapshot/act timeouts after PR openclaw#278 (tsx → bun migration).

Ref: oven-sh/bun#9911
steipete pushed a commit that referenced this pull request Jan 6, 2026
Bun's WebSocket implementation doesn't fully support Playwright's CDP
connection because Playwright bundles its own 'ws' module. This causes
connectOverCDP to timeout.

The patch makes Playwright use the native 'ws' module when running
under Bun, which works with Bun's WebSocket shim.

Fixes browser snapshot/act timeouts after PR #278 (tsx → bun migration).

Ref: oven-sh/bun#9911
dgarson added a commit to dgarson/clawdbot that referenced this pull request Feb 9, 2026
* Revert "Revert "Web: refine conversation loading and demo delays (openclaw#274)" (openclaw#275)"

This reverts commit 13a8f9e.

* feat: add comprehensive configurable debug/trace logging for block/stream replies
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
Bun's WebSocket implementation doesn't fully support Playwright's CDP
connection because Playwright bundles its own 'ws' module. This causes
connectOverCDP to timeout.

The patch makes Playwright use the native 'ws' module when running
under Bun, which works with Bun's WebSocket shim.

Fixes browser snapshot/act timeouts after PR openclaw#278 (tsx → bun migration).

Ref: oven-sh/bun#9911
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
Bun's WebSocket implementation doesn't fully support Playwright's CDP
connection because Playwright bundles its own 'ws' module. This causes
connectOverCDP to timeout.

The patch makes Playwright use the native 'ws' module when running
under Bun, which works with Bun's WebSocket shim.

Fixes browser snapshot/act timeouts after PR openclaw#278 (tsx → bun migration).

Ref: oven-sh/bun#9911
muneebhashone pushed a commit to muneebhashone/clawdbot that referenced this pull request Aug 25, 2026
muneebhashone pushed a commit to muneebhashone/clawdbot that referenced this pull request Aug 25, 2026
muneebhashone pushed a commit to muneebhashone/clawdbot that referenced this pull request Aug 25, 2026
Bun's WebSocket implementation doesn't fully support Playwright's CDP
connection because Playwright bundles its own 'ws' module. This causes
connectOverCDP to timeout.

The patch makes Playwright use the native 'ws' module when running
under Bun, which works with Bun's WebSocket shim.

Fixes browser snapshot/act timeouts after PR openclaw#278 (tsx → bun migration).

Ref: oven-sh/bun#9911
zeekay pushed a commit to Dream-AI-4444/bot that referenced this pull request Sep 11, 2026
zeekay pushed a commit to Dream-AI-4444/bot that referenced this pull request Sep 11, 2026
zeekay pushed a commit to Dream-AI-4444/bot that referenced this pull request Sep 11, 2026
Bun's WebSocket implementation doesn't fully support Playwright's CDP
connection because Playwright bundles its own 'ws' module. This causes
connectOverCDP to timeout.

The patch makes Playwright use the native 'ws' module when running
under Bun, which works with Bun's WebSocket shim.

Fixes browser snapshot/act timeouts after PR openclaw#278 (tsx → bun migration).

Ref: oven-sh/bun#9911
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
Bun's WebSocket implementation doesn't fully support Playwright's CDP
connection because Playwright bundles its own 'ws' module. This causes
connectOverCDP to timeout.

The patch makes Playwright use the native 'ws' module when running
under Bun, which works with Bun's WebSocket shim.

Fixes browser snapshot/act timeouts after PR openclaw#278 (tsx → bun migration).

Ref: oven-sh/bun#9911
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