diff --git a/.github/workflows/run-cargo-make-task.yml b/.github/workflows/run-cargo-make-task.yml index 2b8172f89..eb6b8aa8e 100644 --- a/.github/workflows/run-cargo-make-task.yml +++ b/.github/workflows/run-cargo-make-task.yml @@ -48,9 +48,6 @@ jobs: - name: Install wasm-bindgen run: cargo binstall wasm-bindgen-cli --no-confirm - - name: Install wasm-pack - run: cargo binstall wasm-pack --no-confirm - - name: Install cargo-leptos run: cargo binstall cargo-leptos --no-confirm diff --git a/examples/cargo-make/deno-build.toml b/examples/cargo-make/deno-build.toml index 20eaf7520..e1d36c212 100644 --- a/examples/cargo-make/deno-build.toml +++ b/examples/cargo-make/deno-build.toml @@ -1,9 +1,11 @@ [tasks.build] +install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "--help" } clear = true command = "deno" args = ["task", "build"] [tasks.start-client] +install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "--help" } command = "deno" args = ["task", "start"] diff --git a/examples/hackernews_js_fetch/Cargo.toml b/examples/hackernews_js_fetch/Cargo.toml index 6a8decc3d..167771f63 100644 --- a/examples/hackernews_js_fetch/Cargo.toml +++ b/examples/hackernews_js_fetch/Cargo.toml @@ -14,17 +14,17 @@ lto = true console_log = "1.0.0" console_error_panic_hook = "0.1.7" cfg-if = "1.0.0" -leptos = { version = "0.5" } -leptos_axum = { version = "0.5", default-features = false, optional = true } -leptos_meta = { version = "0.5" } -leptos_router = { version = "0.5" } +leptos = { path = "../../leptos" } +leptos_axum = { path = "../../integrations/axum", default-features = false, optional = true } +leptos_meta = { path = "../../meta" } +leptos_router = { path = "../../router" } log = "0.4.17" simple_logger = "4.0.0" serde = { version = "1.0.148", features = ["derive"] } tracing = "0.1" gloo-net = { version = "0.4.0", features = ["http"] } reqwest = { version = "0.11.13", features = ["json"] } -axum = { version = "0.6", default-features = false, optional = true } +axum = { version = "0.7", default-features = false, optional = true } tower = { version = "0.4.13", optional = true } http = { version = "0.2.11", optional = true } web-sys = { version = "0.3", features = [ @@ -37,7 +37,7 @@ wasm-bindgen = "0.2" wasm-bindgen-futures = { version = "0.4.37", features = [ "futures-core-03-stream", ], optional = true } -axum-js-fetch = { version = "0.2.1", optional = true } +axum-js-fetch = { git = "https://github.com/seanaye/axum-js-fetch", optional = true } lazy_static = "1.4.0" [features] diff --git a/examples/hackernews_js_fetch/rust-toolchain.toml b/examples/hackernews_js_fetch/rust-toolchain.toml new file mode 100644 index 000000000..ff2a4ff10 --- /dev/null +++ b/examples/hackernews_js_fetch/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "stable" # test change diff --git a/examples/hackernews_js_fetch/src/lib.rs b/examples/hackernews_js_fetch/src/lib.rs index 5beb08b00..5bd3ab8a6 100644 --- a/examples/hackernews_js_fetch/src/lib.rs +++ b/examples/hackernews_js_fetch/src/lib.rs @@ -62,8 +62,8 @@ mod ssr_imports { let routes = generate_route_list(App); // build our application with a route - let app: axum::Router<(), axum::body::Body> = Router::new() - .leptos_routes(&leptos_options, routes, || view! { }) + let app: axum::Router<()> = Router::new() + .leptos_routes(&leptos_options, routes, App) .route("/api/*fn_name", post(leptos_axum::handle_server_fns)) .with_state(leptos_options); @@ -73,7 +73,7 @@ mod ssr_imports { } pub async fn serve(&self, req: web_sys::Request) -> web_sys::Response { - self.0.serve(req).await + self.0.oneshot(req).await } } } diff --git a/router/src/matching/matcher.rs b/router/src/matching/matcher.rs index dd0d8a4bd..d25db6569 100644 --- a/router/src/matching/matcher.rs +++ b/router/src/matching/matcher.rs @@ -68,10 +68,7 @@ impl Matcher { self.segments.iter().zip(loc_segments.iter()) { if let Some(param_name) = segment.strip_prefix(':') { - params.insert( - param_name.into(), - unescape(*loc_segment).into(), - ); + params.insert(param_name.into(), unescape(loc_segment)); } else if segment != loc_segment { // if any segment doesn't match and isn't a param, there's no path match return None;