|
1 | 1 | # 🚧 Changelog |
2 | 2 |
|
| 3 | +# 2.8.0 |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- ⚡️ Add **custom Vitest testing environment**. This behaves almost identically |
| 8 | + to the Jest environment. However, isolated storage must be installed manually |
| 9 | + in each test file. Call the `setupMiniflareIsolatedStorage()` global function |
| 10 | + and use the returned `describe` function instead of the regular |
| 11 | + `describe`/`suite` functions imported from `vitest`. See |
| 12 | + [⚡️ Vitest Environment](https://miniflare.dev/testing/vitest) for more |
| 13 | + details. |
| 14 | +- 🌐 **Populate Workers Sites `__STATIC_CONTENT_MANIFEST`** with site files |
| 15 | + instead of an empty object. Miniflare will still disable caching of Workers |
| 16 | + Sites files to ensure the most up-to-date files are always returned. Closes |
| 17 | + [issues #233](https://github.com/cloudflare/miniflare/issues/233), |
| 18 | + [#326](https://github.com/cloudflare/miniflare/issues/326) and |
| 19 | + [cloudflare/wrangler2#1632](https://github.com/cloudflare/wrangler2/issues/1632). |
| 20 | + Thanks [@ItalyPaleAle](https://github.com/ItalyPaleAle), |
| 21 | + [@Skye-31](https://github.com/Skye-31), |
| 22 | + [@CraigglesO](https://github.com/CraigglesO), |
| 23 | + [@Hexstream](https://github.com/Hexstream) and |
| 24 | + [@PolariTOON](https://github.com/PolariTOON). |
| 25 | +- ⏱ **Add global `getMiniflareWaitUntil()` method** and `ExecutionContext` class |
| 26 | + to the Jest and Vitest testing environments. This can be used to `await` the |
| 27 | + results of `waitUntil`ed `Promise`s in tests. See |
| 28 | + [🤹️ Jest Environment](https://miniflare.dev/testing/jest#waiting-for-waituntiled-promises) |
| 29 | + and |
| 30 | + [⚡️ Vitest Environment](https://miniflare.dev/testing/vitest#waiting-for-waituntiled-promises) |
| 31 | + for more details. |
| 32 | +- ⏳ Match Web Streams implementations with Workers runtime, closes issue |
| 33 | + [#168](https://github.com/cloudflare/miniflare/issues/168), thanks |
| 34 | + [@leviwolfe](https://github.com/leviwolfe): |
| 35 | + - Add support for the non-standard |
| 36 | + [`IdentityTransformStream`](https://developers.cloudflare.com/workers/runtime-apis/streams/transformstream/#identitytransformstream) |
| 37 | + class. |
| 38 | + - Add support for the **`streams_enable_constructors` compatibility flag**. |
| 39 | + `ReadableStream` and `WritableStream` constructors will throw unless this |
| 40 | + flag is enabled. `ReadableByteStreamController`, |
| 41 | + `ReadableStreamBYOBRequest`, `ReadableStreamDefaultController` and |
| 42 | + `WritableStreamDefaultController` will only be included in the sandbox if |
| 43 | + this flag is enabled. |
| 44 | + - Add support for the **`transformstream_enable_standard_constructor` |
| 45 | + compatibility flag**. `TransformStream` will behave like |
| 46 | + `IdentityTransformStream` if this isn't enabled, ignoring custom |
| 47 | + transformers. If `transformstream_enable_standard_constructor` is set, but |
| 48 | + `streams_enable_constructors` isn't, the `TransformStream` constructor will |
| 49 | + throw. `TransformStreamDefaultController` will only be included in the |
| 50 | + sandbox if both flags are enabled. |
| 51 | + - Add support for BYOB reads to the non-standard |
| 52 | + [`FixedLengthStream`](https://developers.cloudflare.com/workers/runtime-apis/streams/transformstream/#fixedlengthstream) |
| 53 | + class. |
| 54 | +- 🇬🇧 Add support for **Queues**. Docs coming soon™... 👀 |
| 55 | +- 🙉 Allow calls to `addEventListener`, `removeEventListener` and |
| 56 | + `dispatchEvent` in modules mode. Please note, calling `addEventListener` with |
| 57 | + a special event type (e.g. `fetch`, `scheduled`) will log a warning prompting |
| 58 | + you to use the `export default` syntax. Closes |
| 59 | + [issue #207](https://github.com/cloudflare/miniflare/issues/207), thanks |
| 60 | + [@Electroid](https://github.com/Electroid). |
| 61 | +- 🍟 Add experimental and highly-inaccurate request CPU time measurements. These |
| 62 | + are not representative of deployed worker performance, should only be used for |
| 63 | + relative comparisons, and may be removed in the future. Enable measurements |
| 64 | + with the `--inaccurate-cpu`/`[miniflare] inaccurate_cpu`/`inaccurateCpu` |
| 65 | + option. Closes |
| 66 | + [issue #161](https://github.com/cloudflare/miniflare/issues/161). Thanks |
| 67 | + [@alexandernst](https://github.com/alexandernst) and |
| 68 | + [@y21](https://github.com/y21). |
| 69 | +- 🦄 Automatically enable watch mode when `live_reload = true` is set in |
| 70 | + `wrangler.toml`. |
| 71 | + |
| 72 | +## Fixes |
| 73 | + |
| 74 | +- Return `Response`s with immutable headers from `fetch`es to Durable Objects |
| 75 | + and service bindings. Closes |
| 76 | + [issue #346](https://github.com/cloudflare/miniflare/issues/346), thanks |
| 77 | + [@Cherry](https://github.com/Cherry). |
| 78 | +- Fix `CryptoKey#algorithm.name` property of `NODE-ED25519` keys. Closes |
| 79 | + [issue panva/jose#446](https://github.com/panva/jose/issues/446), thanks |
| 80 | + [@ItalyPaleAle](https://github.com/ItalyPaleAle). |
| 81 | +- Disable automatic insertion of `Sec-WebSocket-Protocol` header. Closes |
| 82 | + [issue #179](https://github.com/cloudflare/miniflare/issues/179), thanks |
| 83 | + [@aboodman](https://github.com/aboodman) and |
| 84 | + [@grgbkr](https://github.com/grgbkr). |
| 85 | +- Return `Content-Length` header is custom `Content-Encoding` is specified. |
| 86 | + Closes [issue #313](https://github.com/cloudflare/miniflare/issues/313), |
| 87 | + thanks [@vlovich](https://github.com/vlovich). |
| 88 | +- Require `"automatic"` instead of `"auto"` for the `encodeBody` option when |
| 89 | + constructing `Request`s. Closes |
| 90 | + [issue #357](https://github.com/cloudflare/miniflare/issues/357), thanks |
| 91 | + [@GregBrimble](https://github.com/GregBrimble) for |
| 92 | + [the PR](https://github.com/cloudflare/miniflare/pull/358). |
| 93 | +- Remove `request.cf.cacheTtl`/`request.cf.cacheTtlByStatus` support from the |
| 94 | + Cache API to match the behaviour of the Workers runtime, which only supports |
| 95 | + `request.cf.cacheKey`. |
| 96 | + |
3 | 97 | # 2.7.1 |
4 | 98 |
|
5 | 99 | ## Fixes |
|
0 commit comments