xml-streamify
xml-streamify copied to clipboard
Bun is missing TextDecoderStream
Bun is missing TextDecoderStream that is used from v0.5.0 onwards.
https://github.com/oven-sh/bun/issues/5648
Temporary fix 1: use v0.4.0 for now.
Temporary fix 2: add a polyfill based on Node's implementation.
I don't plan to fix this in XML Streamify.
I'll close this issue once Bun adds TextDecoderStream.
v0.4.0 was using TextDecoder on Uint8Array chunks which did not account for the possibility of UTF-8 characters straddling chunks. v0.5.0 pipes the stream through TextDecoderStream first and XMLStream accepts string instead of Uint8Array.