Skip to content

Commit

Permalink
Version Packages (#68)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] committed Feb 12, 2024
1 parent 8e181d2 commit 4a8735c
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 109 deletions.
54 changes: 0 additions & 54 deletions .changeset/five-olives-cheat.md

This file was deleted.

14 changes: 0 additions & 14 deletions .changeset/grumpy-phones-listen.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lemon-bikes-bake.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/odd-scissors-admire.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/perfect-icons-vanish.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/short-eels-cover.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/smooth-ties-nail.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/spicy-rivers-act.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/strange-readers-agree.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tidy-trains-bathe.md

This file was deleted.

78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,83 @@
# Changelog

## 6.4.0

### Minor Changes

- fd34f22: add new `encoder` option and deprecate old `serializer` option

how to migrate:

```ts
// before
const options = {
channel,
serializer: {
serialization(data) { return ... },
deserialization(data) { return ... },
},
}

// after
const options = {
channel,
encoder: {
encode(data) { return ... },
decode(data) { return ... },
},
}
```

```ts
// before
const options = {
channel,
serializer: NoSerialization,
};
// after
const options = {
channel,
};
```

```ts
// before
const options = {
channel,
serializer: JSONSerialization(),
};
// after
const options = {
channel,
encoder: JSONEncoder(),
};
```

- fd34f22: `hint` added to the `CallbackBasedChannel.setup(jsonRPCHandlerCallback)` and `EventBasedChannel.on(listener)`.

For an isomorphic instance of `AsyncCall` (used as both a server and a client),
when a new message comes, it does not clear if to call `decodeRequest` or `decodeRespones`.

This version introduce a new option `encoder` to replace `serialization`. `serialization` is always working in isomorphic way.

- If `hint` is `"request"`, `(encoder as ServerEncoding).decodeRequest` will be called first, if this method does not exist, `(encoder as IsomorphicEncoder).decode` will be called.
- If `hint` is `"response"`, `(encoder as ClientEncoding).decodeResponse` will be called first, if this method does not exist, `(encoder as IsomorphicEncoder).decode` will be called.
- If `hint` does not present, only `encoder.decode` will be called.

- 0d0900b: rename "key" to "name"
- fd34f22: `BSON_Serialization` and `Msgpack_Serialization` is now deprecated
- 0431c15: rename `AsyncCallStrictJSONRPC` to `AsyncCallStrictOptions`
- 8a38d8b: add `signal` and `forceSignal` to stop the instance
- c9bbbd2: rename `parameterStructures` to `parameterStructure`
- fd34f22: expose JSON-RPC interfaces
- fd34f22: new built-in `JSONEncoder` for the new encode option.

### Patch Changes

- fd34f22: Add `Promise&lt;void&gt;` into return signature of `EventBasedChannel.send`

## 6.3.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "async-call-rpc",
"packageManager": "pnpm@8.15.1",
"version": "6.3.1",
"version": "6.4.0",
"description": "A lightweight JSON RPC server & client",
"main": "out/base.js",
"module": "out/base.mjs",
Expand Down

0 comments on commit 4a8735c

Please sign in to comment.