From 932c55a5bdfd75f9d93b21cbca441b883216e5e7 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson <niklasadolfsson1@gmail.com> Date: Thu, 10 Nov 2022 11:51:07 +0100 Subject: [PATCH] chore(release): v0.16.0 (#933) * chore(release): v0.16.0 * update release script * remove noise from changelog * update dependency banner --- CHANGELOG.md | 47 +++++++++++++++++++++++++++++++++++ README.md | 2 +- benches/Cargo.toml | 2 +- client/http-client/Cargo.toml | 6 ++--- client/transport/Cargo.toml | 6 ++--- client/wasm-client/Cargo.toml | 8 +++--- client/ws-client/Cargo.toml | 8 +++--- core/Cargo.toml | 4 +-- examples/Cargo.toml | 2 +- jsonrpsee/Cargo.toml | 18 +++++++------- proc-macros/Cargo.toml | 2 +- scripts/publish.sh | 2 +- server/Cargo.toml | 6 ++--- test-utils/Cargo.toml | 2 +- tests/Cargo.toml | 2 +- types/Cargo.toml | 2 +- 16 files changed, 83 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a69cfab20..8244088733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,53 @@ The format is based on [Keep a Changelog]. [Keep a Changelog]: http://keepachangelog.com/en/1.0.0/ +## [v0.16.0] - 2022-11-09 + +v0.16.0 is a breaking release and the major changes are: + +- The server now support WS and HTTP on the same socket and the `jsonrpsee-http-server` and `jsonrpsee-ws-server` crates are moved to the `jsonrpsee-server` crate instead. +- The client batch request API is improved such as the errors and valid responses can be iterated over. +- The server has `tower middleware` support. +- The server now adds a tracing span for each connection to distinguish logs per connection. +- CORS has been moved to `tower middleware`. + +### [Fixed] + +- server: read accepted conns properly ([#929](https://github.com/paritytech/jsonrpsee/pull/#929)) +- server: proper handling of batch errors and mixed calls ([#917](https://github.com/paritytech/jsonrpsee/pull/#917)) +- jsonrpsee: add `types` to server feature ([#891](https://github.com/paritytech/jsonrpsee/pull/#891)) +- http client: more user-friendly error messages when decoding fails ([#853](https://github.com/paritytech/jsonrpsee/pull/#853)) +- http_server: handle http2 requests host filtering correctly ([#866](https://github.com/paritytech/jsonrpsee/pull/#866)) +- server: `RpcModule::call` decode response correctly ([#839](https://github.com/paritytech/jsonrpsee/pull/#839)) + +### [Added] + +- proc macro: support camelCase & snake_case for object params ([#921](https://github.com/paritytech/jsonrpsee/pull/#921)) +- server: add connection span ([#922](https://github.com/paritytech/jsonrpsee/pull/#922)) +- server: Expose the subscription ID ([#900](https://github.com/paritytech/jsonrpsee/pull/#900)) +- jsonrpsee wrapper crate: add feature async_wasm_client ([#893](https://github.com/paritytech/jsonrpsee/pull/#893)) +- server: add `transport protocol details` to the logger trait ([#886](https://github.com/paritytech/jsonrpsee/pull/#886)) +- middleware: Implement proxy URI paths to RPC methods ([#859](https://github.com/paritytech/jsonrpsee/pull/#859)) +- client: Implement `notify_on_disconnect` ([#837](https://github.com/paritytech/jsonrpsee/pull/#837)) +- Add `bytes_len()` to Params ([#848](https://github.com/paritytech/jsonrpsee/pull/#848)) +- Benchmarks for different HTTP header sizes ([#824](https://github.com/paritytech/jsonrpsee/pull/#824)) + +### [Changed] + +- replace `WS and HTTP servers` with a server that supports both `WS and HTTP` ([#863](https://github.com/paritytech/jsonrpsee/pull/#863)) +- Optimize serialization for client parameters ([#864](https://github.com/paritytech/jsonrpsee/pull/#864)) +- Uniform log messages ([#855](https://github.com/paritytech/jsonrpsee/pull/#855)) +- Move CORS logic to tower middleware CorsLayer ([#851](https://github.com/paritytech/jsonrpsee/pull/#851)) +- server: add log for the http request ([#854](https://github.com/paritytech/jsonrpsee/pull/#854)) +- server: add `tower` support ([#831](https://github.com/paritytech/jsonrpsee/pull/#831)) +- jsonrpsee: less deps when defining RPC API. ([#849](https://github.com/paritytech/jsonrpsee/pull/#849)) +- server: rename `Middleware` to `Logger` ([#845](https://github.com/paritytech/jsonrpsee/pull/#845)) +- client: adjust TransportSenderT ([#852](https://github.com/paritytech/jsonrpsee/pull/#852)) +- client: improve batch request API ([#910](https://github.com/paritytech/jsonrpsee/pull/#910)) +- server: Optimize sending for `SubscriptionSink::pipe_from_stream` ([#901](https://github.com/paritytech/jsonrpsee/pull/#901)) +- ws-client: downgrade connection log to debug ([#865](https://github.com/paritytech/jsonrpsee/pull/#865)) +- use tracing instrument macro ([#846](https://github.com/paritytech/jsonrpsee/pull/#846)) + ## [v0.15.1] - 2022-07-29 This release fixes some incorrect tracing spans. diff --git a/README.md b/README.md index a99700b389..51619ae81b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ![MIT](https://img.shields.io/crates/l/jsonrpsee.svg) [![CI](https://github.com/paritytech/jsonrpsee/actions/workflows/ci.yml/badge.svg)](https://github.com/paritytech/jsonrpsee/actions/workflows/ci.yml) [![Benchmarks](https://github.com/paritytech/jsonrpsee/actions/workflows/benchmarks.yml/badge.svg)](https://github.com/paritytech/jsonrpsee/actions/workflows/benchmarks.yml) -[![dependency status](https://deps.rs/crate/jsonrpsee/0.15.1/status.svg)](https://deps.rs/crate/jsonrpsee/0.15.1) +[![dependency status](https://deps.rs/crate/jsonrpsee/0.16.0/status.svg)](https://deps.rs/crate/jsonrpsee/0.16.0) JSON-RPC library designed for async/await in Rust. diff --git a/benches/Cargo.toml b/benches/Cargo.toml index 03404ef5e4..030f123934 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-benchmarks" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>"] description = "Benchmarks for jsonrpsee" edition = "2021" diff --git a/client/http-client/Cargo.toml b/client/http-client/Cargo.toml index 284821a95e..1588b0a3d2 100644 --- a/client/http-client/Cargo.toml +++ b/client/http-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-http-client" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"] description = "HTTP client for JSON-RPC" edition = "2021" @@ -14,8 +14,8 @@ async-trait = "0.1" rustc-hash = "1" hyper = { version = "0.14.10", features = ["client", "http1", "http2", "tcp"] } hyper-rustls = { version = "0.23", optional = true } -jsonrpsee-types = { path = "../../types", version = "0.15.1" } -jsonrpsee-core = { path = "../../core", version = "0.15.1", features = ["client", "http-helpers"] } +jsonrpsee-types = { path = "../../types", version = "0.16.0" } +jsonrpsee-core = { path = "../../core", version = "0.16.0", features = ["client", "http-helpers"] } serde = { version = "1.0", default-features = false, features = ["derive"] } serde_json = "1.0" thiserror = "1.0" diff --git a/client/transport/Cargo.toml b/client/transport/Cargo.toml index 87312bcd1d..9a261ed1b6 100644 --- a/client/transport/Cargo.toml +++ b/client/transport/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-client-transport" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"] description = "WebSocket client for JSON-RPC" edition = "2021" @@ -10,8 +10,8 @@ homepage = "https://github.com/paritytech/jsonrpsee" documentation = "https://docs.rs/jsonrpsee-ws-client" [dependencies] -jsonrpsee-types = { path = "../../types", version = "0.15.1", optional = true } -jsonrpsee-core = { path = "../../core", version = "0.15.1", features = ["client"] } +jsonrpsee-types = { path = "../../types", version = "0.16.0", optional = true } +jsonrpsee-core = { path = "../../core", version = "0.16.0", features = ["client"] } tracing = "0.1.34" # optional diff --git a/client/wasm-client/Cargo.toml b/client/wasm-client/Cargo.toml index 3068179e30..104fede76a 100644 --- a/client/wasm-client/Cargo.toml +++ b/client/wasm-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-wasm-client" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"] description = "WASM client for JSON-RPC" edition = "2021" @@ -10,6 +10,6 @@ homepage = "https://github.com/paritytech/jsonrpsee" documentation = "https://docs.rs/jsonrpsee-ws-client" [dependencies] -jsonrpsee-types = { path = "../../types", version = "0.15.1" } -jsonrpsee-client-transport = { path = "../transport", version = "0.15.1", features = ["web"] } -jsonrpsee-core = { path = "../../core", version = "0.15.1", features = ["async-wasm-client"] } +jsonrpsee-types = { path = "../../types", version = "0.16.0" } +jsonrpsee-client-transport = { path = "../transport", version = "0.16.0", features = ["web"] } +jsonrpsee-core = { path = "../../core", version = "0.16.0", features = ["async-wasm-client"] } diff --git a/client/ws-client/Cargo.toml b/client/ws-client/Cargo.toml index 4995e62289..b86f79016f 100644 --- a/client/ws-client/Cargo.toml +++ b/client/ws-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-ws-client" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"] description = "WebSocket client for JSON-RPC" edition = "2021" @@ -10,9 +10,9 @@ homepage = "https://github.com/paritytech/jsonrpsee" documentation = "https://docs.rs/jsonrpsee-ws-client" [dependencies] -jsonrpsee-types = { path = "../../types", version = "0.15.1" } -jsonrpsee-client-transport = { path = "../transport", version = "0.15.1", features = ["ws"] } -jsonrpsee-core = { path = "../../core", version = "0.15.1", features = ["async-client"] } +jsonrpsee-types = { path = "../../types", version = "0.16.0" } +jsonrpsee-client-transport = { path = "../transport", version = "0.16.0", features = ["ws"] } +jsonrpsee-core = { path = "../../core", version = "0.16.0", features = ["async-client"] } http = "0.2.0" [dev-dependencies] diff --git a/core/Cargo.toml b/core/Cargo.toml index 100a62d6bc..a1e826d548 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-core" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>"] description = "Utilities for jsonrpsee" edition = "2021" @@ -11,7 +11,7 @@ anyhow = "1" async-trait = "0.1" beef = { version = "0.5.1", features = ["impl_serde"] } futures-channel = "0.3.14" -jsonrpsee-types = { path = "../types", version = "0.15.1" } +jsonrpsee-types = { path = "../types", version = "0.16.0" } thiserror = "1" serde = { version = "1.0", default-features = false, features = ["derive"] } serde_json = { version = "1", features = ["raw_value"] } diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 3a216179c4..39a1290154 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-examples" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>"] description = "Examples for jsonrpsee" edition = "2021" diff --git a/jsonrpsee/Cargo.toml b/jsonrpsee/Cargo.toml index 2f3d83e8db..25497e42ff 100644 --- a/jsonrpsee/Cargo.toml +++ b/jsonrpsee/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "jsonrpsee" description = "JSON-RPC crate" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"] license = "MIT" edition = "2021" @@ -12,14 +12,14 @@ documentation = "https://docs.rs/jsonrpsee" [dependencies] # No support for namespaced features yet so workspace dependencies are prefixed with `jsonrpsee-`. # See https://github.com/rust-lang/cargo/issues/5565 for more details. -jsonrpsee-http-client = { path = "../client/http-client", version = "0.15.1", optional = true } -jsonrpsee-ws-client = { path = "../client/ws-client", version = "0.15.1", optional = true } -jsonrpsee-wasm-client = { path = "../client/wasm-client", version = "0.15.1", optional = true } -jsonrpsee-client-transport = { path = "../client/transport", version = "0.15.1", optional = true } -jsonrpsee-server = { path = "../server", version = "0.15.1", optional = true } -jsonrpsee-proc-macros = { path = "../proc-macros", version = "0.15.1", optional = true } -jsonrpsee-core = { path = "../core", version = "0.15.1", optional = true } -jsonrpsee-types = { path = "../types", version = "0.15.1", optional = true } +jsonrpsee-http-client = { path = "../client/http-client", version = "0.16.0", optional = true } +jsonrpsee-ws-client = { path = "../client/ws-client", version = "0.16.0", optional = true } +jsonrpsee-wasm-client = { path = "../client/wasm-client", version = "0.16.0", optional = true } +jsonrpsee-client-transport = { path = "../client/transport", version = "0.16.0", optional = true } +jsonrpsee-server = { path = "../server", version = "0.16.0", optional = true } +jsonrpsee-proc-macros = { path = "../proc-macros", version = "0.16.0", optional = true } +jsonrpsee-core = { path = "../core", version = "0.16.0", optional = true } +jsonrpsee-types = { path = "../types", version = "0.16.0", optional = true } tracing = { version = "0.1.34", optional = true } [features] diff --git a/proc-macros/Cargo.toml b/proc-macros/Cargo.toml index c90eb40756..45f883ccb0 100644 --- a/proc-macros/Cargo.toml +++ b/proc-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "jsonrpsee-proc-macros" description = "Procedueral macros for jsonrpsee" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"] license = "MIT" edition = "2021" diff --git a/scripts/publish.sh b/scripts/publish.sh index 989c6177d3..cec3790dff 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -5,7 +5,7 @@ set -eu -ORDER=(types proc-macros core client/http-client http-server client/transport client/ws-client client/wasm-client ws-server jsonrpsee) +ORDER=(types proc-macros core client/http-client client/transport client/ws-client client/wasm-client server jsonrpsee) function read_toml () { NAME="" diff --git a/server/Cargo.toml b/server/Cargo.toml index b7e4df4f7c..ab4bbb626d 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-server" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>", "Pierre Krieger <pierre.krieger1708@gmail.com>"] description = "WebSocket server for JSON-RPC" edition = "2021" @@ -12,8 +12,8 @@ documentation = "https://docs.rs/jsonrpsee-ws-server" [dependencies] futures-channel = "0.3.14" futures-util = { version = "0.3.14", default-features = false, features = ["io", "async-await-macro"] } -jsonrpsee-types = { path = "../types", version = "0.15.1" } -jsonrpsee-core = { path = "../core", version = "0.15.1", features = ["server", "soketto", "http-helpers"] } +jsonrpsee-types = { path = "../types", version = "0.16.0" } +jsonrpsee-core = { path = "../core", version = "0.16.0", features = ["server", "soketto", "http-helpers"] } tracing = "0.1.34" serde = "1" serde_json = { version = "1", features = ["raw_value"] } diff --git a/test-utils/Cargo.toml b/test-utils/Cargo.toml index e88d200beb..e27a098183 100644 --- a/test-utils/Cargo.toml +++ b/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-test-utils" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>"] license = "MIT" edition = "2021" diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 1001e347ce..81f7bc4414 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-integration-tests" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>"] description = "Integration tests for jsonrpsee" edition = "2021" diff --git a/types/Cargo.toml b/types/Cargo.toml index 2c10e7e7ea..c465221e7a 100644 --- a/types/Cargo.toml +++ b/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jsonrpsee-types" -version = "0.15.1" +version = "0.16.0" authors = ["Parity Technologies <admin@parity.io>"] description = "Shared types for jsonrpsee" edition = "2021"