github cloudflare/miniflare v2.0.0-rc.2

latest releases: 2.14.3, v2.14.2, v3.20231025.0...
pre-release2 years ago

Features

  • Add structuredClone to the sandbox
  • Copy --kv-persist, --cache-persist and --do-persist options to --mounts, so data is shared correctly
  • Resolve mount-custom storage persistence options relative to mounted directory
  • Add a more helpful error message on DurableObjectStorage#get deserialization failure due to Miniflare 1 data
  • Add a more helpful error message on Cache#match deserialization failure due to Miniflare 1 data
  • Add a more helpful error message when unable to find a matching module rule that suggests bundling npm packages

Fixes

  • Bump undici to 4.10.2, closes issues #84 and #91, thanks @gzuidhof and @tranzium
  • Remove Host and CF-Connecting-IP headers when fetching, closes issue #97, thanks @WalshyDev
  • Allow file-system persisted keys to start with /, thanks @eidam for reporting this
  • Setting an option to undefined now overrides that option in wrangler.toml like Miniflare 1
  • When building mounted workers, set the current working directory to the mounted directory
  • Respect the fetch_refuses_unknown_protocols compatibility flag in DurableObjectStub#fetch
  • Default Response.redirect status to 302 instead of throwing
  • Improve spec-compliance of WebSocket event constructors

Jest Fixes 🙁

  • Fix importing miniflare in Jest when using the node environment, specifically fix WebSocketServer import and atob/btoa/AbortSignal globals
  • Add Buffer to global in jest-environment-node, thanks @dan-lee for the PR
  • Allow dynamic code generation in jest-environment-node for coverage, thanks @dan-lee for reporting this

Don't miss a new miniflare release

NewReleases is sending notifications on new releases.