Skip to content

2.2.0

Latest
Compare
Choose a tag to compare
@Zekfad Zekfad released this 28 May 15:47
c3c8de6

2.2.0

Current usage is mostly limited to package:fetch_client and these changes
restores WASM support, therefore no major version bump was made.

  • BREAKING ReadableStreamDefaultReader.readAsStream is now generic as
    in actual stream.
  • BREAKING ReadableStream.fromTypedDataStream now have 2 generic
    parameters T extends TypedData and AbortType extends JSAny instead of
    single AbortType.
    Method itself now always returns ReadableStream<JSUint8Array, AbortType>,
    this means that any TypedData is re-viewed to be Uint8List.
  • BREAKING RequestBody and ResponseBody now constructable only from
    JS types:
    • Removed fromByteBuffer instead added fromJSArrayBuffer.
    • Removed fromTypedData instead added fromJSTypedArray.
    • Removed fromString instead added fromJSString.
    • fromReadableStream tightened type to ReadableStream<JSUint8Array, JSAny>
      because fetch supports only streams of Uint8Arrays.
  • BREAKING Fixed typo RequestDestination.sharedworker to
    RequestDestination.sharedWorker.
  • Fixed Response and Request not working in WASM: this happened due to JS
    runtime being more lax in type assertions, namely JSString as String is
    ok in JS runtime, but fails in WASM.
  • Response and Request now uses precise type
    ReadableStream<JSUint8Array, JSAny>

2.1.0

  • Add package:fetch_api/enums.dart fetch_api.enums package with enumerations
    available to all platforms (including VM).
  • Use DOMException from package:web instead 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:web with WASM support.
  • Full rewrite to use extension types - no more InstanceMembers.
  • Internal JS Iterators are now fully covered with generics.
  • JS Iterator is no longer exported via public API.
  • Headers uses (String, String) in entries instead of List<String>.
  • FetchOptions and RequestOptions are now inherited from RequestInit
    and interchangeable.
  • ReadableStreamSource start, pull and cancel are now only callable
    via JS interop, as they require binding to parent object.

1.0.3

  • Remove type from IteratorInstanceMembers to support old language
    version.
    Technically this is a breaking, and IteratorResult falls back to dynamic
    now, but it isn't exposed via public API and wrapper still works the same.