miniflare@4.20260714.0
Minor Changes
-
#14562
9f04a7eThanks @martijnwalraven! - Add ahandleUncaughtErrorshared option that receives uncaught Worker exceptionsThe runtime catches handler exceptions to build the 500 response, so they never reach the inspector — the one place an uncaught exception exists as a structured value in Node is the pretty-error path, where the error report from the Worker is revived into a source-mapped
Error. Embedders can now passhandleUncaughtError: (error: Error) => voidto observe that revived error programmatically; logging behavior is unchanged.The hook fires only where the pretty-error path does: requests reaching the Worker through the entry socket (a browser or another HTTP client against the dev server).
dispatchFetch()is unaffected — it always setsMF-Disable-Pretty-Error, and the entry worker then propagates the exception by rejecting the returned promise instead, sodispatchFetch()callers already receive the error directly and the hook is not invoked. -
#14706
cb6c3f9Thanks @edmundhung! - Add Durable Object storage access tocreateTestHarness()You can now execute SQL against a SQLite-backed Durable Object to seed or assert the storage state.
const server = createTestHarness({ workers: [{ configPath: "./wrangler.json" }], }); await server.listen(); const worker = server.getWorker(); const storage = await worker.getDurableObjectStorage("COUNTER", { name: "user-123", }); await worker.fetch("/counter/user-123"); const rows = await storage.exec( "SELECT value FROM counters WHERE id = ?", "user-123" ); expect(rows).toEqual([{ value: 1 }]);
Patch Changes
-
#14417
34e696dThanks @matthewdavidrodgers! - Improve asset serving performance by removing an unnecessary internal dispatch hopAsset requests and RPC calls now avoid an extra internal forwarding layer, reducing latency. The forwarding infrastructure is preserved for future use by cohort-based deployments.
-
#14682
d39ae01Thanks @dependabot! - Update dependencies of "miniflare", "wrangler"The following dependency versions have been updated:
Dependency From To @cloudflare/workers-types ^5.20260710.1 ^5.20260714.1 workerd 1.20260710.1 1.20260714.1 -
#14562
9f04a7eThanks @martijnwalraven! - Keep reporting uncaught Worker errors when a stack frame's file URL has no local pathfileURLToPaththrows onfile://URLs that cannot be represented as a local path (a non-local host; on Windows, any drive-less path — which is everyfile:///...URL reported by a POSIX-built bundle). Both the source-mapping machinery andyouch's error-page frame parsing convert stack-frame specifiers this way, so one such frame previously failed the whole pretty-error request: the error page was replaced by a raw Node stack, the error was not logged, andhandleUncaughtErrordid not fire. Source mapping now degrades to the unmapped stack and the pretty page falls back to a plain stack response instead. -
#14418
cb30df3Thanks @matthewdavidrodgers! - Improve routing performance for Workers with assetsReduce request handling latency by streamlining the router Worker's request path. The loopback infrastructure remains available for future use.
-
#14727
3f3afbbThanks @ascorbic! - Prevent local Browser Rendering teardown from hanging when Chrome does not exitMiniflare now bounds graceful Chrome shutdown and forcefully terminates the browser process tree when needed, preventing disposal from waiting indefinitely.
-
#14723
e6fbc4eThanks @ascorbic! - Prevent concurrent Miniflare instances from deleting each other's temporary email sessionsEmail session cleanup now removes only the current instance's session directory and leaves the shared parent intact, avoiding startup failures when multiple local runtimes use the same project.