ordilabs / live

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

Bump leptos from 0.2.5 to 0.3.0 #145

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps leptos from 0.2.5 to 0.3.0.

Release notes

Sourced from leptos's releases.

v0.3.0 is another incremental-ish release with a bunch of new features, many on the server end but including a bunch of general-purpose improvements. It includes several things that are breaking changes in the semantic-versioning sense, but you may find that not much breaks in your actual app. (For example, no code in any of the the three starter templates needed to change.)

New Features and Small Fixes

General

  • No longer necessary to import __Props types for components; you can just use app::MyComponent; instead of app::{MyComponent, MyComponentProps};
  • #[slot] syntax to define typed component children.
  • Typed events in window_event_listener
  • Optional event listeners with HtmlElement::optional_event
  • Adds style: syntax in the view macro to set individual styles, much like class: sets individual classes
  • Simplify work with resources by adding a Resource::update method to reactively update current value.
  • expect_context::<T>(cx) shorthand for use_context::<T>(cx).unwrap()

Server

  • Support for server functions that use GET requests (with either URL or CBOR encoding), for easier caching.
  • extract helper to directly use Actix extractors in a server function.
  • Allow more complex data like structs and Vec<_> as server function arguments (anything that can be de/serialized by serde_qs)
  • Support for rendering a <Route/> in response to additional HTTP methods/verbs, e.g., the classic PHP/multi-page-app style in which a POST request can be sent to a page and it will render a response. (See methods prop.)
  • Support for SsrMode::PartiallyBlocked which works like out-of-order streaming but replaces the HTML for any “blocked” fragments on the server. Improves UX when JS is disabled.

Developer Experience and Ergonomics

  • Top-to-bottom integration with the tracing crate
  • Adding some "real-time docs" via several runtime warnings and compile-time errors to prevent common bugs (for example, using leptos_meta with no features enabled or accidentally ending the view a component returns with a semicolon, meaning it renders nothing)

Performance

  • Improve performance of Axum integration by spawning requests into a local threadpool.
  • Improve performance of router on the server side by caching branch generation.
  • Performance improvements in the reactive system and renderer, and closing a memory leak in <Suspense/>/<Transition/>.

And as always...

  • Lots of bug fixes! Full changelog below.

Breaking Changes

  • &'a str can no longer be directly rendered as a view: add .to_string() to effected variables. (Previously, all &str were converted to String by the renderer; using Cow<'static, str> now allows &'static str to be rendered without the additional allocation, at the cost of requiring the conversion of &str to String to be more explicit.)
  • window_event_listener now takes a typed event (like ev::keypress). Use window_event_listener_untyped for the old behavior.
  • When deriving Params to use typed router search/params, the FromStr error for any type needs to be Send + Sync so they are ErrorBoundary compatible
  • Generics in create_slice have changed to allow different input types for getter/setter; only relevant if (for some reason?) you were specifying them manually.
  • Exact interfaces for a few public-but-rarely-needed functions in the server integrations have changed.

What's Changed

... (truncated)

Commits
  • 059c1bf cargo fmt
  • add13fd change: migrate Axum integration to use with_state over layer(Extension) ...
  • 904c2e8 v0.3.0
  • a5c3be5 docs: tweak new slice docs
  • 9f5139d examples: fix trunk config to run tailwind at the right time (#1040)
  • bae3053 change: update create_slice to allow different types on getter and setter (...
  • 40c1556 change: remove APIs that had been marked deprecated (#1037)
  • 0db4f58 fix: avoid extra { escaping (closes #1035) (#1038)
  • 12ebc95 fix: flickering \<Transition/> in release mode (closes #960) (#1030)
  • d7b9190 feat: SsrMode::PartiallyBlocked (#1026)
  • Additional commits viewable in compare view


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.