Releases: MattiasBuelens/web-streams-polyfill
Releases · MattiasBuelens/web-streams-polyfill
v3.1.1
v3.1.0
- 🚀 Calling
ReadableStream.tee()
on a readable byte stream now returns two readable byte streams. (#81) - 🚀 Add
WritableStreamDefaultController.signal
and.abortReason
. (#81).signal
requires a globalAbortController
constructor to be available. If necessary, use a polyfill.
- 🐛 Make sure streams created with a different version of the polyfill do not pass the brand checks. (#75, #77)
- 👓 Align with spec version
cada812
(#79, #81)
v3.0.3
- 💅 Change
Promise<void>
toPromise<undefined>
in TypeScript type definitions (#72) - 🐛 Fix
ReadableStream.tee()
resolving itscancel()
promise too early (#73) - 👓 Align with spec version
6762cdb
(#73)
v3.0.2
- 👓 Align with spec version
200c971
(#69)
v3.0.1
v3.0.0
- 💥 Align with spec version
62fe4c8
(#52, #57, #59)
This includes the following breaking changes:- All classes are now exposed globally. Concretely, this adds the following classes:
ReadableStreamDefaultController
ReadableByteStreamController
ReadableStreamBYOBRequest
ReadableStreamDefaultReader
ReadableStreamBYOBReader
WritableStreamDefaultController
WritableStreamDefaultWriter
TransformStreamDefaultController
ReadableStream.getIterator()
is renamed toReadableStream.values()
ReadableByteStreamController.byobRequest
can benull
(instead ofundefined
) if there is no current BYOB request.ReadableStreamBYOBRequest.view
can benull
(instead ofundefined
) if the BYOB request has already been responded to.- Constructors and methods have stricter type checking for object arguments. For example,
new ReadableStream(null)
would previously behave likenew ReadableStream({})
, but now it throws aTypeError
instead. - Some constructors and methods may throw slightly different errors when given invalid arguments.
- Various byte-stream-related APIs now prohibit zero-length views or buffers.
- The async iterator of a
ReadableStream
now behaves more like an async generator, e.g. returning promises fulfilled with{ value: undefined, done: true }
afterreturn()
ing the iterator, instead of returning a rejected promise.
- All classes are now exposed globally. Concretely, this adds the following classes:
- 💥 Updated TypeScript types to align with new specification (#60)
While these are technically breaking changes, you should only be affected if you manually reference these types from your code.PipeOptions
is renamed toStreamPipeOptions
ReadResult
is replaced byReadableStreamDefaultReadResult
andReadableStreamBYOBReadResult
ReadableStreamDefaultControllerCallback
is replaced byUnderlyingSourceStartCallback
andUnderlyingSourcePullCallback
ReadableByteStreamControllerCallback
is replaced byUnderlyingByteSourceStartCallback
andUnderlyingByteSourcePullCallback
ReadableStreamErrorCallback
is renamed toUnderlyingSourceCancelCallback
WritableStreamDefaultControllerStartCallback
is renamed toUnderlyingSinkStartCallback
WritableStreamDefaultControllerWriteCallback
is renamed toUnderlyingSinkWriteCallback
WritableStreamDefaultControllerCloseCallback
is renamed toUnderlyingSinkCloseCallback
WritableStreamErrorCallback
is renamed toUnderlyingSinkAbortCallback
TransformStreamDefaultControllerCallback
is replaced byTransformerStartCallback
andTransformerFlushCallback
TransformStreamDefaultControllerTransformCallback
is renamed toTransformerTransformCallback
v2.1.1
v2.1.0
- 👓 Align with spec version
ed00d2f
(#43, #44) - 🏠 Down-level type definitions for older TypeScript versions. (#41)
v2.0.6
v2.0.5
- 👓 Align with spec version
ae5e0cb
(#33) - 🐛 Fix support for non-browser environments, such as Node.