Skip to content

Releases: cloudflare/miniflare

v3.20230628.0

06 Jul 10:25
701d2ec
Compare
Choose a tag to compare

What's Changed

  • Add https option to have miniflare accept https requests by @jspspike in #612
  • [Miniflare 3] Allow custom services to respond with Content-Encoding and multiple Set-Cookie headers by @mrbbot in #613
  • [Miniflare 3] Use localhost instead of 127.0.0.1 for loopback hostname by @mrbbot in #615
  • [Miniflare 3] Correctly resolve relative source mapped URLs by @mrbbot in #617
  • [Miniflare 3] Add changelog entries for 3.0.x releases by @mrbbot in #619
  • [Miniflare 3] Mark WebSocket fetch() close test as flaky by @mrbbot in #620
  • [Miniflare 3] Update API docs with routes, queue*, https*, and upstream by @mrbbot in #618
  • [Miniflare 3] Use http.STATUS_CODES for logging status text by @mrbbot in #616
  • [Miniflare 3] Minor API docs fixes by @mrbbot in #621
  • Bump workerd version by @penalosa in #623

Full Changelog: v3.0.2...v3.20230628.0

v3.0.2

28 Jun 15:16
Compare
Choose a tag to compare

Fixes

  • When port: 0 is specified, preserve randomly assigned port between setOptions() calls (#610)

v3.0.1

28 Jun 15:15
Compare
Choose a tag to compare

Fixes

  • Trust CA root certificates on Windows and NODE_EXTRA_CA_CERTS (#587)
  • Make process exits/server stops more aggressive to prevent test hangs (#590)

v3.0.0

28 Jun 15:15
Compare
Choose a tag to compare

Miniflare v3 now uses workerd, the open-source Cloudflare Workers runtime. This is the same runtime that's deployed on Cloudflare’s network, giving bug-for-bug compatibility and practically eliminating behavior mismatches. Refer to the Miniflare v3 and Wrangler v3 announcements for more information.

Missing Features

Several features from Miniflare v2 are not supported in Miniflare v3's initial release. However, they are on the roadmap, and will be added back soon:

  • Step-through debugging
  • Automatically triggering scheduled events via CRON schedules, or manually triggering them via /.mf/scheduled or /cdn-cgi/mf/scheduled (manually triggering events is supported via the --test-scheduled Wrangler flag and visiting /__scheduled)
  • Starting an HTTPS server
  • Mocking outbound fetch() requests
  • The get{Bindings,KVNamespace,R2Bucket,Caches,DurableObjectNamespace}() methods

CLI Changes

Miniflare v3 no longer includes a standalone CLI. To get the same functionality, you will need to switch over to Wrangler. Wrangler v3 uses Miniflare v3 by default. To start a local development server, run:

$ npx wrangler@3 dev

If there are features from the Miniflare CLI you would like to see in Wrangler, please open an issue on GitHub.

API Changes

We have tried to keep Miniflare v3's API close to Miniflare v2 where possible, but many options and methods have been removed or changed with the switch to the open-source workerd runtime. See the 📚 GitHub README for the new API docs, and the ⬆️ Migration Guide for the full list of removals and changes.

v3.0.0-rc.1

16 May 14:12
Compare
Choose a tag to compare
v3.0.0-rc.1 Pre-release
Pre-release

Features

  • Implement a new underlying storage system, using SQLite for metadata, and a separate file-system/in-memory backed blob store supporting streamed, ranged reads. Note, previously persisted data is incompatible with this system and must be deleted. (#555, #562, #563, #565)
  • Add support for R2 multipart uploads (#565)
  • Add support for R2 multipart, weak, and wildcard ETags (#575)
  • Add support for Queues (#566)
  • Add stub CLI recommending wrangler dev (#570)
  • Add support for specifying custom upstreams (#568)

Fixes

  • Allow multiple Miniflare instances in different processes/worker-threads to start in parallel with port: 0 (#575)
  • Allow node: and cloudflare: modules to be used with modules: true option (#569)
  • Correctly source-map service worker type scripts (#572)

v2.14.0

05 May 09:35
Compare
Choose a tag to compare

Features

  • Add support for the Ed25519 algorithm and mark X448/Ed448 algorithms as unsupported. Thanks @panva for jose's comprehensive test suite.
  • Add ExecutionContext as a global value to Miniflare's unit testing environments' global types. Miniflare injects the ExecutionContext class into testing environments, so they can be constructed and passed to imported module event handlers. This change ensures new ExecutionContext() isn't a type error.
  • Allow wrangler.toml build.watch_dir to be an array of directories. Thanks @sj-e2digital for the PR.

Fixes

  • Ensure queue consumers are registered when using Miniflare's unit testing environments.
  • Fix crash when calling Miniflare#reload() with queue consumers set. Closes issue #560, thanks @calebmer.
  • Add @miniflare/core as a dependency of @miniflare/r2. Closes issue #559, thanks @calebmer.
  • Update @miniflare/d1 README with new API

v3.0.0-next.13

17 Apr 14:24
Compare
Choose a tag to compare
v3.0.0-next.13 Pre-release
Pre-release

Features

  • Add native support for Windows (#551)
  • Add support for routing to multiple Workers (#520)
  • Add support for logging incoming HTTP requests (#550)
  • Improve support for newer R2 features (#524)
    • Add support for deleting multiple keys in R2Bucket#delete()
    • Add support for ranged-gets with a Range header in R2Bucket#get()
    • Add support for R2Bucket#list() startAfter option
    • Add support for sha* checksums in R2Bucket#put() and return from R2Bucket#{get,head}
    • Add support for conditional R2Bucket#put()
    • Add support for secondsGranularity option in R2Conditionals
    • Add validation for customMetadata size to R2Bucket#put()
    • Return range information from R2Bucket#head()

Fixes

  • Use UTC timezone when checking if compatibility date is in the future (#558)

v2.13.0

23 Mar 17:39
Compare
Choose a tag to compare

Features

  • Add support for DurableObjectNamespace#jurisdiction() method. Note the passed jurisdiction is validated but otherwise ignored. IDs generated by sub-namespaces in different jurisdictions will be the same. Thanks @DaniFoldi for the PR.
  • Add support for the non-standard crypto.subtle.timingSafeEqual() function. Thanks @DaniFoldi for the PR.
  • Remove requirement for experimental compatibility flag alongside nodejs_compat to use node:assert, node:buffer and node:util modules. Closes issue #547, thanks @Skye-31 and @DaniFoldi for the PR.

Fixes

v2.12.2

21 Mar 19:45
Compare
Choose a tag to compare

Fixes

v3.0.0-next.12

27 Feb 17:16
Compare
Choose a tag to compare
v3.0.0-next.12 Pre-release
Pre-release

Fixes

  • Use SIGINT when terminating runtime process to avoid gracefully draining HTTP connections, and immediately dispose()/setOptions()