Packages

miniflare

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

Your version

4.20250523.0

27 May 2025Where it was published

4.20260730.0 is the newest release of 4.x.

In short

1 new2 fixed1 internal

Release note

Minor Changes

  • Add a new defaultPersistRoot option to control where plugins persist data when no path is provided.

    // Before this change / No `defaultPersistRoot`
    new Miniflare({
        kvPersist: undefined, // → "/(tmp)/kv"
        d1Persist: true, // → "$PWD/.mf/d1"
        r2Persist: false, // → "/(tmp)/r2"
        cachePersist: "/my-cache", // → "/my-cache"
    });
    
    // With `defaultPersistRoot`
    new Miniflare({
        defaultPersistRoot: "/storage",
        kvPersist: undefined, // → "/storage/kv"
        d1Persist: true, // → "/storage/d1"
        r2Persist: false, // → "/(tmp)/r2"
        cachePersist: "/my-cache", // → "/my-cache"
    });

Patch Changes

  • Redesign wrangler dev to more clearly present information and have a bit of a glow up ✨
    Screenshot 2025-05-22 at 01 11 43

  • Decouple KV plugin from secrets store plugin

    The KV plugin previously configured both KV namespace and secrets store bindings with the same service name but different persistence paths, causing conflicts when both were defined. This change copies the KV binding implementation into the secrets store plugin and customizes its service name to prevent collisions.

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.