From dc7053175d3e628541964b40b010cb17ffa9d3f5 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 3 Feb 2026 08:38:53 +0100 Subject: [PATCH 1/4] add a compat enabled date for fetchIterableTypeSupport --- src/workerd/io/compatibility-date.capnp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/workerd/io/compatibility-date.capnp b/src/workerd/io/compatibility-date.capnp index cf9dae5dc92..074f1133ce5 100644 --- a/src/workerd/io/compatibility-date.capnp +++ b/src/workerd/io/compatibility-date.capnp @@ -1230,6 +1230,7 @@ struct CompatibilityFlags @0x8f8c1b68151b6cef { fetchIterableTypeSupport @146 :Bool $compatEnableFlag("fetch_iterable_type_support") $compatDisableFlag("no_fetch_iterable_type_support"); + $compatEnableDate("2026-02-12") # Enables passing sync and async iterables as the body of fetch Request or Response. # Previously, sync iterables like Arrays would be accepted but stringified, and async # iterables would be treated as regular objects and not iterated over at all. With this @@ -1239,6 +1240,7 @@ struct CompatibilityFlags @0x8f8c1b68151b6cef { # that allows this behavior and allows sync Generator and AsyncGenerator objects to be # included in kj::OneOf declarations safely with strings and other types. When enabled, # strings are ignored but Arrays will be treated as iterables and not stringified as before. + # Also see `fetchIterableTypeSupportOverrideAdjustment`. envModuleNullableSupport @147 :Bool $compatEnableFlag("env_module_nullable_support") From 08e99535cf5cb3d5a6ec3a28e44fa2004849245a Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 3 Feb 2026 09:53:41 +0100 Subject: [PATCH 2/4] fix format --- src/workerd/io/compatibility-date.capnp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/workerd/io/compatibility-date.capnp b/src/workerd/io/compatibility-date.capnp index 074f1133ce5..b3407881e1d 100644 --- a/src/workerd/io/compatibility-date.capnp +++ b/src/workerd/io/compatibility-date.capnp @@ -1229,8 +1229,8 @@ struct CompatibilityFlags @0x8f8c1b68151b6cef { fetchIterableTypeSupport @146 :Bool $compatEnableFlag("fetch_iterable_type_support") - $compatDisableFlag("no_fetch_iterable_type_support"); - $compatEnableDate("2026-02-12") + $compatDisableFlag("no_fetch_iterable_type_support") + $compatEnableDate("2026-02-12"); # Enables passing sync and async iterables as the body of fetch Request or Response. # Previously, sync iterables like Arrays would be accepted but stringified, and async # iterables would be treated as regular objects and not iterated over at all. With this @@ -1240,7 +1240,7 @@ struct CompatibilityFlags @0x8f8c1b68151b6cef { # that allows this behavior and allows sync Generator and AsyncGenerator objects to be # included in kj::OneOf declarations safely with strings and other types. When enabled, # strings are ignored but Arrays will be treated as iterables and not stringified as before. - # Also see `fetchIterableTypeSupportOverrideAdjustment`. + # Also see fetchIterableTypeSupportOverrideAdjustment. envModuleNullableSupport @147 :Bool $compatEnableFlag("env_module_nullable_support") From 0fd72bb52878d4a6b0c671782384448aed77ef1a Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 3 Feb 2026 10:32:47 +0100 Subject: [PATCH 3/4] update types --- types/generated-snapshot/latest/index.d.ts | 4 +++- types/generated-snapshot/latest/index.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/types/generated-snapshot/latest/index.d.ts b/types/generated-snapshot/latest/index.d.ts index 31d3946760e..4ea1a3a5bba 100755 --- a/types/generated-snapshot/latest/index.d.ts +++ b/types/generated-snapshot/latest/index.d.ts @@ -1913,7 +1913,9 @@ type BodyInit = | ArrayBufferView | Blob | URLSearchParams - | FormData; + | FormData + | Iterable + | AsyncIterable; declare abstract class Body { /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */ get body(): ReadableStream | null; diff --git a/types/generated-snapshot/latest/index.ts b/types/generated-snapshot/latest/index.ts index f5507952a3b..a8cf0c0c265 100755 --- a/types/generated-snapshot/latest/index.ts +++ b/types/generated-snapshot/latest/index.ts @@ -1918,7 +1918,9 @@ export type BodyInit = | ArrayBufferView | Blob | URLSearchParams - | FormData; + | FormData + | Iterable + | AsyncIterable; export declare abstract class Body { /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */ get body(): ReadableStream | null; From 64d1b84f3ea1ee85703b3000e1d4a9d86365c113 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Wed, 4 Feb 2026 08:51:34 +0100 Subject: [PATCH 4/4] Apply suggestion from @vicb --- src/workerd/io/compatibility-date.capnp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workerd/io/compatibility-date.capnp b/src/workerd/io/compatibility-date.capnp index b3407881e1d..48ce0b2089c 100644 --- a/src/workerd/io/compatibility-date.capnp +++ b/src/workerd/io/compatibility-date.capnp @@ -1230,7 +1230,7 @@ struct CompatibilityFlags @0x8f8c1b68151b6cef { fetchIterableTypeSupport @146 :Bool $compatEnableFlag("fetch_iterable_type_support") $compatDisableFlag("no_fetch_iterable_type_support") - $compatEnableDate("2026-02-12"); + $compatEnableDate("2026-02-19"); # Enables passing sync and async iterables as the body of fetch Request or Response. # Previously, sync iterables like Arrays would be accepted but stringified, and async # iterables would be treated as regular objects and not iterated over at all. With this