Skip to content

[vite-plugin] Fail clearly for remote bindings under Bun in v1 - #16373

Open
petebacondarwin wants to merge 2 commits into
codex/vite-v1-backport-16225from
codex/vite-v1-backport-15846
Open

petebacondarwin wants to merge 2 commits into
codex/vite-v1-backport-16225from
codex/vite-v1-backport-15846

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Backport #15846's remote-bindings fix to Vite plugin v1. Under Bun, starting remote bindings can wait forever because Bun ignores the undici dispatcher used to send the session's control message. The retained private remote-bindings package now throws an actionable UserError before creating the session, directing users to Node.js or to disable remote bindings.

The Vite plugin calls this retained implementation while preparing its Miniflare options. Include the original private-package regression test and a plugin patch changeset. The separate Wrangler test-harness, middleware, CLI tests, and public source are outside this backport's v1 behavior.

Stacked on #16334, above runtime upgrade #16333. No dependency upgrade or lockfile change is required for this source fix; earlier runtime and Container helper pins are preserved. Private workspace references and the intentional v1 configuration removals are preserved.

Validation on Node.js 22.22.1 / pnpm 10.33.0 after incorporating published Miniflare 5.20261019.1-beta and Wrangler 4.151.3 from #16333: the focused remote-session suite passes (5 tests), build passes (3 tasks), and pnpm check passes (58 tasks). The parent Container stack's retained suites pass (8 tasks, including 211 plugin tests). This PR's remaining source diff remains three files/41 inserted lines; cross-platform CI and maintainer review remain required. The original-specific review request is already recorded and is not repeated.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: the new error includes the cause and instructions to continue development.

Note

This is a contribution from an AI agent: Codex, preparing maintainer-requested v1 backports.


Devin Review

@changeset-bot

changeset-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: deee77e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/vite-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@petebacondarwin

Copy link
Copy Markdown
Contributor Author

@oddharsh (author of #15846) and @petebacondarwin (verified human ant-core approver), could you please check this Vite plugin v1 backport and approve it if it looks good?

This adaptation takes the actionable Bun error and regression test in the retained private remote-bindings package used by Vite plugin v1. It stacks on #16334; earlier #16333 supplies the compatible runtime dependency upgrade. The separate Wrangler test-harness and CLI changes have no remaining v1 effect here.

@workers-devprod
workers-devprod requested review from a team and NuroDev and removed request for a team October 20, 2026 08:42
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@clanky-the-clanker

clanky-the-clanker Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Approved — This is a small, focused backport. A Bun guard throws an actionable UserError before the session starts, and the pull request adds a regression test and a plugin changeset. No issues found.

The decision is advisory: this comment never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The process.versions.bun guard runs before any logging or session setup. It throws a UserError that names the cause and gives two ways forward: run under Node.js or turn remote bindings off. The new test sets process.versions.bun, puts it back with onTestFinished, and uses the test-context expect as the repository guidelines ask.


📝 Documentation: ✅ LGTM

The plugin patch changeset clearly describes the user-facing behavior change. The new error message explains what to do next, so no separate public documentation is needed.


Reviewed commit: deee77eb

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