miniflare
4.20260730.0 · 30 Jul 2026MIT57.5M / weekRepositoryHomepagenpmAtom feed
4.20260730.0 is the newest release of 4.x.
In short
1 new2 fixed2 internal
Release note
Minor Changes
Support serving videos locally, add
publicUrloption for stable stream preview URLs, and add caption upload support via ReadableStreamVideos uploaded while in local mode are now served at
/cdn-cgi/mf/stream/<video-id>/watch. Thepreviewfield inStreamVideois now directly fetchable during development.A new
publicUrloption onMiniflareOptionsallows callers (e.g. Wrangler, the Vite plugin) to advertise a stable, externally-reachable URL for the Miniflare instance. When set, Stream preview URLs use this value instead of the runtime entry URL, so they remain valid across runtime restarts and port changes. The same value is also exposed as a mutableminiflare.publicUrlproperty.The helper functions
buildPublicUrlandgetLocallyAccessibleHostare now exported fromminiflare, enabling consumers to construct client-reachable URLs that correctly handle IPv6 addresses (bracketing) and wildcard listen addresses (0.0.0.0,::,*→127.0.0.1).Caption uploads via
ReadableStreamare now supported in local mode. They no longer throw a "not supported in local mode" error.
Patch Changes
Make the dev registry watcher reliable on Windows
The filesystem-based dev registry used
chokidarwith default settings, which on Windows backs ontofs.watch(ReadDirectoryChangesW). That API is known to drop or delay create events for files added shortly after the watcher attaches, which is especially common under CI virtualization. When this happened, a process that had attached its watcher before another process registered its worker would never be notified of the new entry until the next 30-second heartbeat — long enough to time out cross-process service-binding calls.Switch to chokidar's polling mode on Windows so the dev registry observes cross-process worker registrations reliably. The registry directory is small and a 100ms poll interval has negligible cost. Non-Windows platforms continue to use the more efficient native filesystem-event backend.
Preserve NonRetryableError message and name when the
workflows_preserve_non_retryable_error_messagecompatibility flag is enabled, instead of replacing it with a generic error message.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.