Skip to content

clean up local testing paths in miniflare v5#14599

Open
emily-shen wants to merge 6 commits into
miniflare-v5from
emily/update-paths
Open

clean up local testing paths in miniflare v5#14599
emily-shen wants to merge 6 commits into
miniflare-v5from
emily/update-paths

Conversation

@emily-shen

@emily-shen emily-shen commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Updates miniflare to use these paths:

  • /cdn-cgi/platform-proxy/cdn-cgi/local/platform-proxy
  • /cdn-cgi/handler/scheduled/cdn-cgi/local/scheduled
  • /cdn-cgi/handler/email/cdn-cgi/local/email
  • /cdn-cgi/explorer/*/cdn-cgi/local/explorer/*
  • /cdn-cgi/mf/scheduled → removed (was already deprecated) from miniflare, redirects to /cdn-cgi/local/scheduled client-side
  • /cdn-cgi/mf/stream/*/__cf_local/stream/*
  • /cdn-cgi/mf/imagedelivery/*/__cf_local/imagedelivery/*

Vite and wrangler rewrite requests to the old paths, so there should be no breaking changes.

And removes /cdn-cgi/mf/reload, which was not being used by vite or wrangler (they have their own live reload mechanisms).


  • 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: WIP

A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c4d58ed

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

This PR includes changesets to release 7 packages
Name Type
miniflare Major
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/deploy-helpers Patch
@cloudflare/pages-shared Patch
@cloudflare/runtime-types Patch
@cloudflare/vitest-pool-workers 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

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@ask-bonk ask-bonk 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.

I'm Bonk, and I've done a quick review of your PR.

This PR removes Miniflare's built-in live reload mechanism (the /cdn-cgi/mf/reload WebSocket endpoint, the liveReload option, and the HTML <script> injection), and drops the now-unused liveReload pass-through in Wrangler's Miniflare code paths. The Wrangler-side --live-reload flag still works via the ProxyWorker, which is correct.

One actionable issue:

  1. Stale public API docspackages/miniflare/README.md (lines 769-773) still documents the liveReload?: boolean option that this PR removes. Since this is a major breaking change to Miniflare's public API, the README should be updated to drop this entry so users aren't pointed at a removed option. This file isn't part of the diff, so I can't attach an inline suggestion, but the block to delete is:
- `liveReload?: boolean`

  If `true`, Miniflare will inject a script into HTML responses that
  automatically reloads the page in-browser whenever the Miniflare instance's
  options are updated.

Minor (non-blocking) note: loopbackPort remains in GlobalServicesOptions and is still passed by callers, but is no longer read inside getGlobalServices now that the live reload script (its only consumer) is gone. Safe to leave, but could be cleaned up if it's not needed elsewhere.

@ask-bonk

ask-bonk Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review posted successfully to PR #14599.

Summary of my review: The PR cleanly removes Miniflare's built-in live reload mechanism. I verified:

  • The Wrangler --live-reload flag still works (via the separate ProxyWorker mechanism).
  • The remaining liveReload references in Wrangler (LocalRuntimeController, MultiworkerRuntimeController, ProxyController config) are for the ProxyWorker, not the removed Miniflare option — correct to keep.
  • The schema isn't .strict(), so any stray liveReload prop is stripped, not an error — no backward-compat break in validation.

I flagged one actionable issue: the miniflare README still documents the removed liveReload?: boolean public option (a major breaking change), and a minor non-blocking note about the now-unused loopbackPort field.

github run

@pkg-pr-new

pkg-pr-new Bot commented Jul 8, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@14599

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@14599

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14599

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@14599

miniflare

npm i https://pkg.pr.new/miniflare@14599

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@14599

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@14599

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@14599

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@14599

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14599

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@14599

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@14599

wrangler

npm i https://pkg.pr.new/wrangler@14599

commit: c4d58ed

@emily-shen emily-shen changed the base branch from main to miniflare-v5 July 8, 2026 13:32
@emily-shen emily-shen force-pushed the emily/update-paths branch from 19196e2 to f2691df Compare July 9, 2026 12:47
@emily-shen emily-shen force-pushed the emily/update-paths branch from 211dfb2 to 903e280 Compare July 9, 2026 14:22
@emily-shen emily-shen marked this pull request as ready for review July 9, 2026 14:22
devin-ai-integration[bot]

This comment was marked as resolved.

@emily-shen emily-shen force-pushed the emily/update-paths branch 2 times, most recently from c56c406 to cb00840 Compare July 9, 2026 16:47
@emily-shen emily-shen force-pushed the emily/update-paths branch from 334b15b to 6f0faa5 Compare July 10, 2026 12:59
*
* These mirror the values in packages/miniflare/src/workers/core/constants.ts
* but cannot be imported directly due to circular dependency
* (miniflare depends on @cloudflare/local-explorer-ui).

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.

Can Miniflare just import them from here?

// ## Experimental Feature Flags

/** Enable the local explorer UI at /cdn-cgi/explorer (experimental, default: false). */
/** Enable the local explorer UI at /cdn-cgi/local/explorer (experimental, default: false). */

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.

Is it still default:false?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yep doing that in a separate change

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

3 participants