diff --git a/Cargo.lock b/Cargo.lock index 641c444ec3..fe74b22be5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -582,9 +582,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "bytestring" @@ -1744,10 +1744,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -2435,9 +2436,9 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "postcard" -version = "1.0.10" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7f0a8d620d71c457dd1d47df76bb18960378da56af4527aaa10f515eee732e" +checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8" dependencies = [ "cobs", "embedded-io 0.4.0", @@ -3895,9 +3896,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -3907,9 +3908,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -3918,9 +3919,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] @@ -4004,9 +4005,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.3" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -4117,12 +4118,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] @@ -4171,9 +4173,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/any_spawner/Cargo.toml b/any_spawner/Cargo.toml index 5ef333e2a2..f0bccc9b2f 100644 --- a/any_spawner/Cargo.toml +++ b/any_spawner/Cargo.toml @@ -16,8 +16,8 @@ thiserror = "2.0" tokio = { version = "1.41", optional = true, default-features = false, features = [ "rt", ] } -tracing = { version = "0.1.40", optional = true } -wasm-bindgen-futures = { version = "0.4.45", optional = true } +tracing = { version = "0.1.41", optional = true } +wasm-bindgen-futures = { version = "0.4.47", optional = true } [features] async-executor = ["dep:async-executor"] diff --git a/hydration_context/Cargo.toml b/hydration_context/Cargo.toml index 3fe83f561d..987bb588be 100644 --- a/hydration_context/Cargo.toml +++ b/hydration_context/Cargo.toml @@ -15,7 +15,7 @@ or_poisoned = { workspace = true } futures = "0.3.31" serde = { version = "1.0", features = ["derive"] } wasm-bindgen = { version = "0.2.97", optional = true } -js-sys = { version = "0.3.72", optional = true } +js-sys = { version = "0.3.74", optional = true } once_cell = "1.20" pin-project-lite = "0.2.15" diff --git a/integrations/axum/Cargo.toml b/integrations/axum/Cargo.toml index b912c1ce4c..04ed5e4dc1 100644 --- a/integrations/axum/Cargo.toml +++ b/integrations/axum/Cargo.toml @@ -27,7 +27,7 @@ parking_lot = "0.12.3" tokio = { version = "1.41", default-features = false } tower = { version = "0.5.1", features = ["util"] } tower-http = "0.6.2" -tracing = { version = "0.1.40", optional = true } +tracing = { version = "0.1.41", optional = true } [dev-dependencies] axum = "0.7.9" diff --git a/integrations/utils/src/lib.rs b/integrations/utils/src/lib.rs index ab0d199a35..666e3c67de 100644 --- a/integrations/utils/src/lib.rs +++ b/integrations/utils/src/lib.rs @@ -40,15 +40,28 @@ pub trait ExtendResponse: Sized { let (owner, stream) = build_response(app_fn, additional_context, stream_builder); + let sc = owner.shared_context().unwrap(); + let stream = stream.await.ready_chunks(32).map(|n| n.join("")); - let sc = owner.shared_context().unwrap(); while let Some(pending) = sc.await_deferred() { pending.await; } - let mut stream = - Box::pin(meta_context.inject_meta_context(stream).await); + let mut stream = Box::pin( + meta_context.inject_meta_context(stream).await.then({ + let sc = Arc::clone(&sc); + move |chunk| { + let sc = Arc::clone(&sc); + async move { + while let Some(pending) = sc.await_deferred() { + pending.await; + } + chunk + } + } + }), + ); // wait for the first chunk of the stream, then set the status and headers let first_chunk = stream.next().await.unwrap_or_default(); diff --git a/leptos/Cargo.toml b/leptos/Cargo.toml index b56b0bbdf8..5ba94845a7 100644 --- a/leptos/Cargo.toml +++ b/leptos/Cargo.toml @@ -30,7 +30,7 @@ reactive_graph = { workspace = true, features = ["serde"] } rustc-hash = "2.0" tachys = { workspace = true, features = ["reactive_graph", "reactive_stores", "oco"] } thiserror = "2.0" -tracing = { version = "0.1.40", optional = true } +tracing = { version = "0.1.41", optional = true } typed-builder = "0.20.0" typed-builder-macro = "0.20.0" serde = "1.0" diff --git a/leptos_dom/Cargo.toml b/leptos_dom/Cargo.toml index 8fdefa936d..4434911bf2 100644 --- a/leptos_dom/Cargo.toml +++ b/leptos_dom/Cargo.toml @@ -12,9 +12,9 @@ edition.workspace = true tachys = { workspace = true } reactive_graph = { workspace = true } or_poisoned = { workspace = true } -js-sys = "0.3.72" +js-sys = "0.3.74" send_wrapper = "0.6.0" -tracing = { version = "0.1.40", optional = true } +tracing = { version = "0.1.41", optional = true } wasm-bindgen = "0.2.97" serde_json = { version = "1.0", optional = true } serde = { version = "1.0", optional = true } diff --git a/leptos_macro/Cargo.toml b/leptos_macro/Cargo.toml index 2387a74722..358d90424c 100644 --- a/leptos_macro/Cargo.toml +++ b/leptos_macro/Cargo.toml @@ -27,7 +27,7 @@ leptos_hot_reload = { workspace = true } server_fn_macro = { workspace = true } convert_case = "0.6.0" uuid = { version = "1.11", features = ["v4"] } -tracing = { version = "0.1.40", optional = true } +tracing = { version = "0.1.41", optional = true } [dev-dependencies] log = "0.4.22" diff --git a/leptos_server/Cargo.toml b/leptos_server/Cargo.toml index 59a79e777d..3097d96a4e 100644 --- a/leptos_server/Cargo.toml +++ b/leptos_server/Cargo.toml @@ -15,7 +15,7 @@ codee = { version = "0.2.0", features = ["json_serde"] } hydration_context = { workspace = true } reactive_graph = { workspace = true, features = ["hydration"] } server_fn = { workspace = true } -tracing = { version = "0.1.40", optional = true } +tracing = { version = "0.1.41", optional = true } futures = "0.3.31" any_spawner = { workspace = true } @@ -25,7 +25,7 @@ send_wrapper = "0.6" # serialization formats serde = { version = "1.0" } -js-sys = { version = "0.3.72", optional = true } +js-sys = { version = "0.3.74", optional = true } wasm-bindgen = { version = "0.2.97", optional = true } serde_json = { version = "1.0" } diff --git a/meta/Cargo.toml b/meta/Cargo.toml index 9a3cf541fb..4fe839c0eb 100644 --- a/meta/Cargo.toml +++ b/meta/Cargo.toml @@ -14,7 +14,7 @@ once_cell = "1.20" or_poisoned = { workspace = true } indexmap = "2.6" send_wrapper = "0.6.0" -tracing = { version = "0.1.40", optional = true } +tracing = { version = "0.1.41", optional = true } wasm-bindgen = "0.2.97" futures = "0.3.31" diff --git a/reactive_graph/Cargo.toml b/reactive_graph/Cargo.toml index edfd9683e1..015a1447da 100644 --- a/reactive_graph/Cargo.toml +++ b/reactive_graph/Cargo.toml @@ -19,7 +19,7 @@ rustc-hash = "2.0" serde = { version = "1.0", features = ["derive"], optional = true } slotmap = "1.0" thiserror = "2.0" -tracing = { version = "0.1.40", optional = true } +tracing = { version = "0.1.41", optional = true } guardian = "1.2" async-lock = "3.4.0" send_wrapper = { version = "0.6.0", features = ["futures"] } diff --git a/reactive_graph/src/computed/memo.rs b/reactive_graph/src/computed/memo.rs index b684f29cab..d50fd86226 100644 --- a/reactive_graph/src/computed/memo.rs +++ b/reactive_graph/src/computed/memo.rs @@ -207,7 +207,7 @@ where /// Creates a new memo by passing a function that computes the value. /// - /// Unlike [`ArcMemo::new`](), this receives ownership of the previous value. As a result, it + /// Unlike [`Memo::new`](), this receives ownership of the previous value. As a result, it /// must return both the new value and a `bool` that is `true` if the value has changed. /// /// This is lazy: the function will not be called until the memo's value is read for the first diff --git a/router/Cargo.toml b/router/Cargo.toml index 41d52fc410..4e0790daa1 100644 --- a/router/Cargo.toml +++ b/router/Cargo.toml @@ -19,9 +19,9 @@ reactive_graph = { workspace = true } tachys = { workspace = true, features = ["reactive_graph"] } futures = "0.3.31" url = "2.5" -js-sys = { version = "0.3.72" } +js-sys = { version = "0.3.74" } wasm-bindgen = { version = "0.2.97" } -tracing = { version = "0.1.40", optional = true } +tracing = { version = "0.1.41", optional = true } once_cell = "1.20" send_wrapper = "0.6.0" thiserror = "2.0" diff --git a/server_fn/Cargo.toml b/server_fn/Cargo.toml index 5a1c22c684..a08a3e69ab 100644 --- a/server_fn/Cargo.toml +++ b/server_fn/Cargo.toml @@ -49,16 +49,16 @@ http = { version = "1.1" } ciborium = { version = "0.2.2", optional = true } postcard = { version = "1", features = ["alloc"], optional = true } hyper = { version = "1.5", optional = true } -bytes = "1.8" +bytes = "1.9" http-body-util = { version = "0.1.2", optional = true } rkyv = { version = "0.8.8", optional = true } rmp-serde = { version = "1.3.0", optional = true } # client gloo-net = { version = "0.6.0", optional = true } -js-sys = { version = "0.3.72", optional = true } +js-sys = { version = "0.3.74", optional = true } wasm-bindgen = { version = "0.2.97", optional = true } -wasm-bindgen-futures = { version = "0.4.45", optional = true } +wasm-bindgen-futures = { version = "0.4.47", optional = true } wasm-streams = { version = "0.4.2", optional = true } web-sys = { version = "0.3.72", optional = true, features = [ "console", diff --git a/tachys/Cargo.toml b/tachys/Cargo.toml index a03d664479..77708b5b5d 100644 --- a/tachys/Cargo.toml +++ b/tachys/Cargo.toml @@ -24,7 +24,7 @@ once_cell = "1.20" paste = "1.0" wasm-bindgen = "0.2.97" html-escape = "0.2.13" -js-sys = "0.3.72" +js-sys = "0.3.74" web-sys = { version = "0.3.72", features = [ "Window", "Document", @@ -159,7 +159,7 @@ sledgehammer_bindgen = { version = "0.6.0", features = [ "web", ], optional = true } sledgehammer_utils = { version = "0.3.1", optional = true } -tracing = { version = "0.1.40", optional = true } +tracing = { version = "0.1.41", optional = true } [dev-dependencies] tokio-test = "0.4.4"