2.2.0
2.2.0
Current usage is mostly limited to
package:fetch_clientand these changes
restores WASM support, therefore no major version bump was made.
- BREAKING
ReadableStreamDefaultReader.readAsStreamis now generic as
in actual stream. - BREAKING
ReadableStream.fromTypedDataStreamnow have 2 generic
parametersT extends TypedDataandAbortType extends JSAnyinstead of
singleAbortType.
Method itself now always returnsReadableStream<JSUint8Array, AbortType>,
this means that anyTypedDatais re-viewed to beUint8List. - BREAKING
RequestBodyandResponseBodynow constructable only from
JS types:- Removed
fromByteBufferinstead addedfromJSArrayBuffer. - Removed
fromTypedDatainstead addedfromJSTypedArray. - Removed
fromStringinstead addedfromJSString. fromReadableStreamtightened type toReadableStream<JSUint8Array, JSAny>
because fetch supports only streams ofUint8Arrays.
- Removed
- BREAKING Fixed typo
RequestDestination.sharedworkerto
RequestDestination.sharedWorker. - Fixed
ResponseandRequestnot working in WASM: this happened due to JS
runtime being more lax in type assertions, namelyJSStringasStringis
ok in JS runtime, but fails in WASM. ResponseandRequestnow uses precise type
ReadableStream<JSUint8Array, JSAny>
2.1.0
- Add
package:fetch_api/enums.dartfetch_api.enumspackage with enumerations
available to all platforms (including VM). - Use
DOMExceptionfrompackage:webinstead of alias toJSObject. - Enumerations use
if (dart.library.io) ''for documentation-only imports,
this allows to use them in non-JS environments.
2.0.0
- BREAKING: migrate to
package:webwith WASM support. - Full rewrite to use
extension types - no moreInstanceMembers. - Internal JS Iterators are now fully covered with generics.
- JS Iterator is no longer exported via public API.
Headersuses(String, String)in entries instead ofList<String>.FetchOptionsandRequestOptionsare now inherited fromRequestInit
and interchangeable.ReadableStreamSourcestart,pullandcancelare now only callable
via JS interop, as they require binding to parent object.
1.0.3
- Remove type from
IteratorInstanceMembersto support old language
version.
Technically this is a breaking, andIteratorResultfalls back todynamic
now, but it isn't exposed via public API and wrapper still works the same.