Releases: MattiasBuelens/web-streams-polyfill
Releases · MattiasBuelens/web-streams-polyfill
v4.1.0
- 👓 Align with spec version
fa4891a
(#156)- Commit pull-into descriptors after filling them from the internal queue. This prevents an issue where an incorrect BYOB request would temporarily be visible through a patched
Object.prototype.then
, which broke some internal invariants. - The
next()
andreturn()
methods ofReadableStream
's async iterator are now correctly "chained", such that the promises returned by either of these methods are always resolved in the same order as those methods were called.
- Commit pull-into descriptors after filling them from the internal queue. This prevents an issue where an incorrect BYOB request would temporarily be visible through a patched
- 💅 Improve type of
WritableStreamDefaultController.signal
. (#157)
v4.0.0
- 💥 Rework the list of variants to have more modern defaults. The table below shows how to upgrade your v3 import to their equivalent v4 import. See the migration guide for more information. (#82, #139)
- 💥 Remove the ES2018 variant, in favor of the ES2015 variant.
- 💥 Switch to subpath exports for variants.
- Node 12 or higher is required to
import
orrequire()
a variant. - When using TypeScript, version 4.7 or higher is now required. Additionally,
moduleResolution
must be set to"node16"
,"nodenext"
or"bundler"
.
- Node 12 or higher is required to
- 🚀 Support importing as ESM in Node.
- 💅 Minify all code in the published package, to reduce the download size.
- 💅 Rework
ReadableStream.from()
implementation to avoid depending onasync function*
down-leveling for ES5. (#144)
v3 import | v4 import | description |
---|---|---|
web-streams-polyfill |
web-streams-polyfill/polyfill/es5 |
ES5+ polyfill |
web-streams-polyfill/es6 |
web-streams-polyfill/polyfill |
ES2015+ polyfill |
web-streams-polyfill/es2018 |
web-streams-polyfill/polyfill |
ES2015+ polyfill |
web-streams-polyfill/ponyfill |
web-streams-polyfill/es5 |
ES5+ ponyfill |
web-streams-polyfill/ponyfill/es6 |
web-streams-polyfill |
ES2015+ ponyfill |
web-streams-polyfill/ponyfill/es2018 |
web-streams-polyfill |
ES2015+ ponyfill |
v3.3.3
v3.3.2
- 🐛 Fix bad publish to npm.
v3.3.1
v3.3.0
- 🚀 Added global augmentations for
ReadableStream
to the polyfill's type definitions. (#130)- This allows TypeScript users to use new methods such as
ReadableStream.prototype[Symbol.asyncIterator]()
, even when TypeScript doesn't yet have a built-in type definition for them.
- This allows TypeScript users to use new methods such as
💥 The type definitions now require TypeScript 3.6 or higher. (#130)(Reverted in version 3.3.1)- 👓 Align with spec version
4dc123a
(#115, #134)- Added
ReadableStream.from(asyncIterable)
, which creates aReadableStream
wrapping the given iterable or async iterable. This can also be used to wrap a nativeReadableStream
(e.g. aResponse.body
fromfetch()
), even if the nativeReadableStream
doesn't yet support async iteration. (#135) - Added
Transformer.cancel
method, which is called when the readable side of aTransformStream
is cancelled or when its writable side is aborted. - Added
min
option toReadableStreamBYOBReader.read(view, options)
. - Added support for
AbortSignal.reason
when aborting a pipe.
- Added
- 🚀 Buffers passed to
ReadableStreamBYOBReader.read(view)
will now be correctly transferred if eitherArrayBuffer.prototype.transfer()
orstructuredClone()
is available. (#136) - 🐛 Prevent warnings from Bluebird about a promise being created within a handler but not being returned from a handler. (#131)
- 🏠 Improve internal
DOMException
polyfill. (#133)
v4.0.0-beta.3
- 👓 Align with spec version
e9355ce
. (#115, #117) - 🐛 Fix
pipeTo()
never rejecting when aborting itssignal
andpreventCancel
is set totrue
. (#118, #119)
v4.0.0-beta.2
- 🚀 Support calling
ReadableStream.pipeTo(writable)
and.pipeThrough({ readable, writable })
whenwritable
is a native (i.e. not polyfilled)WritableStream
. (#99, #101) - 💅 Add fallback for package exports for backwards compatibility with older Node versions. (#107)
- 🐛 Prevent warnings from Bluebird about a promise being created within a handler but not being returned from a handler. (#91)
v3.2.1
v3.2.0
- 👎 Deprecate
WritableStreamDefaultController.abortReason
(#102)- Use
WritableStreamDefaultController.signal.reason
instead.
- Use
- 👓 Align with spec version
4b6b93c
(#103)