ordilabs / live

Ordi Labs Live
https://live.ordilabs.org
MIT License
8 stars 3 forks source link

Bump leptos_meta from 0.3.1 to 0.4.1 #182

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps leptos_meta from 0.3.1 to 0.4.1.

Release notes

Sourced from leptos_meta's releases.

v0.4.0

Enough bugfixes and features have accumulated in the main branch that it's time for a new release. However, a very early change meant this needs to be a semver bump. Rather than continuing the confusion of the feature/bug gap between 0.3.1 and main, this releases the current state of the main branch.

I was actually surprised, putting together these release notes, how much good stuff there is in here that I'd forgotten was new to this release!

This does not include the reactive ownership rewrite (#918), which I'd guess will be 0.5. But it does include the following...

Breaking Changes

  • leptos_axum now uses the (more common, more type-safe, more extensible) State and sub-state patterns rather than Extension to pass LeptosOptions. This will require a few small but key changes to apps uses Axum migrating from 0.3.x to 0.4.0. Click here to see a diff with the necessary changes.
  • Switch from defaulting to nightly and opting into stable, to requiring an opt-in for nightly features. Click here to see a diff with the necessary changes.
    • If you're using stable, remove the stable feature (it's now the default.)
    • If you're using nightly, add the nightly feature to leptos, leptos_router, and leptos_meta
  • leptos no longer defaults to csr, but is opt-in.
    • If you're using CSR, add the csr feature to leptos (same as leptos_router and leptos_meta
    • If you're using SSR/hydration, you can remove most default-features = false on Leptos dependencies, as that mainly served to disable the default csr feature, which is no longer enabled by default.
  • ServerFnError no longer implements std::error::Error (see below). ServerFnErrorErr does, if that's needed.
  • The children of a <Suspense/> or <Transition/> are now rendered once, then subsequently cloned. If you are reading resources reactively (move || data.read(cx)) they should continue to update reactively. If you are reading resources non-reactively (<div>{resource.read(cx)}</div>) this would have worked previously, and now will not be reactive.

Features

Automatic Server Function Registration

Server functions no longer need to be registered (except on exotic platforms like server-side WASM). Instead, they are registered automatically, making it even easier to define and use them.

Axum Extractor Support

You can now use Axum extractors directly in server functions.

#[server(QueryExtract, "/api")]
pub async fn query_extract(cx: Scope) -> Result<String, ServerFnError> {
    use axum::{extract::Query, http::Method};
    use leptos_axum::extract;
extract(cx, |method: Method, res: Query&lt;MyQuery&gt;| async move {
        format!(&quot;{method:?} and {}&quot;, res.q)
    },
)
.await
.map_err(|_| ServerFnError::ServerError(&quot;Error with server extractor&quot;.into()))

}

Improved Error Handling

Leptos now provides a leptos::error::Result type that behaves much like anyhow::Result (i.e., other errors can be converted into it using ?) but can be rendered directly in the view and caught by <ErrorBoundary/>. ServerFnError can also handle conversion from any error, making errors in server functions easier to handle.

</tr></table> 

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 1 year ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.