Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Mar 5, 2024
1 parent 609bfed commit e6179a4
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 68 deletions.
5 changes: 0 additions & 5 deletions .changeset/dry-avocados-taste.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- run: pnpm run doc:api
- uses: changesets/action@v1
with:
publish: node ./.github/workflows && npx jsr publish && npx changeset publish
publish: node ./.github/publish.mjs && npx jsr publish && npx changeset publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
128 changes: 67 additions & 61 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,94 @@
# Changelog

## 6.4.1

### Patch Changes

- 609bfed: publish on jsr registry

## 6.4.0

### Minor Changes

- fd34f22: add a new `encoder` option and deprecate the 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,
};
- fd34f22: add a new `encoder` option and deprecate the old `serializer` option

// after
const options = {
channel,
};
```
how to migrate:

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

// after
const options = {
channel,
encoder: JSONEncoder(),
};
```
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)`.
- 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`.
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 introduces a new option `encoder` to replace `serialization`. `serialization` is always working in isomorphic way.
This version introduces 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` is not present, only `encoder.decode` will be called.
- 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` is not present, only `encoder.decode` will be called.

- 0d0900b: rename "key" to "name"
- 0d0900b: rename "key" to "name"

- fd34f22: `BSON_Serialization` and `Msgpack_Serialization` is now deprecated
- fd34f22: `BSON_Serialization` and `Msgpack_Serialization` is now deprecated

- 0431c15: rename `AsyncCallStrictJSONRPC` to `AsyncCallStrictOptions`
- 0431c15: rename `AsyncCallStrictJSONRPC` to `AsyncCallStrictOptions`

- 8a38d8b: add `signal` and `forceSignal` to stop the instance
- 8a38d8b: add `signal` and `forceSignal` to stop the instance

- c9bbbd2: rename `parameterStructures` to `parameterStructure`
- c9bbbd2: rename `parameterStructures` to `parameterStructure`

- fd34f22: expose JSON-RPC interfaces
- fd34f22: expose JSON-RPC interfaces

- fd34f22: new built-in `JSONEncoder` for the new encode option.
- fd34f22: new built-in `JSONEncoder` for the new encode option.

### Patch Changes

- fd34f22: Add `Promise<void>` into return signature of `EventBasedChannel.send`
- fd34f22: Add `Promise<void>` into return signature of `EventBasedChannel.send`

## 6.3.1

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.4.0",
"version": "6.4.1",
"description": "A lightweight JSON RPC server & client",
"main": "out/base.js",
"module": "out/base.mjs",
Expand Down

0 comments on commit e6179a4

Please sign in to comment.