bump all versions (#71)

tower reqwest-middleware-v0.2.0
Conrad Ludgate 2022-11-15 10:31:34 +00:00 committed by GitHub
parent 197f19781d
commit 289bb0452c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 35 additions and 15 deletions

View File

@ -6,11 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.2.0] - 2022-11-15
### Changed
- `RequestBuilder::try_clone` has a fixed function signature now
### Removed
- `RequestBuilder::send_with_extensions` - use `RequestBuilder::with_extensions` + `RequestBuilder::send` instead.
### Added ### Added
- Implementation of `Debug` trait for `RequestBuilder`. - Implementation of `Debug` trait for `RequestBuilder`.
- A new `RequestInitialiser` trait that can be added to `ClientWithMiddleware` - A new `RequestInitialiser` trait that can be added to `ClientWithMiddleware`
- A new `Extension` initialiser that adds extensions to the request - A new `Extension` initialiser that adds extensions to each request
- Adds `with_extension` method functionality to `RequestBuilder` that can add extensions for the `send` method to use - deprecating `send_with_extensions`. - Adds `with_extension` method functionality to `RequestBuilder` that can add extensions for the `send` method to use.
## [0.1.6] - 2022-04-21 ## [0.1.6] - 2022-04-21

View File

@ -1,6 +1,6 @@
[package] [package]
name = "reqwest-middleware" name = "reqwest-middleware"
version = "0.1.7-alpha.0" version = "0.2.0"
authors = ["Rodrigo Gryzinski <rodrigo.gryzinski@truelayer.com>"] authors = ["Rodrigo Gryzinski <rodrigo.gryzinski@truelayer.com>"]
edition = "2018" edition = "2018"
description = "Wrapper around reqwest to allow for client middleware chains." description = "Wrapper around reqwest to allow for client middleware chains."
@ -13,7 +13,6 @@ readme = "../README.md"
[dependencies] [dependencies]
anyhow = "1" anyhow = "1"
async-trait = "0.1.51" async-trait = "0.1.51"
futures = "0.3"
http = "0.2" http = "0.2"
reqwest = { version = "0.11", default-features = false, features = ["json", "multipart"] } reqwest = { version = "0.11", default-features = false, features = ["json", "multipart"] }
serde = "1" serde = "1"

View File

@ -1,4 +1,3 @@
use futures::future::{BoxFuture, FutureExt, TryFutureExt};
use reqwest::{Client, Request, Response}; use reqwest::{Client, Request, Response};
use std::sync::Arc; use std::sync::Arc;
use task_local_extensions::Extensions; use task_local_extensions::Extensions;
@ -76,6 +75,8 @@ pub struct Next<'a> {
middlewares: &'a [Arc<dyn Middleware>], middlewares: &'a [Arc<dyn Middleware>],
} }
pub type BoxFuture<'a, T> = std::pin::Pin<Box<dyn std::future::Future<Output = T> + Send + 'a>>;
impl<'a> Next<'a> { impl<'a> Next<'a> {
pub(crate) fn new(client: &'a Client, middlewares: &'a [Arc<dyn Middleware>]) -> Self { pub(crate) fn new(client: &'a Client, middlewares: &'a [Arc<dyn Middleware>]) -> Self {
Next { Next {
@ -91,9 +92,9 @@ impl<'a> Next<'a> {
) -> BoxFuture<'a, Result<Response>> { ) -> BoxFuture<'a, Result<Response>> {
if let Some((current, rest)) = self.middlewares.split_first() { if let Some((current, rest)) = self.middlewares.split_first() {
self.middlewares = rest; self.middlewares = rest;
current.handle(req, extensions, self).boxed() Box::pin(current.handle(req, extensions, self))
} else { } else {
self.client.execute(req).map_err(Error::from).boxed() Box::pin(async move { self.client.execute(req).await.map_err(Error::from) })
} }
} }
} }

View File

@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.2.0] - 2022-11-15
### Changed
- Updated `reqwest-middleware` to `0.2.0`
## [0.1.4] - 2022-02-21 ## [0.1.4] - 2022-02-21
### Changed ### Changed
- Updated `reqwest-middleware` to `0.1.5` - Updated `reqwest-middleware` to `0.1.5`

View File

@ -1,6 +1,6 @@
[package] [package]
name = "reqwest-retry" name = "reqwest-retry"
version = "0.1.6-alpha.0" version = "0.2.0"
authors = ["Rodrigo Gryzinski <rodrigo.gryzinski@truelayer.com>"] authors = ["Rodrigo Gryzinski <rodrigo.gryzinski@truelayer.com>"]
edition = "2018" edition = "2018"
description = "Retry middleware for reqwest." description = "Retry middleware for reqwest."
@ -10,7 +10,7 @@ keywords = ["reqwest", "http", "middleware", "retry"]
categories = ["web-programming::http-client"] categories = ["web-programming::http-client"]
[dependencies] [dependencies]
reqwest-middleware = { version = "0.1.7-alpha.0", path = "../reqwest-middleware" } reqwest-middleware = { version = "0.2.0", path = "../reqwest-middleware" }
anyhow = "1" anyhow = "1"
async-trait = "0.1.51" async-trait = "0.1.51"

View File

@ -5,11 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
## [0.4.0] - 2022-11-15
### Changed
- Updated `reqwest-middleware` to `0.2.0`
- Before, `root_span!`/`DefaultSpanBacked` would name your spans `{METHOD} {PATH}`. Since this can be quite
high cardinality, this was changed and now the macro requires an explicit otel name.
`DefaultSpanBacked`/`SpanBackendWithUrl` will default to `reqwest-http-client` but this can be configured
using the `OtelName` Request Initialiser.
### Added ### Added
- `SpanBackendWithUrl` for capturing `http.url` in traces - `SpanBackendWithUrl` for capturing `http.url` in traces
- Require an explicit otel name in the macros. Reduces cardinality and complies - `OtelName` Request Initialiser Extension for configuring
with otel specification for HTTP bindings.
- Permit customisation of the otel name from the non-macro layer.
## [0.3.1] - 2022-09-21 ## [0.3.1] - 2022-09-21
- Added support for `opentelemetry` version `0.18`. - Added support for `opentelemetry` version `0.18`.

View File

@ -1,6 +1,6 @@
[package] [package]
name = "reqwest-tracing" name = "reqwest-tracing"
version = "0.3.1-alpha.0" version = "0.4.0"
authors = ["Rodrigo Gryzinski <rodrigo.gryzinski@truelayer.com>"] authors = ["Rodrigo Gryzinski <rodrigo.gryzinski@truelayer.com>"]
edition = "2018" edition = "2018"
description = "Opentracing middleware for reqwest." description = "Opentracing middleware for reqwest."
@ -19,12 +19,11 @@ opentelemetry_0_18 = ["opentelemetry_0_18_pkg", "tracing-opentelemetry_0_18_pkg"
[dependencies] [dependencies]
reqwest-middleware = { version = "0.1.7-alpha.0", path = "../reqwest-middleware" } reqwest-middleware = { version = "0.2.0", path = "../reqwest-middleware" }
async-trait = "0.1.51" async-trait = "0.1.51"
reqwest = { version = "0.11", default-features = false } reqwest = { version = "0.11", default-features = false }
task-local-extensions = "0.1.1" task-local-extensions = "0.1.1"
tokio = { version = "1.6", features = ["time"] }
tracing = "0.1.26" tracing = "0.1.26"
opentelemetry_0_13_pkg = { package = "opentelemetry", version = "0.13", optional = true } opentelemetry_0_13_pkg = { package = "opentelemetry", version = "0.13", optional = true }