You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Miniflare supports passing the transformer argument to the TransformStream constructor. This worked for me and I could see chunks being passed to my transformer's transform method. Once I deployed this code to Cloudflare, the transform method is no longer called.
The Workers platform currently only implements an identity transform stream, a type of transform stream which forwards all chunks written to its writable side to its readable side, without any changes.
It seems like Cloudflare is ignoring the transformer argument, so perhaps Miniflare should as well? It is a platform difference that cost quite a bit of time to debug.
The text was updated successfully, but these errors were encountered:
leviwolfe
added a commit
to leviwolfe/miniflare-168
that referenced
this issue
Feb 1, 2022
Hey! 👋 This is an issue with all the stream constructors (ReadableStream, WritableStream, TransformStream). Implementations of the ReadableStream and WritableStream constructors were added recently, but are currently behind a compatibility flag: https://community.cloudflare.com/t/2021-12-10-workers-runtime-release-notes/334982. We should probably change this to throw when the flag isn't set. 👍
Miniflare supports passing the transformer argument to the TransformStream constructor. This worked for me and I could see chunks being passed to my transformer's transform method. Once I deployed this code to Cloudflare, the transform method is no longer called.
Cloudflare's Worker documentation for the TransformStream constructor makes no mention of the transformer argument. It only mentions:
It seems like Cloudflare is ignoring the transformer argument, so perhaps Miniflare should as well? It is a platform difference that cost quite a bit of time to debug.
The text was updated successfully, but these errors were encountered: