github cloudflare/workers-sdk miniflare@4.20260714.0

latest releases: @cloudflare/workflows-shared@0.12.1, @cloudflare/deploy-helpers@0.5.1, @cloudflare/workers-shared@0.19.9...
9 hours ago

Minor Changes

  • #14562 9f04a7e Thanks @martijnwalraven! - Add a handleUncaughtError shared option that receives uncaught Worker exceptions

    The 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 pass handleUncaughtError: (error: Error) => void to 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 sets MF-Disable-Pretty-Error, and the entry worker then propagates the exception by rejecting the returned promise instead, so dispatchFetch() callers already receive the error directly and the hook is not invoked.

  • #14706 cb6c3f9 Thanks @edmundhung! - Add Durable Object storage access to createTestHarness()

    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 34e696d Thanks @matthewdavidrodgers! - Improve asset serving performance by removing an unnecessary internal dispatch hop

    Asset 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 d39ae01 Thanks @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 9f04a7e Thanks @martijnwalraven! - Keep reporting uncaught Worker errors when a stack frame's file URL has no local path

    fileURLToPath throws on file:// URLs that cannot be represented as a local path (a non-local host; on Windows, any drive-less path — which is every file:///... URL reported by a POSIX-built bundle). Both the source-mapping machinery and youch'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, and handleUncaughtError did not fire. Source mapping now degrades to the unmapped stack and the pretty page falls back to a plain stack response instead.

  • #14418 cb30df3 Thanks @matthewdavidrodgers! - Improve routing performance for Workers with assets

    Reduce request handling latency by streamlining the router Worker's request path. The loopback infrastructure remains available for future use.

  • #14727 3f3afbb Thanks @ascorbic! - Prevent local Browser Rendering teardown from hanging when Chrome does not exit

    Miniflare now bounds graceful Chrome shutdown and forcefully terminates the browser process tree when needed, preventing disposal from waiting indefinitely.

  • #14723 e6fbc4e Thanks @ascorbic! - Prevent concurrent Miniflare instances from deleting each other's temporary email sessions

    Email 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.

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.