This update incorporates the 2021-12-10
Workers runtime changes. The Miniflare docs now use the Cloudflare Docs Engine.
Features
- Switched back to CommonJS exports. A primary goal of Miniflare is to provide a fun developer experience. Currently, this is not the case when using Miniflare with a certain popular testing framework (cough,
Jest, cough), because it and its ecosystem's support for ESM isn't great yet. This also makes it easier to upgrade from Miniflare 1. Node lets you import CommonJS modules in ES modules so this won't break existing code. Thanks @Kikobeats. - Added
--open
/-O
option that automatically opens your browser once your worker is running. You can optionally specify a different URL to open with--open https://example.com
. Closes issue #121, thanks @third774 for the suggestion. - Don't crash on unhandled promise rejections when using the CLI. Instead, log them. Closes issue #115, thanks @togglydev.
- Added support for
AbortSignal.timeout()
- Added support for
crypto.DigestStream
- Added support for
scheduler.wait()
- Added support for
FixedLengthStream
. Closes issue #123, thanks @vlovich. - Limit the number of subrequests to 50, as per the Workers runtime. Closes issue #117, thanks @leader22 for the suggestion.
- Raised the Durable Object storage max value size from
32KiB
to128KiB
- Re-export remaining
fetch
types fromundici
in@miniflare/core
. Closes issue #124, thanks @GregBrimble.
Fixes
- Fixed issue where
Math
was missing in sandbox when running Worker for module exports injest-environment-miniflare
. Closes issue #128, thanks @worenga for the PR. - Fixed the script path for
type = "webpack"
Workers Sites projects - Allow
*/*
route in mounted workers kv_persist
,cache_persist
anddurable_objects_persist
options set in mounted workers'wrangler.toml
files are now respected