Skip to content

Commit

Permalink
Upgrade all examples dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
elichai committed Aug 18, 2024
1 parent 49f5fe7 commit 3255ce1
Show file tree
Hide file tree
Showing 34 changed files with 49 additions and 57 deletions.
2 changes: 1 addition & 1 deletion examples/chat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ publish = false
axum = { path = "../../axum", features = ["ws"] }
futures = "0.3"
tokio = { version = "1", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
4 changes: 2 additions & 2 deletions examples/compression/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ axum = { path = "../../axum" }
axum-extra = { path = "../../axum-extra", features = ["typed-header"] }
serde_json = "1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tower = "0.4"
tower = "0.5"
tower-http = { version = "0.5", features = ["compression-full", "decompression-full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[dev-dependencies]
assert-json-diff = "2.0"
brotli = "3.4"
brotli = "6"
flate2 = "1"
http = "1"
zstd = "0.13"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ axum = { path = "../../axum" }
http-body-util = "0.1.0"
hyper = "1.0.0"
tokio = { version = "1.0", features = ["full"] }
tower = "0.4"
tower = "0.5"
tower-http = { version = "0.5.0", features = ["map-request-body", "util"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/diesel-async-postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
axum = { path = "../../axum", features = ["macros"] }
bb8 = "0.8"
diesel = "2"
diesel-async = { version = "0.3", features = ["postgres", "bb8"] }
diesel-async = { version = "0.5", features = ["postgres", "bb8"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
tokio = { version = "1.0", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/diesel-postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish = false

[dependencies]
axum = { path = "../../axum", features = ["macros"] }
deadpool-diesel = { version = "0.4.1", features = ["postgres"] }
deadpool-diesel = { version = "0.6", features = ["postgres"] }
diesel = { version = "2", features = ["postgres"] }
diesel_migrations = "2"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/global-404-handler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/graceful-shutdown/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ axum = { path = "../../axum", features = ["tracing"] }
hyper = { version = "1.0", features = [] }
hyper-util = { version = "0.1", features = ["tokio", "server-auto", "http1"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
tower-http = { version = "0.5", features = ["timeout", "trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/handle-head-request/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ tokio = { version = "1.0", features = ["full"] }
[dev-dependencies]
http-body-util = "0.1.0"
hyper = { version = "1.0.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
2 changes: 1 addition & 1 deletion examples/http-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ axum = { path = "../../axum" }
hyper = { version = "1", features = ["full"] }
hyper-util = "0.1.1"
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["make"] }
tower = { version = "0.5", features = ["make"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/jwt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
axum-extra = { path = "../../axum-extra", features = ["typed-header"] }
jsonwebtoken = "8.0"
jsonwebtoken = "9.0"
once_cell = "1.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/key-value-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util", "timeout", "load-shed", "limit"] }
tower = { version = "0.5", features = ["util", "timeout", "load-shed", "limit"] }
tower-http = { version = "0.5.0", features = [
"add-extension",
"auth",
Expand Down
2 changes: 1 addition & 1 deletion examples/listen-multiple-addrs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ axum = { path = "../../axum" }
hyper = { version = "1.0.0", features = ["full"] }
hyper-util = { version = "0.1", features = ["tokio", "server-auto", "http1"] }
tokio = { version = "1", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
2 changes: 1 addition & 1 deletion examples/low-level-openssl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ hyper-util = { version = "0.1" }
openssl = "0.10"
tokio = { version = "1", features = ["full"] }
tokio-openssl = "0.6"
tower = { version = "0.4", features = ["make"] }
tower = { version = "0.5", features = ["make"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
6 changes: 3 additions & 3 deletions examples/low-level-rustls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ axum = { path = "../../axum" }
futures-util = { version = "0.3", default-features = false }
hyper = { version = "1.0.0", features = ["full"] }
hyper-util = { version = "0.1" }
rustls-pemfile = "1.0.4"
rustls-pemfile = "2"
tokio = { version = "1", features = ["full"] }
tokio-rustls = "0.24.1"
tower = { version = "0.4", features = ["make"] }
tokio-rustls = "0.26"
tower = { version = "0.5", features = ["make"] }
tower-service = "0.3.2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
16 changes: 4 additions & 12 deletions examples/low-level-rustls/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ use std::{
sync::Arc,
};
use tokio::net::TcpListener;
use tokio_rustls::{
rustls::{Certificate, PrivateKey, ServerConfig},
TlsAcceptor,
};
use tokio_rustls::{rustls::ServerConfig, TlsAcceptor};
use tower_service::Service;
use tracing::{error, info, warn};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
Expand Down Expand Up @@ -98,17 +95,12 @@ fn rustls_server_config(key: impl AsRef<Path>, cert: impl AsRef<Path>) -> Arc<Se
let mut key_reader = BufReader::new(File::open(key).unwrap());
let mut cert_reader = BufReader::new(File::open(cert).unwrap());

let key = PrivateKey(pkcs8_private_keys(&mut key_reader).unwrap().remove(0));
let certs = certs(&mut cert_reader)
.unwrap()
.into_iter()
.map(Certificate)
.collect();
let key = pkcs8_private_keys(&mut key_reader).next().unwrap().unwrap();
let certs = certs(&mut cert_reader).collect::<Result<_, _>>().unwrap();

let mut config = ServerConfig::builder()
.with_safe_defaults()
.with_no_client_auth()
.with_single_cert(certs, key)
.with_single_cert(certs, key.into())
.expect("bad certificate/key");

config.alpn_protocols = vec![b"h2".to_vec(), b"http/1.1".to_vec()];
Expand Down
2 changes: 1 addition & 1 deletion examples/print-request-response/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ axum = { path = "../../axum" }
http-body-util = "0.1.0"
hyper = { version = "1.0.0", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util", "filter"] }
tower = { version = "0.5", features = ["util", "filter"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
4 changes: 2 additions & 2 deletions examples/prometheus-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ publish = false

[dependencies]
axum = { path = "../../axum" }
metrics = { version = "0.22", default-features = false }
metrics-exporter-prometheus = { version = "0.13", default-features = false }
metrics = { version = "0.23", default-features = false }
metrics-exporter-prometheus = { version = "0.15", default-features = false }
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/query-params-with-empty-strings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ http-body-util = "0.1.0"
hyper = "1.0.0"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
10 changes: 5 additions & 5 deletions examples/rest-grpc-multiplex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ publish = false
axum = { path = "../../axum" }
futures = "0.3"
hyper = { version = "1.0.0", features = ["full"] }
prost = "0.11"
prost = "0.13"
tokio = { version = "1", features = ["full"] }
tonic = { version = "0.9" }
tonic-reflection = "0.9"
tower = { version = "0.4", features = ["full"] }
tonic = { version = "0.12" }
tonic-reflection = "0.12"
tower = { version = "0.5", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[build-dependencies]
tonic-build = { version = "0.9", features = ["prost"] }
tonic-build = { version = "0.12", features = ["prost"] }
2 changes: 1 addition & 1 deletion examples/serve-with-hyper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ axum = { path = "../../axum" }
hyper = { version = "1.0", features = [] }
hyper-util = { version = "0.1", features = ["tokio", "server-auto", "http1"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
2 changes: 1 addition & 1 deletion examples/sqlx-postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "any", "postgres"] }
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "any", "postgres"] }
2 changes: 1 addition & 1 deletion examples/sse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[dev-dependencies]
eventsource-stream = "0.2"
reqwest = { version = "0.12", features = ["stream"] }
reqwest-eventsource = "0.5"
reqwest-eventsource = "0.6"
2 changes: 1 addition & 1 deletion examples/static-file-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
axum = { path = "../../axum" }
axum-extra = { path = "../../axum-extra" }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
tower-http = { version = "0.5.0", features = ["fs", "trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/templates-minijinja/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ publish = false

[dependencies]
axum = { path = "../../axum" }
minijinja = "1.0.11"
minijinja = "2"
tokio = { version = "1.0", features = ["full"] }
2 changes: 1 addition & 1 deletion examples/templates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies]
askama = "0.11"
askama = "0.12"
axum = { path = "../../axum" }
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[dev-dependencies]
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
4 changes: 2 additions & 2 deletions examples/tls-graceful-shutdown/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ publish = false

[dependencies]
axum = { path = "../../axum" }
axum-server = { version = "0.6", features = ["tls-rustls"] }
hyper = { version = "0.14", features = ["full"] }
axum-server = { version = "0.7", features = ["tls-rustls"] }
hyper = { version = "1", features = ["full"] }
tokio = { version = "1", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/tls-rustls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish = false

[dependencies]
axum = { path = "../../axum" }
axum-server = { version = "0.6", features = ["tls-rustls"] }
axum-server = { version = "0.7", features = ["tls-rustls"] }
tokio = { version = "1", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/todos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
axum = { path = "../../axum" }
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util", "timeout"] }
tower = { version = "0.5", features = ["util", "timeout"] }
tower-http = { version = "0.5.0", features = ["add-extension", "trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Expand Down
4 changes: 2 additions & 2 deletions examples/tokio-postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ publish = false

[dependencies]
axum = { path = "../../axum" }
bb8 = "0.7.1"
bb8-postgres = "0.7.0"
bb8 = "0.8"
bb8-postgres = "0.8.0"
tokio = { version = "1.0", features = ["full"] }
tokio-postgres = "0.7.2"
tracing = "0.1"
Expand Down
6 changes: 3 additions & 3 deletions examples/tokio-redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ publish = false

[dependencies]
axum = { path = "../../axum" }
bb8 = "0.7.1"
bb8-redis = "0.14.0"
redis = "0.24.0"
bb8 = "0.8"
bb8-redis = "0.16"
redis = "0.26"
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/unix-domain-socket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ http-body-util = "0.1"
hyper = { version = "1.0.0", features = ["full"] }
hyper-util = { version = "0.1", features = ["tokio", "server-auto", "http1"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion examples/validator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ thiserror = "1.0.29"
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
validator = { version = "0.14.0", features = ["derive"] }
validator = { version = "0.18.0", features = ["derive"] }
2 changes: 1 addition & 1 deletion examples/websockets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ futures-util = { version = "0.3", default-features = false, features = ["sink",
headers = "0.4"
tokio = { version = "1.0", features = ["full"] }
tokio-tungstenite = "0.23"
tower = { version = "0.4", features = ["util"] }
tower = { version = "0.5", features = ["util"] }
tower-http = { version = "0.5.0", features = ["fs", "trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Expand Down

0 comments on commit 3255ce1

Please sign in to comment.