Releases: shogowada/json-rpc-2.0
Releases · shogowada/json-rpc-2.0
v1.1.0
v1.0.0
- Support batch requests
Breaking changes:
JSONRPCClient.receiveJSON
now returnsPromiseLike<JSONRPCResponse | JSONRPCResponse[] | null>
.- It used to return
PromiseLike<JSONRPCResponse | null>
.
- It used to return
- It drops support for using higher-order function to access client params and server params.
- It uses async/await.
- It depends on TypeScript v4.
- It used to depend on v3.
- I don't think we introduced anything new yet, but we will start using new features (e.g.,
unknown
) as we see fit.
v0.2.19
v0.2.18
v0.2.17
v0.2.14
- Exposed
addMethodAdvanced
andrequestAdvanced
fromJSONRPCServerAndClient
const serverAndClient = new JSONRPCServerAndClient(/* ... */); // Old way (still works) serverAndClient.server.addMethodAdvanced(/* ... */); serverAndClient.client.requestAdvanced(/* ... */); // New way (recommended) serverAndClient.addMethodAdvanced(/* ... */); serverAndClient.requestAdvanced(/* ... */);
v0.2.13
- Deprecated using a higher-order function to receive client params
// Old way (still works, but deprecated) new JSONRPCClient((jsonRPCRequest) => (clientParams) => /* send the request to server */); // New way new JSONRPCClient((jsonRPCRequest, clientParams) => /* send the request to server */)
- Deprecated using a higher-order function to receive server params
const server = new JSONRPCServer(); // Old way (still works, but deprecated) server.addMethod("doSomething", (params) => (serverParams) => /* do something */); // New way server.addMethod("doSomething", (params, serverParams) => /* do something */);