Packages

miniflare

4.20260730.0 · 30 Jul 2026MIT57.5M / weekRepositoryHomepagenpmAtom feed

Your version

4.20260630.0

30 Jun 2026Where it was published

4.20260730.0 is the newest release of 4.x.

In short

1 new1 fixed1 internal

Release note

Patch Changes

  • Fix edge cases on the local R2 public bucket endpoint (/cdn-cgi/local/r2/public) to match r2.dev: write methods are rejected with 401, malformed/multiple/inverted ranges with 400 and unsatisfiable ranges (including bytes=-0) with 416, Range is honored on HEAD requests with a bodyless 206, Content-Range is correct for suffix ranges, object keys are percent-decoded exactly once (keys containing a literal % no longer fail), and objects stored without a content type are served as application/octet-stream instead of omitting the Content-Type header. Unread object bodies are also cancelled (on HEAD and unsatisfiable-range responses) instead of leaking a read stream until garbage collection.

  • Add Workflow introspection to createTestHarness()

    Worker handles can now introspect Workflow bindings by name, allowing tests to disable sleeps, mock step results, and wait for Workflow outcomes. Tests can introspect a known Workflow instance by ID or track instances created after introspection starts.

    const harness = createTestHarness({
      workers: [{ configPath: "./wrangler.json" }],
    });
    
    const worker = harness.getWorker();
    await using workflow = await worker.introspectWorkflow("MY_WORKFLOW");
    
    await workflow.modifyAll((modifier) =>
      modifier.disableSleeps([{ name: "wait-for-approval" }])
    );
    
    const response = await worker.fetch("/start-workflow");
    const [instance] = await workflow.get();
    await instance.waitForStatus("complete");

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.