Packages

miniflare

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

Your version

4.20260507.0

7 May 2026Where it was published

4.20260730.0 is the newest release of 4.x.

In short

2 new1 internal

Release note

Minor Changes

  • Support named recipients in the Email Sending API MessageBuilder

    The send_email binding's MessageBuilder now accepts EmailAddress objects for to, cc, and bcc in addition to plain strings. You can mix named and plain addresses in the same array:

    await env.SEND_EMAIL.send({
      from: "sender@example.com",
      to: [
        "plain@example.com",
        '"Name" <address@example.com>',
        { name: "Jane Doe", email: "jane@example.com" },
      ],
      cc: [{ name: "CC Person", email: "cc@example.com" }],
      subject: "Hello",
      text: "...",
    });

    Additionally, addresses in "Name" <address> format are now correctly parsed when checking allowed_destination_addresses and allowed_sender_addresses restrictions.

  • Default the workerd runtime subprocess to TZ=UTC to match the production Cloudflare runtime

    Previously, Miniflare inherited the host machine's timezone, so Date and Intl APIs inside a Worker observed the developer's local timezone during local development but UTC in production. This caused dev/prod drift that was hard to debug.

    Miniflare now sets TZ=UTC on the spawned workerd subprocess by default. A new unsafeRuntimeEnv option (a Record<string, string>) is available on the Miniflare constructor for advanced cases that need to override the default — for example, to test timezone-dependent behaviour:

    new Miniflare({
      modules: true,
      script: "...",
      unsafeRuntimeEnv: { TZ: "Europe/London" },
    });

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.