Skip to content

Commit fe84100

Browse files
committed
releng for v1.3.0
1 parent 8d59417 commit fe84100

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
This is the revision history of @msgpack/msgpack
22

3+
## v1.3.0 2019/05/29
4+
5+
https://github.com/msgpack/msgpack-javascript/compare/v1.2.3...v1.3.0
6+
7+
* Add `decodeArrayStream()` to decode an array and returns `AsyncIterable<unknown>` [#42](https://github.com/msgpack/msgpack-javascript/pull/42)
8+
* Add `decodeStream()` to decode an unlimited data stream [#46](https://github.com/msgpack/msgpack-javascript/pull/46)
9+
* Let `decodeAsync()` and `decodeArrayStream()` to take `ReadalbeStream<Uint8Array | ArrayLike<number>>` (whatwg-streams) [#43](https://github.com/msgpack/msgpack-javascript/pull/46)
10+
311
## v1.2.3 2019/05/29
412

513
https://github.com/msgpack/msgpack-javascript/compare/v1.2.2...v1.2.3

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,24 @@ maxExtLength | number | `4_294_967_295` (UINT32_MAX)
6363

6464
You can use `max${Type}Length` to limit the length of each type decoded.
6565

66-
### `decodeAsync(stream: AsyncIterable<ArrayLike<number> | Uint8Array>, options?: DecodeAsyncOptions): Promise<unknown>`
66+
### `decodeAsync(stream: AsyncIterable<Uint8Array | ArrayLike<number>> | ReadableStream<Uint8Array | ArrayLike<number>>, options?: DecodeAsyncOptions): Promise<unknown>`
6767

6868
It decodes `stream` in an async iterable of byte arrays and returns decoded data as `uknown` wrapped in `Promise`. This function works asyncronously.
6969

7070
Note that `decodeAsync()` acceps the same options as `decode()`.
7171

72+
### `decodeArrayStream(stream: AsyncIterable<Uint8Array | ArrayLike<number>> | ReadableStream<Uint8Array | ArrayLike<number>>, options?: DecodeAsyncOptions): AsyncIterable<unknown>`
73+
74+
It is alike to `decodeAsync()`, but only accepts an array of items as `stream`, and emits the decoded item one-by-one.
75+
76+
It throws errors when the input is not an array.
77+
78+
### `decodeStream(stream: AsyncIterable<Uint8Array | ArrayLike<number>> | ReadableStream<Uint8Array | ArrayLike<number>>, options?: DecodeAsyncOptions): AsyncIterable<unknown>`
79+
80+
It is like to `decodeAsync()` and `decodeArrayStream()`, but the input consists of independent MessagePack items.
81+
82+
In other words, it decodes an unlimited stream and emits an item one-by-one.
83+
7284
### Extension Types
7385

7486
To handle [MessagePack Extension Types](https://github.com/msgpack/msgpack/blob/master/spec.md#extension-types), this library provides `ExtensionCodec` class.

0 commit comments

Comments
 (0)