Releases: Zekfad/fetch_api
Releases · Zekfad/fetch_api
2.3.1
2.3.0
Requires Dart 3.6
- Use proper JS type checks.
- Add missing docs to public API.
- Add missing
FileandJSDataViewtoRequestBodyunion. - Add missing
JSDataViewtoResponseBodyunion. - Update license years.
ReadableStreamSourceCancelMethodFunctionreturnsJSPromiseOr, because this
method can return synchronously.- Fix
ReadableStreamSource.fromStreamcancel after error (#6) - Add
canStreamRequestsfunction to check if streaming is supported in
current browser.
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.
1.0.2
1.0.1
1.0.0
1.0.0-dev.5
- BREAKING: Renamed
RequestInittoFetchOptions.
This is done to make emphasis, thatfetchandRequesthave different
(default) behaviors. - Added
Request. - Added
RequestDuplex. This adds support for request streaming in supported
browsers. - Added
ReadableStreamSource. This allows you to create custom
ReadableStreams, that is required for request streaming. - Added
ReadableStreamDefaultController. - Added
ReadableStreamSourceclass that helps you to create custom source
forReadableStreams. It can be created from Dart'sStream. - Added
RequestCache. - Added
RequestDestination. - Added missing options to
RequestModeand added docs. - Added
FetchOptionsandRequestOptionswith corresponding docs from MDN. - Compatibility layer:
- BREAKING: Renamed
createRequestInittocreateFetchOptions - Added
createRequestOptions. - Added
createReadableStream. - Added
createReadableStreamSourceFromStream.
- BREAKING: Renamed
- Fixed dev dependencies versions, to allow running on Dart 2.19.
1.0.0-dev.4
- Fixes for
js.Iteratorwith Arrays. (Resolves issue withHeaders).
1.0.0-dev.3
- BREAKING: Renamed extensions from
<Class>Extensionto<Class>InstanceMembers. - Added
fetch_api.compatibility_layerlibrary to support Dart 2.19.- Added
createHeadersFromMap - Added
createHeadersFromArray - Added
createRequestInit - Added
createAbortSignalTimeout
- Added
1.0.0-dev.2
- Downgraded
jsdependency to^0.6.5.