miniflare@5.20260910.0-alpha
Pre-releaseMinor Changes
-
#15578
15cd6e1Thanks @ThomasRubini! - AddMiniflare#dispatchConnect()for testing Worker TCP handlersTests can now open a Node.js socket to a Worker's configured TCP trigger without reserving and connecting to a fixed port manually. Miniflare waits for startup, resolves OS-assigned ports, supports selecting Workers and triggers, and closes dispatched sockets during disposal.
Patch Changes
-
#15432
f45b596Thanks @razethion! - Prevent delayed internal errors from fetch-only remote bindingsFetch-only remote bindings such as D1 and R2 previously opened an unused WebSocket RPC session. RPC sessions are now created only when an RPC method is called.
-
#15585
f69f95aThanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To @cloudflare/workers-types ^5.20260908.1 ^5.20260910.1 workerd 1.20260908.1 1.20260910.1 -
#14814
a549e58Thanks @chinesepowered! - MatchContent-Typecase-insensitively when simulating Cloudflare's response compressionLocally, responses were only compressed when the
Content-Typematched the compressible media type list exactly. Because HTTP media types are case-insensitive and may carry whitespace before their parameters, headers such asApplication/JSONortext/html ; charset=utf-8were treated as non-compressible, diverging from production behaviour. The media type is now trimmed and lowercased before matching. -
#15540
dbb3ff4Thanks @NAVEENKUMARKR777! - FixDevalueError: Cannot stringify arbitrary non-POJOswhen passing aHeadersinstance to a proxied binding methodR2Object#writeHttpMetadata(),R2Bucket#put()'sonlyIfoption, and other proxied APIs that accept aHeadersargument previously only worked if thatHeadersinstance came from the exact sameHeadersimplementation Miniflare uses internally (undici). In practice, user code almost always constructsHeadersusing the platform global instead (for example inside Next.js, Astro, Remix, or SvelteKit dev servers), which is backed by a different copy ofundiciand isn'tinstanceofthe one Miniflare imports. This mismatch caused serialisation to fail with a confusingDevalueError, even though the exact same code worked fine when deployed.Headers,Request, andResponsevalues are now also recognised by theirSymbol.toStringTag, which is realm-independent, so any spec-compliant instance is accepted regardless of which copy of the class created it. -
#15485
fea3cd0Thanks @RealBhupesh! - Reject loopback server bind failures during Miniflare startup instead of leavingreadyanddispose()hanging#startLoopbackServernow attaches anerrorlistener beforelisten, matching the inspector proxy. When the configured host cannot be bound (e.g.192.0.2.1),readyrejects anddispose()still settles even if the loopback server never started. -
#15580
6bd7b6cThanks @petebacondarwin! - Updatesharpto 0.35.4This updates the image-processing dependency used by Miniflare's local Images binding to a version that addresses
GHSA-rgj7-g3m4-5g8c, covering vulnerabilities in its bundled libheif library. -
#15515
be1caecThanks @Wichtowski! - Handle Miniflare listener startup failures consistentlyLoopback and inspector servers now remove startup-only error handlers after binding and close the server after bind failures. Inspector bind failures are observed immediately and propagated through readiness, URL access, and disposal.
-
#15403
dbc9506Thanks @james-elicx! - Reduce the size of Miniflare's embedded asset and router WorkersMiniflare does not configure Sentry credentials for its asset services, so their builds now replace the unused production Sentry setup with a no-op instead of bundling Toucan.