[PR #568] [MERGED] refactor: migrate wrangler unstable_dev to unstable_startWorker #676

Closed
opened 2026-05-06 13:09:29 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/568
Author: @james-elicx
Created: 3/16/2026
Status: Merged
Merged: 3/16/2026
Merged by: @james-elicx

Base: mainHead: fix/migrate-unstable-dev-to-unstable-startWorker


📝 Commits (3)

  • abd22db fix: migrate wrangler unstable_dev to unstable_startWorker
  • deb54df fix: silence wrangler logs during prerender via dev.logLevel: none
  • 619a5bf fix: update stale JSDoc comments referencing unstable_dev

📊 Changes

6 files changed (+69 additions, -70 deletions)

View changed files

📝 packages/vinext/src/build/prerender.ts (+23 -23)
📝 packages/vinext/src/build/run-prerender.ts (+11 -12)
📝 packages/vinext/src/entries/app-rsc-entry.ts (+6 -6)
📝 tests/__snapshots__/entry-templates.test.ts.snap (+24 -24)
📝 tests/helpers.ts (+1 -1)
📝 tests/prerender.test.ts (+4 -4)

📄 Description

ref: #563

Summary

  • Replace the deprecated wrangler.unstable_dev() API with wrangler.unstable_startWorker() in the prerender pipeline (prerender.ts and run-prerender.ts)
  • Switch type annotation from Unstable_DevWorker to the Worker type returned by unstable_startWorker
  • Replace .stop() cleanup with .dispose()
  • Pass VINEXT_PRERENDER via bindings: { type: "plain_text", value: "1" } instead of vars
  • Update comments, test descriptions, and snapshots to reference the new API

Why

Wrangler's own docs recommend migrating away from unstable_dev to unstable_startWorker. The new API is cleaner: no local, experimental.disableExperimentalWarning, or logLevel boilerplate needed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/568 **Author:** [@james-elicx](https://github.com/james-elicx) **Created:** 3/16/2026 **Status:** ✅ Merged **Merged:** 3/16/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `fix/migrate-unstable-dev-to-unstable-startWorker` --- ### 📝 Commits (3) - [`abd22db`](https://github.com/cloudflare/vinext/commit/abd22db4b54bb2e8b7172781f92910f96e045ee7) fix: migrate wrangler unstable_dev to unstable_startWorker - [`deb54df`](https://github.com/cloudflare/vinext/commit/deb54df668878c380453562d6d5b9157f1183fb7) fix: silence wrangler logs during prerender via dev.logLevel: none - [`619a5bf`](https://github.com/cloudflare/vinext/commit/619a5bf1827ac23ed5619cf63ad5f1763a42127e) fix: update stale JSDoc comments referencing unstable_dev ### 📊 Changes **6 files changed** (+69 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/build/prerender.ts` (+23 -23) 📝 `packages/vinext/src/build/run-prerender.ts` (+11 -12) 📝 `packages/vinext/src/entries/app-rsc-entry.ts` (+6 -6) 📝 `tests/__snapshots__/entry-templates.test.ts.snap` (+24 -24) 📝 `tests/helpers.ts` (+1 -1) 📝 `tests/prerender.test.ts` (+4 -4) </details> ### 📄 Description ref: #563 ## Summary - Replace the deprecated `wrangler.unstable_dev()` API with `wrangler.unstable_startWorker()` in the prerender pipeline (`prerender.ts` and `run-prerender.ts`) - Switch type annotation from `Unstable_DevWorker` to the `Worker` type returned by `unstable_startWorker` - Replace `.stop()` cleanup with `.dispose()` - Pass `VINEXT_PRERENDER` via `bindings: { type: "plain_text", value: "1" }` instead of `vars` - Update comments, test descriptions, and snapshots to reference the new API ## Why Wrangler's own docs recommend migrating away from `unstable_dev` to `unstable_startWorker`. The new API is cleaner: no `local`, `experimental.disableExperimentalWarning`, or `logLevel` boilerplate needed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:09:29 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#676
No description provided.