Skip to content

Update Rust crate leptos_router to v0.8.12#78

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/leptos_router-0.x
Open

Update Rust crate leptos_router to v0.8.12#78
renovate[bot] wants to merge 1 commit intomainfrom
renovate/leptos_router-0.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Nov 8, 2023

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Type Update Change
leptos_router dependencies minor 0.4.50.8.0
leptos_router dependencies minor 0.40.8

Release Notes

leptos-rs/leptos (leptos_router)

v0.8.12

Compare Source

What's Changed

Full Changelog: leptos-rs/leptos@v0.8.11...v0.8.12

v0.8.11

Compare Source

What's Changed

New Contributors

Full Changelog: leptos-rs/leptos@v0.8.10...v0.8.11

v0.8.10

Compare Source

What's Changed

New Contributors

Full Changelog: leptos-rs/leptos@v0.8.9...v0.8.10

v0.8.9

Compare Source

This includes patch releases to the reactive_graph, tachys, wasm_split_macros, server_fn, leptos, and router crates.

What's Changed

Full Changelog: leptos-rs/leptos@v0.8.8...v0.8.9

v0.8.8

What's Changed

New Contributors

Full Changelog: leptos-rs/leptos@v0.8.6...v0.8.8

v0.8.6

Compare Source

Just a patch release, mostly to support #[server] #[lazy] for lazy server functions.

Going forward, patch releases for various crates will have version numbers that are not coupled to one another, and will only be bumped when they've actually changed; so this release is 0.8.6 for leptos, leptos_macro, and server_fn_macro, but does not arbitrarily bump other packages that haven't changed.

See 0.8.5 for notes on WASM splitting.

What's Changed

Full Changelog: leptos-rs/leptos@v0.8.5...v0.8.6

v0.8.5: : WASM code splitting released!

Compare Source

This release includes WASM code-splitting/lazy-loading support, in tandem with the latest cargo-leptos release.

You can use the lazy_routes example to understand what this means!

Essentially, though, there are two patterns:

  1. Use the #[lazy] macro to make any given function lazy
  2. Use the #[lazy_route] to designate a route with a lazy-loaded view, which is loaded concurrently with the route's data

#[lazy] converts a (sync or async) function into a lazy-loaded async function

#[lazy]
fn deserialize_comments(data: &str) -> Vec<Comment> {
    serde_json::from_str(data).unwrap()
}

#[lazy_route] lets you split routes into a "data" half and a "view" half, which will be concurrently loaded by the router. This works with nested routing: so if you have ViewD and ViewE, then the router will concurrently load D's data, D's (lazy) view, E's data, and E's (lazy) view, before navigating to the page.

struct ViewD {
    data: Resource<Result<Vec<i32>, ServerFnError>>,
}

#[lazy_route]
impl LazyRoute for ViewD {
    fn data() -> Self {
        Self {
            data: Resource::new(|| (), |_| d_data()),
        }
    }

    fn view(this: Self) -> AnyView {
        let items = move || {
            Suspend::new(async move {
                this.data
                    .await
                    .unwrap_or_default()
                    .into_iter()
                    .map(|item| view! { <li>{item}</li> })
                    .collect::<Vec<_>>()
            })
        };
        view! {
            <p id="page">"View D"</p>
            <hr/>
            <Suspense fallback=|| view! { <p id="loading">"Loading..."</p> }>
                <ul>{items}</ul>
            </Suspense>
            <Outlet/>
        }
        .into_any()
    }
}

#[server]
async fn d_data() -> Result<Vec<i32>, ServerFnError> {
    tokio::time::sleep(std::time::Duration::from_millis(250)).await;
    Ok(vec![1, 1, 2, 3, 5, 8, 13])
}

Our whole July stream was dedicated to the topic, if you want more in depth discussion.

What's Changed

Full Changelog: leptos-rs/leptos@v0.8.4...v0.8.5

v0.8.4

Compare Source

There are some small bugfixes in here, as well as improvements to the hot-reloading code. This is mostly intended to be a sort of "last patch" before merging the code-splitting changes in #​3988, so that there is a patch people can pin to in case those inadvertently introduce any regressions.

