Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

v2.0.0-rc.2

Pre-release
Pre-release

Choose a tag to compare

@mrbbot mrbbot released this 22 Nov 00:44
· 547 commits to v2 since this release

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