npm / miniflare
miniflare
What changed in miniflare 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.
6 new APIs and options2 behavior and defaults2 tooling8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initminiflare 418 changes
New APIs and options 6
The endpoint accepts ?format=json to return the email handler result as JSON, while requests without it retain the existing text outcome.
Adds a local S3-compatible HTTP API for R2 buckets configured with
s3Credentials, supporting AWS Signature Version 4 authentication and the listed S3 operations.Remote VPC Network and VPC Service bindings now support raw TCP connections through
binding.connect(address)in local development; the feature is experimental and requires no new configuration.Passes space-separated V8 flags to workerd, allowing developers to raise the heap limit and keep long development sessions alive.
A read-only SQL endpoint lets tools query the spans and logs tables.
Set this environment variable to enable local observability while it is off by default during testing.
Behavior and default changes 2
When enabled, local observability captures Workflows invocations so workflow runs appear in the Local Explorer's Observability view with traces, spans, and logs.
The updated sharp no longer requires explicit build approval in package managers that block dependency build scripts by default.
Tooling 2
Local Worker invocations can be traced across worker and Durable Object boundaries, capturing spans, logs, and console output.
A new Observability tab provides Traces and Events views for exploring local invocation data.
Fixes and other changes 8
Local Images binding transforms now respect the fit, gravity, and background options, matching production behavior instead of always letterboxing with black bars.
The idle keep-alive timeout is disabled to prevent pooled workerd connections from failing with
Network connection lostduring local development.Preserves metadata when stored KV values are falsy, such as an empty string or
"0"; missing keys still return null metadata.On Windows, hides the workerd console window when the parent process has no console, preventing a visible, focus-stealing window for background or detached parents.
AVIF inputs are now correctly reported as image/avif rather than as an unsupported or unknown type.
The error now reports the enforced 288000-byte maximum instead of the incorrect 256000-byte limit.
The Cloudflare Vite plugin restarts the Vite development server after workerd recovers, recreating its environments, hot channels, and module runners.
Miniflare restarts workerd after post-startup crashes so local development can serve subsequent requests; startup crashes remain fatal.