2022/3/24 Workers Runtime Release Notes

Changes this week:

  • A new compatibility flag has been introduced, minimal_subrequests , which removes some features that were unintentionally being applied to same-zone fetch() calls. The flag will default to enabled on Tuesday, 2022-04-05, and is described in [Workers] Document `minimal_subrequests` compatibility flag by harrishancock · Pull Request #3814 · cloudflare/cloudflare-docs · GitHub.
  • When creating a Response with JavaScript-backed ReadableStreams, the Body mixin functions (e.g. await response.text() ) are now implemented.
  • The IdentityTransformStream creates a byte-oriented TransformStream implementation that simply passes bytes through unmodified. The readable half of the TransformStream supports BYOB-reads. It is important to note that IdentityTransformStream is identical to the current non-spec compliant TransformStream implementation, which will be updated soon to conform to the WHATWG Stream Standard. All current uses of new TransformStream() should be replaced with new IdentityTransformStream() to avoid potentially breaking changes later.
4 Likes

Hi,

Just to confirm, any worker that’s currently using new TransformStream() should be updated with new IdentityTransformStream() otherwise it’ll stop working?

thanks.

Hi winterstephane,

This release note admittedly could have been worded more clearly.

We guarantee your code will never see functional changes provided you have the compatibility date set correctly in your wrangler.toml. The behavioral TransformStream change would only come in effect if
you explicitly opt-in with some TBD compatibility flag OR if your compatibility date is after the change is made to the default behavior for compatibility date >= X.

If you want to avoid issues when bumping the compatibility date in the future as part of your regular process of upgrading to newer behavior of the Workers runtime, it’s a good idea to migrate.

1 Like

Great, thanks a lot for the explanation. I will make sure to use the compatibility date flag.