Releases: cloudflare/miniflare
Releases · cloudflare/miniflare
v1.3.1
Fixes
- Upgraded
html-rewriter-wasm
to version0.3.1
, fixing the return type ofElement.attributes
v1.3.0
Features
- Switched to a
lol-html
-based WebAssembly implementation ofHTMLRewriter
for a more accurate simulation of the real Workers environment. See 📄 HTMLRewriter for more details. - Added HTTPS support for local development, thanks @RichiCoder1 for the suggestion (#12). See 💻 Using the CLI and 🧰 Using the API for more details.
- When using the CLI, the
--watch
flag is now assumed if--build-watch-path
is set, thanks @evanderkoogh for the PR (#8) - Added source maps to
CommonJS
module transformation
Fixes
v1.2.0
Features
- Added Redis persistence support for 📦 KV, ✨ Cache and 📌 Durable Objects
- Added support for loading scripts from
package.json
, closes issue #7. See 💻 Using the CLI and ⚡️ Developing with esbuild for more details. - Added
FormData
to the sandbox, closes issue #6 - Added an automatic update checker. See 💻 Using the CLI for more details.
- 📚 Modules mode is now always enabled when specifying 📌 Durable Objects bindings
Fixes
- Fixed Windows support, closes issue #10
- Fixed issue where scripts were not reloaded correctly when editing script path in
wrangler.toml
. Scripts are now always reloaded on options change.Miniflare.reloadScript()
is now deprecated. You should useMiniflare.reloadOptions()
instead.
v1.1.0
v1.0.0
Breaking Changes
-
The first and only argument to the
Miniflare
constructor is now an object. Scripts should be specified via thescript
option for strings and thescriptPath
option for files:// Previous version import vm from "vm"; import { Miniflare } from "miniflare"; const mf1 = new Miniflare( new vm.Script(`addEventListener("fetch", (event) => { ... })`), { kvPersist: true } ); const mf2 = new Miniflare("script.js", { kvPersist: true });
// New version import { Miniflare } from "miniflare"; const mf1 = new Miniflare({ script: `addEventListener("fetch", (event) => { ... })`, kvPersist: true, }); const mf2 = new Miniflare({ scriptPath: "script.js", kvPersist: true, });
-
The
Miniflare.getNamespace
method has been renamed toMiniflare.getKVNamespace
-
Logged errors will now throw a
MiniflareError
if no log is provided -
When using file system KV persistence, key names are now sanitised to replace special characters such as
:
,/
, and\
. Reading keys containing these characters may now returnnull
if a value was stored in the previous version.
Features
- Added support for 📚 Modules (requires
--experimental-vm-modules
flag) - Added support for 📌 Durable Objects
- Added support for ✉️ Web Sockets (client and server)
- Added support for 🛠 Builds (custom builds and
webpack
/rust
Wrangler builds) - Added support for ⚙️ WebAssembly
- Added support for 📄 HTMLRewriter
- Made CLI
script
parameter optional, it can now be inferred in some cases fromwrangler.toml
- Added
host
option (--host
/-H
flag) for restricting hosts the HTTP server listens on - Added
Miniflare.dispose
method for cleaning up file watcher - Added
CF-*
headers andcf
object to HTTP server requests - Added
cron
property to ⏰ Scheduled Events - Added manual triggering for ⏰ Scheduled Events via
/.mf/scheduled
HTTP endpoint - Added pretty error page powered by Youch
- Added many more tests
Fixes
- Fixed error if options object (containing
type
andcacheTtl
properties) passed as second parameter to KVget
method, closes issue #3 - Fixed error if
ArrayBuffer
passed asdata
tocrypto.subtle.digest("md5", data)
- Fixed handling of
ignoreMethod
option forCache
match
anddelete
- Disabled edge caching when using Workers Sites, files are now always loaded from disk
- Provide
Set
andWeakSet
from Miniflare's realm to sandbox, removingPromise
, so(async () => {})() instanceof Promise
evaluates totrue
v0.1.0
Initial Release
Features
- Added support for 📨 Fetch Events
- Added support for ⏰ Scheduled Events
- Added support for 🔑 Variables and Secrets
- Added support for 📦 KV
- Added support for ✨ Cache
- Added support for 🌐 Workers Sites
- Added support for 🗺 Source Maps