Releases: Zekfad/fetch_api
Releases · Zekfad/fetch_api
2.2.0
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
parametersT extends TypedData
andAbortType extends JSAny
instead of
singleAbortType
.
Method itself now always returnsReadableStream<JSUint8Array, AbortType>
,
this means that anyTypedData
is re-viewed to beUint8List
. - BREAKING
RequestBody
andResponseBody
now constructable only from
JS types:- Removed
fromByteBuffer
instead addedfromJSArrayBuffer
. - Removed
fromTypedData
instead addedfromJSTypedArray
. - Removed
fromString
instead addedfromJSString
. fromReadableStream
tightened type toReadableStream<JSUint8Array, JSAny>
because fetch supports only streams ofUint8Array
s.
- Removed
- BREAKING Fixed typo
RequestDestination.sharedworker
to
RequestDestination.sharedWorker
. - Fixed
Response
andRequest
not working in WASM: this happened due to JS
runtime being more lax in type assertions, namelyJSString
asString
is
ok in JS runtime, but fails in WASM. Response
andRequest
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
frompackage: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 type
s - no moreInstanceMembers
. - 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 ofList<String>
.FetchOptions
andRequestOptions
are now inherited fromRequestInit
and interchangeable.ReadableStreamSource
start
,pull
andcancel
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, andIteratorResult
falls 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
RequestInit
toFetchOptions
.
This is done to make emphasis, thatfetch
andRequest
have different
(default) behaviors. - Added
Request
. - Added
RequestDuplex
. This adds support for request streaming in supported
browsers. - Added
ReadableStreamSource
. This allows you to create custom
ReadableStream
s, that is required for request streaming. - Added
ReadableStreamDefaultController
. - Added
ReadableStreamSource
class that helps you to create custom source
forReadableStream
s. It can be created from Dart'sStream
. - Added
RequestCache
. - Added
RequestDestination
. - Added missing options to
RequestMode
and added docs. - Added
FetchOptions
andRequestOptions
with corresponding docs from MDN. - Compatibility layer:
- BREAKING: Renamed
createRequestInit
tocreateFetchOptions
- 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.Iterator
with Arrays. (Resolves issue withHeaders
).
1.0.0-dev.3
- BREAKING: Renamed extensions from
<Class>Extension
to<Class>InstanceMembers
. - Added
fetch_api.compatibility_layer
library to support Dart 2.19.- Added
createHeadersFromMap
- Added
createHeadersFromArray
- Added
createRequestInit
- Added
createAbortSignalTimeout
- Added
1.0.0-dev.2
- Downgraded
js
dependency to^0.6.5
.
1.0.0-dev.1 - Initial release
feat: initial commit