What's Changed

New Contributors

Full Changelog: leptos-rs/leptos@v0.8.3...v0.8.4

v0.8.3

Compare Source

This is a minor patch release. It does include a significant re-write of how ownership/context work with nested routes (#​4091). This should close a number of bugs. However, it's always possible that changes like this introduce regressions. Please test to see whether you have any issues with context and nested routing, and let me know. (We have a new regression example set up to add e2e regression tests for issues going forward.)

What's Changed

New Contributors

Full Changelog: leptos-rs/leptos@v0.8.2...v0.8.3

v0.8.2

Compare Source

For 0.8 release notes in general, see 0.8.0. This patch release mostly addresses a bad issue with hydrating <Stylesheet/> and other meta components. (See #​3945 #​3946)

What's Changed

Full Changelog: leptos-rs/leptos@v0.8.1...v0.8.2

v0.8.1

Compare Source

For 0.8 release notes in general, see 0.8.0. This patch release is mostly just a bunch of bugfixes for issues raised or fixed since then.

What's Changed
New Contributors

Full Changelog: leptos-rs/leptos@v0.8.0...v0.8.1

v0.8.0

Compare Source

*Changelog relative to 0.7.8. *

0.8 has been planned for a while, primarily to accommodate small changes that arose during the course of testing and adopting 0.7, most of which are technically semver-breaking but should not meaningfully affect user code. I think it's a significant QOL and user DX upgrade and I'm excited to properly release it.

Noteworthy features:

  • Axum 0.8 support. (This alone required a major version bump, as we reexport some Axum types.) (thanks to @​sabify for the migration work here)
  • Significant improvements to compile times when using --cfg=erase_components, which is useful as a dev-mode optimization (thanks to @​zakstucke) This is the default setting for cargo-leptos with its latest release, and can be set up manually for use with Trunk. (See docs here.)
  • Support for the new islands-router features that allow a client-side routing experience while using islands (see the islands_router example) (this one was me)
  • Improved server function error handling by allowing you to use any type that implements FromServerFnError rather than being constrained to use ServerFnError (see #​3274). (Note: This will require changes if you're using a custom error type, but should be a better experience.) (thanks to @​ryo33)
  • Support for creating WebSockets via server fns (thanks to @​ealmloff)
  • Changes to make custom errors significantly more ergonomic when using server functions
  • LocalResource no longer exposes a SendWrapper in the API for the types it returns. (Breaking change: this will require removing some .as_deref() and so on when using LocalResource, but ends up with a much better API.)
  • Significantly improved DX/bugfixes for thread-local Actions.

As you can see this was a real team effort and, as always, I'm grateful for the contributions of everyone named above, and all those who made commits below.

WebSocket Example

The WebSocket support is particularly exciting, as it allows you to call server functions using the default Rust Stream trait from the futures crate, and have those streams send messages over websockets without you needing to know anything about that process. The API landed in a place that feels like a great extension of the "server function" abstraction in which you can make HTTP requests as if they were ordinary async calls. The websocket stuff doesn't integrate directly with Resources/SSR (which make more sense for one-shot things) but is really easy to use:

use server_fn::{codec::JsonEncoding, BoxedStream, ServerFnError, Websocket};

// The websocket protocol can be used on any server function that accepts and returns a [`BoxedStream`]
// with items that can be encoded by the input and output encoding generics.
//
// In this case, the input and output encodings are [`Json`] and [`Json`], respectively which requires
// the items to implement [`Serialize`] and [`Deserialize`].

#[server(protocol = Websocket<JsonEncoding, JsonEncoding>)]
async fn echo_websocket(
    input: BoxedStream<String, ServerFnError>,
) -> Result<BoxedStream<String, ServerFnError>, ServerFnError> {
    use futures::channel::mpsc;
    use futures::{SinkExt, StreamExt};
    let mut input = input; // FIXME :-) server fn fields should pass mut through to destructure

    // create a channel of outgoing websocket messages 
    // we'll return rx, so sending a message to tx will send a message to the client via the websocket
    let (mut tx, rx) = mpsc::channel(1);

    // spawn a task to listen to the input stream of messages coming in over the websocket 
    tokio::spawn(async move {
        while let Some(msg) = input.next().await {
            // do some work on each message, and then send our responses 
            tx.send(msg.map(|msg| msg.to_ascii_uppercase())).await;
        }
    });

    Ok(rx.into())
}

#[component]
pub fn App() -> impl IntoView {
    use futures::channel::mpsc;
    use futures::StreamExt;
    let (mut tx, rx) = mpsc::channel(1);
    let latest = RwSignal::new(None);

    // we'll only listen for websocket messages on the client
    if cfg!(feature = "hydrate") {
        spawn_local(async move {
            match echo_websocket(rx.into()).await {
                Ok(mut messages) => {
                    while let Some(msg) = messages.next().await {
                        latest.set(Some(msg));
                    }
                }
                Err(e) => leptos::logging::warn!("{e}"),
            }
        });
    }

    view! {
        <input type="text" on:input:target=move |ev| {
            tx.try_send(Ok(ev.target().value()));
        }/>
        <p>{latest}</p>
    }
}
What's Changed

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested review from a team and dezren39 as code owners November 8, 2023 04:40
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 5d25532 to a42fced Compare November 28, 2023 01:37
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.5.2 Update Rust crate leptos_router to v0.5.3 Nov 28, 2023
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from a42fced to 853c641 Compare November 29, 2023 06:33
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.5.3 Update Rust crate leptos_router to v0.5.4 Nov 29, 2023
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 853c641 to 016ec4c Compare January 16, 2024 00:15
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.5.4 Update Rust crate leptos_router to v0.5.5 Jan 16, 2024
@renovate
Copy link
Contributor Author

renovate bot commented Jan 16, 2024

⚠ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: sources/web-gen/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path sources/web-gen/Cargo.toml --package leptos_router@0.4.5 --precise 0.6.11
error: package ID specification `leptos_router@0.4.5` did not match any packages
Did you mean one of these?

  leptos_router@0.6.9

File name: sources/web-gen-api/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path sources/web-gen-api/Cargo.toml --package leptos_router@0.4.5 --precise 0.6.11
    Updating crates.io index
error: failed to select a version for the requirement `leptos_router = "^0.4.5"`
candidate versions found which didn't match: 0.6.11
location searched: crates.io index
required by package `leptos_actix v0.4.5`
    ... which satisfies dependency `leptos_actix = "^0.4"` (locked to 0.4.5) of package `leptos_start v0.1.0 (/tmp/renovate/repos/github/developing-today/code/sources/web-gen-api)`
perhaps a crate was updated and forgotten to be re-vendored?

@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 016ec4c to 0c234e1 Compare January 17, 2024 03:23
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.5.5 Update Rust crate leptos_router to v0.5.6 Jan 17, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 0c234e1 to 2841431 Compare January 19, 2024 18:04
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.5.6 Update Rust crate leptos_router to v0.5.7 Jan 19, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 2841431 to f7839b0 Compare January 26, 2024 20:51
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.5.7 Update Rust crate leptos_router to v0.6.1 Jan 26, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from f7839b0 to a445d4c Compare January 27, 2024 02:58
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.1 Update Rust crate leptos_router to v0.6.3 Jan 27, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from a445d4c to 23df6e3 Compare January 30, 2024 14:43
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.3 Update Rust crate leptos_router to v0.6.4 Jan 30, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 23df6e3 to 215c203 Compare February 1, 2024 01:34
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.4 Update Rust crate leptos_router to v0.6.5 Feb 1, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 215c203 to 087fc5d Compare February 19, 2024 22:34
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.5 Update Rust crate leptos_router to v0.6.6 Feb 19, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 087fc5d to f88aaaf Compare February 29, 2024 22:49
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.6 Update Rust crate leptos_router to v0.6.7 Feb 29, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from f88aaaf to cce3714 Compare March 3, 2024 03:39
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.7 Update Rust crate leptos_router to v0.6.8 Mar 3, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from cce3714 to 32b82aa Compare March 4, 2024 01:34
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.8 Update Rust crate leptos_router to v0.6.9 Mar 4, 2024
@dezren39 dezren39 force-pushed the main branch 6 times, most recently from cb00f56 to 462a05e Compare March 12, 2024 21:25
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 32b82aa to 00f304a Compare April 2, 2024 15:35
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.9 Update Rust crate leptos_router to v0.6.10 Apr 2, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 00f304a to 094277c Compare April 10, 2024 17:02
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.10 Update Rust crate leptos_router to v0.6.11 Apr 10, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 094277c to eb4b33d Compare May 1, 2024 09:16
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.11 Update Rust crate leptos_router to 0.6.11 May 1, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from eb4b33d to 27139f7 Compare May 5, 2024 10:13
@renovate renovate bot changed the title Update Rust crate leptos_router to 0.6.11 Update Rust crate leptos_router to v0.6.11 May 5, 2024
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.11 Update Rust crate leptos_router to v0.6.12 Jun 2, 2024
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.12 fix(deps): update rust crate leptos_router to v0.6.12 Jun 6, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 27139f7 to 8f171cb Compare July 12, 2024 10:43
@renovate
Copy link
Contributor Author

renovate bot commented Jul 12, 2024

⚠️ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: pkgs/web-gen-api-axum/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path pkgs/web-gen-api-axum/Cargo.toml --workspace
    Updating crates.io index
error: failed to select a version for `leptos_router`.
    ... required by package `start-axum v0.1.0 (/tmp/renovate/repos/github/developing-today/code/pkgs/web-gen-api-axum)`
versions that meet the requirements `^0.8` are: 0.8.12, 0.8.11, 0.8.10, 0.8.9, 0.8.8, 0.8.7, 0.8.6, 0.8.5, 0.8.4, 0.8.3, 0.8.2, 0.8.1, 0.8.0

package `start-axum` depends on `leptos_router` with feature `hydrate` but `leptos_router` does not have that feature.


failed to select a version for `leptos_router` which could resolve this conflict

File name: pkgs/web-gen-api/Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path pkgs/web-gen-api/Cargo.toml --package leptos_router@0.4.5 --precise 0.8.12
    Updating crates.io index
error: failed to select a version for `leptos_router`.
    ... required by package `leptos_start v0.1.0 (/tmp/renovate/repos/github/developing-today/code/pkgs/web-gen-api)`
versions that meet the requirements `^0.8` are: 0.8.12, 0.8.11, 0.8.10, 0.8.9, 0.8.8, 0.8.7, 0.8.6, 0.8.5, 0.8.4, 0.8.3, 0.8.2, 0.8.1, 0.8.0

package `leptos_start` depends on `leptos_router` with feature `csr` but `leptos_router` does not have that feature.
 package `leptos_router` does have feature `ssr`


failed to select a version for `leptos_router` which could resolve this conflict

@renovate renovate bot changed the title fix(deps): update rust crate leptos_router to v0.6.12 Update Rust crate leptos_router to v0.6.12 Jul 23, 2024
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.12 Update Rust crate leptos_router to v0.6.13 Jul 24, 2024
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.13 Update Rust crate leptos_router to v0.6.14 Aug 14, 2024
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.14 fix(deps): update rust crate leptos_router to v0.6.14 Aug 25, 2024
@renovate renovate bot changed the title fix(deps): update rust crate leptos_router to v0.6.14 fix(deps): update rust crate leptos_router to v0.6.15 Sep 8, 2024
@renovate renovate bot changed the title fix(deps): update rust crate leptos_router to v0.6.15 Update Rust crate leptos_router to v0.6.15 Sep 16, 2024
@renovate renovate bot force-pushed the renovate/leptos_router-0.x branch from 8f171cb to a3d3302 Compare November 30, 2024 18:41
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.6.15 Update Rust crate leptos_router to v0.7.0 Nov 30, 2024
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.7.0 Update Rust crate leptos_router to v0.7.1 Dec 17, 2024
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.7.1 Update Rust crate leptos_router to v0.7.2 Dec 21, 2024
@renovate renovate bot changed the title Update Rust crate leptos_router to v0.7.2 Update Rust crate leptos_router to v0.7.3 Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant