miniflare
4.20260730.0 · 30 Jul 2026MIT57.5M / weekRepositoryHomepagenpmAtom feed
In short
1 new3 fixed1 internal
Release note
Minor Changes
Add JSON output to
/cdn-cgi/handler/emailThe
/cdn-cgi/handler/emailendpoint now accepts?format=jsonto return the email handler result as JSON, including its outcome, rejection reason, forwarded messages, and replies. Requests withoutformat=jsonstill return the existing text outcome for backward compatibility.
Patch Changes
Fix the local Images binding transform (
env.IMAGES.input(...).transform(...)) ignoring thefit,gravity, andbackgroundoptions. Previously, local dev always letterboxed transformed images with black bars regardless of the options passed in. Local dev now respectsfit,gravity, andbackground, matching production Images binding behavior.Disable the keep-alive timeout on the loopback server
The loopback server (which serves custom service bindings,
@cloudflare/vite-plugin's module transport, and other workerd → Node callbacks) used Node's defaultserver.keepAliveTimeoutof 5 seconds. workerd pools and reuses connections to the loopback server, so Node closing an idle pooled socket raced with workerd sending the next request on it, making that request fail withNetwork connection lost. The failure is probabilistic and load-dependent; under@cloudflare/vite-pluginwith a large SSR module graph and a cold optimizer cache (thousands offetchModulecalls with multi-second idle gaps between bursts), it broke most dev sessions. Disable the idle keep-alive timeout on the loopback server, mirroring the undici pools used for dispatch in the opposite direction.Capture Workflows invocations in local observability
When local observability is enabled, the Workflows engine service is now attached to the trace collector (like every user worker), so workflow runs show up in the Local Explorer's Observability view attributed to the workflow. Previously the engine ran outside the per-user-worker tail wiring, so workflow invocations left no traces, spans, or logs in the local store.
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.