mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
chore: bump nightly version in examples (#2479)
This commit is contained in:
parent
bfac4cba2a
commit
41f3c46830
71 changed files with 122 additions and 122 deletions
2
.github/workflows/ci-changed-examples.yml
vendored
2
.github/workflows/ci-changed-examples.yml
vendored
|
@ -29,4 +29,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: ${{ matrix.directory }}
|
directory: ${{ matrix.directory }}
|
||||||
cargo_make_task: "ci"
|
cargo_make_task: "ci"
|
||||||
toolchain: nightly-2024-01-29
|
toolchain: nightly-2024-03-31
|
||||||
|
|
2
.github/workflows/ci-examples.yml
vendored
2
.github/workflows/ci-examples.yml
vendored
|
@ -24,4 +24,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: ${{ matrix.directory }}
|
directory: ${{ matrix.directory }}
|
||||||
cargo_make_task: "ci"
|
cargo_make_task: "ci"
|
||||||
toolchain: nightly-2024-01-29
|
toolchain: nightly-2024-03-31
|
||||||
|
|
4
.github/workflows/ci-semver.yml
vendored
4
.github/workflows/ci-semver.yml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
||||||
test:
|
test:
|
||||||
needs: [get-leptos-changed]
|
needs: [get-leptos-changed]
|
||||||
if: needs.get-leptos-changed.outputs.leptos_changed == 'true'
|
if: needs.get-leptos-changed.outputs.leptos_changed == 'true'
|
||||||
name: Run semver check (nightly-2024-01-29)
|
name: Run semver check (nightly-2024-03-31)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -19,4 +19,4 @@ jobs:
|
||||||
- name: Sember Checks
|
- name: Sember Checks
|
||||||
uses: obi1kenobi/cargo-semver-checks-action@v2
|
uses: obi1kenobi/cargo-semver-checks-action@v2
|
||||||
with:
|
with:
|
||||||
rust-toolchain: nightly-2024-01-29
|
rust-toolchain: nightly-2024-03-31
|
||||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -40,4 +40,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: ${{ matrix.directory }}
|
directory: ${{ matrix.directory }}
|
||||||
cargo_make_task: "ci"
|
cargo_make_task: "ci"
|
||||||
toolchain: nightly-2024-01-29
|
toolchain: nightly-2024-03-31
|
||||||
|
|
3
.github/workflows/run-cargo-make-task.yml
vendored
3
.github/workflows/run-cargo-make-task.yml
vendored
|
@ -48,6 +48,9 @@ jobs:
|
||||||
- name: Install wasm-bindgen
|
- name: Install wasm-bindgen
|
||||||
run: cargo binstall wasm-bindgen-cli --no-confirm
|
run: cargo binstall wasm-bindgen-cli --no-confirm
|
||||||
|
|
||||||
|
- name: Install wasm-pack
|
||||||
|
run: cargo binstall wasm-pack --no-confirm
|
||||||
|
|
||||||
- name: Install cargo-leptos
|
- name: Install cargo-leptos
|
||||||
run: cargo binstall cargo-leptos --no-confirm
|
run: cargo binstall cargo-leptos --no-confirm
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,5 @@ alias = "check-all"
|
||||||
|
|
||||||
[tasks.check-all]
|
[tasks.check-all]
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["+nightly-2024-01-29", "check-all-features"]
|
args = ["+nightly-2024-03-31", "check-all-features"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
|
@ -9,12 +9,10 @@ args = ["fmt", "--", "--check", "--config-path", "${LEPTOS_PROJECT_DIRECTORY}"]
|
||||||
dependencies = ["install-clippy"]
|
dependencies = ["install-clippy"]
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = [
|
args = [
|
||||||
"hack",
|
|
||||||
"clippy",
|
"clippy",
|
||||||
"--all",
|
"--all-features",
|
||||||
"--each-feature",
|
"--no-deps",
|
||||||
"--no-dev-deps",
|
|
||||||
"--",
|
"--",
|
||||||
"-D",
|
"-D",
|
||||||
"clippy::print_stdout"
|
"clippy::print_stdout",
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,5 +3,5 @@ alias = "test-all"
|
||||||
|
|
||||||
[tasks.test-all]
|
[tasks.test-all]
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["+nightly-2024-01-29", "test-all-features"]
|
args = ["+nightly-2024-03-31", "test-all-features"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
|
@ -15,13 +15,13 @@ clear = true
|
||||||
dependencies = ["check-debug", "check-release"]
|
dependencies = ["check-debug", "check-release"]
|
||||||
|
|
||||||
[tasks.check-debug]
|
[tasks.check-debug]
|
||||||
toolchain = "nightly-2024-01-29"
|
toolchain = "nightly-2024-03-31"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["check-all-features"]
|
args = ["check-all-features"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
||||||
[tasks.check-release]
|
[tasks.check-release]
|
||||||
toolchain = "nightly-2024-01-29"
|
toolchain = "nightly-2024-03-31"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["check-all-features", "--release"]
|
args = ["check-all-features", "--release"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
[tasks.build]
|
[tasks.build]
|
||||||
toolchain = "nightly-2024-01-29"
|
toolchain = "nightly-2024-03-31"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["build-all-features"]
|
args = ["build-all-features"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
||||||
[tasks.check]
|
[tasks.check]
|
||||||
toolchain = "nightly-2024-01-29"
|
toolchain = "nightly-2024-03-31"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["check-all-features"]
|
args = ["check-all-features"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
|
@ -12,13 +12,13 @@ clear = true
|
||||||
dependencies = ["check-debug", "check-release"]
|
dependencies = ["check-debug", "check-release"]
|
||||||
|
|
||||||
[tasks.check-debug]
|
[tasks.check-debug]
|
||||||
toolchain = "nightly-2024-01-29"
|
toolchain = "nightly-2024-03-31"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["check-all-features"]
|
args = ["check-all-features"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
||||||
[tasks.check-release]
|
[tasks.check-release]
|
||||||
toolchain = "nightly-2024-01-29"
|
toolchain = "nightly-2024-03-31"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["check-all-features", "--release"]
|
args = ["check-all-features", "--release"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use leptos::{ev, html::*, *};
|
use leptos::{html::*, *};
|
||||||
|
|
||||||
/// A simple counter view.
|
/// A simple counter view.
|
||||||
// A component is really just a function call: it runs once to create the DOM and reactive system
|
// A component is really just a function call: it runs once to create the DOM and reactive system
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use leptos::{For, *};
|
use leptos::*;
|
||||||
|
|
||||||
const MANY_COUNTERS: usize = 1000;
|
const MANY_COUNTERS: usize = 1000;
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::errors::AppError;
|
use crate::errors::AppError;
|
||||||
use leptos::{logging::log, Errors, *};
|
use leptos::{logging::log, *};
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
use leptos_axum::ResponseOptions;
|
use leptos_axum::ResponseOptions;
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -5,13 +5,13 @@ extend = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[tasks.build]
|
[tasks.build]
|
||||||
toolchain = "nightly-2024-01-29"
|
toolchain = "nightly-2024-03-31"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["build-all-features", "--target", "wasm32-unknown-unknown"]
|
args = ["build-all-features", "--target", "wasm32-unknown-unknown"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
||||||
[tasks.check]
|
[tasks.check]
|
||||||
toolchain = "nightly-2024-01-29"
|
toolchain = "nightly-2024-03-31"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["check-all-features", "--target", "wasm32-unknown-unknown"]
|
args = ["check-all-features", "--target", "wasm32-unknown-unknown"]
|
||||||
install_crate = "cargo-all-features"
|
install_crate = "cargo-all-features"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use leptos::{ev, *};
|
use leptos::*;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn CredentialsForm(
|
pub fn CredentialsForm(
|
||||||
|
|
|
@ -16,7 +16,7 @@ impl AppState {
|
||||||
credentials: Credentials,
|
credentials: Credentials,
|
||||||
) -> Result<(), CreateUserError> {
|
) -> Result<(), CreateUserError> {
|
||||||
let Credentials { email, password } = credentials;
|
let Credentials { email, password } = credentials;
|
||||||
let user_exists = self.users.get(&email).is_some();
|
let user_exists = self.users.contains_key(&email);
|
||||||
if user_exists {
|
if user_exists {
|
||||||
return Err(CreateUserError::UserExists);
|
return Err(CreateUserError::UserExists);
|
||||||
}
|
}
|
||||||
|
@ -124,6 +124,7 @@ impl EmailAddress {
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct CurrentUser {
|
pub struct CurrentUser {
|
||||||
pub email: EmailAddress,
|
pub email: EmailAddress,
|
||||||
|
#[allow(dead_code)] // possibly a lint regression, this is used at line 65
|
||||||
pub token: Uuid,
|
pub token: Uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::errors::TodoAppError;
|
use crate::errors::TodoAppError;
|
||||||
use leptos::{Errors, *};
|
use leptos::*;
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
use leptos_axum::ResponseOptions;
|
use leptos_axum::ResponseOptions;
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::errors::TodoAppError;
|
use crate::errors::TodoAppError;
|
||||||
use leptos::{Errors, *};
|
use leptos::*;
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
use leptos_axum::ResponseOptions;
|
use leptos_axum::ResponseOptions;
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -8,12 +8,12 @@ use axum::{
|
||||||
Router,
|
Router,
|
||||||
};
|
};
|
||||||
use axum_session::{Key, SessionConfig, SessionLayer, SessionStore};
|
use axum_session::{Key, SessionConfig, SessionLayer, SessionStore};
|
||||||
use axum_session_auth::{AuthConfig, AuthSessionLayer, SessionSqlitePool};
|
use axum_session_auth::{AuthConfig, AuthSessionLayer};
|
||||||
use leptos::{get_configuration, logging::log, provide_context, view};
|
use leptos::{get_configuration, logging::log, provide_context, view};
|
||||||
use leptos_axum::{
|
use leptos_axum::{
|
||||||
generate_route_list, handle_server_fns_with_context, LeptosRoutes,
|
generate_route_list, handle_server_fns_with_context, LeptosRoutes,
|
||||||
};
|
};
|
||||||
use sqlx::{sqlite::SqlitePoolOptions, SqlitePool};
|
use sqlx::sqlite::SqlitePoolOptions;
|
||||||
use sso_auth_axum::{
|
use sso_auth_axum::{
|
||||||
auth::*, fallback::file_and_error_handler, state::AppState,
|
auth::*, fallback::file_and_error_handler, state::AppState,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::errors::TodoAppError;
|
use crate::errors::TodoAppError;
|
||||||
use leptos::{Errors, *};
|
use leptos::*;
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
use leptos_axum::ResponseOptions;
|
use leptos_axum::ResponseOptions;
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::errors::TodoAppError;
|
use crate::errors::TodoAppError;
|
||||||
use leptos::{Errors, *};
|
use leptos::*;
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
use leptos_axum::ResponseOptions;
|
use leptos_axum::ResponseOptions;
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2024-01-29"
|
channel = "nightly-2024-03-31"
|
||||||
|
|
|
@ -16,13 +16,18 @@ leptos_macro = { workspace = true }
|
||||||
leptos_reactive = { workspace = true }
|
leptos_reactive = { workspace = true }
|
||||||
leptos_server = { workspace = true }
|
leptos_server = { workspace = true }
|
||||||
leptos_config = { workspace = true }
|
leptos_config = { workspace = true }
|
||||||
leptos-spin-macro = { version="0.1", optional = true}
|
leptos-spin-macro = { version = "0.1", optional = true }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
typed-builder = "0.18"
|
typed-builder = "0.18"
|
||||||
typed-builder-macro = "0.18"
|
typed-builder-macro = "0.18"
|
||||||
serde = { version = "1", optional = true }
|
serde = { version = "1", optional = true }
|
||||||
serde_json = { version = "1", optional = true }
|
serde_json = { version = "1", optional = true }
|
||||||
server_fn = { workspace = true, features = ["form-redirects", "browser", "url", "cbor"] }
|
server_fn = { workspace = true, features = [
|
||||||
|
"form-redirects",
|
||||||
|
"browser",
|
||||||
|
"url",
|
||||||
|
"cbor",
|
||||||
|
] }
|
||||||
web-sys = { version = "0.3.63", features = [
|
web-sys = { version = "0.3.63", features = [
|
||||||
"ShadowRoot",
|
"ShadowRoot",
|
||||||
"ShadowRootInit",
|
"ShadowRootInit",
|
||||||
|
@ -68,10 +73,7 @@ miniserde = ["leptos_reactive/miniserde"]
|
||||||
rkyv = ["leptos_reactive/rkyv"]
|
rkyv = ["leptos_reactive/rkyv"]
|
||||||
tracing = ["leptos_macro/tracing"]
|
tracing = ["leptos_macro/tracing"]
|
||||||
nonce = ["leptos_dom/nonce"]
|
nonce = ["leptos_dom/nonce"]
|
||||||
spin = [
|
spin = ["leptos_reactive/spin", "leptos-spin-macro"]
|
||||||
"leptos_reactive/spin",
|
|
||||||
"leptos-spin-macro"
|
|
||||||
]
|
|
||||||
experimental-islands = [
|
experimental-islands = [
|
||||||
"leptos_dom/experimental-islands",
|
"leptos_dom/experimental-islands",
|
||||||
"leptos_macro/experimental-islands",
|
"leptos_macro/experimental-islands",
|
||||||
|
@ -81,7 +83,7 @@ experimental-islands = [
|
||||||
]
|
]
|
||||||
trace-component-props = [
|
trace-component-props = [
|
||||||
"leptos_dom/trace-component-props",
|
"leptos_dom/trace-component-props",
|
||||||
"leptos_macro/trace-component-props"
|
"leptos_macro/trace-component-props",
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.metadata.cargo-all-features]
|
[package.metadata.cargo-all-features]
|
||||||
|
@ -92,9 +94,10 @@ denylist = [
|
||||||
"rustls",
|
"rustls",
|
||||||
"default-tls",
|
"default-tls",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
"rkyv", # was causing clippy issues on nightly
|
||||||
"trace-component-props",
|
"trace-component-props",
|
||||||
"spin",
|
"spin",
|
||||||
"experimental-islands"
|
"experimental-islands",
|
||||||
]
|
]
|
||||||
skip_feature_sets = [
|
skip_feature_sets = [
|
||||||
[
|
[
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
use crate::Children;
|
use crate::Children;
|
||||||
use leptos_dom::{Errors, HydrationCtx, IntoView};
|
use leptos_dom::{Errors, HydrationCtx, IntoView};
|
||||||
use leptos_macro::{component, view};
|
use leptos_macro::{component, view};
|
||||||
use leptos_reactive::{
|
use leptos_reactive::{provide_context, run_as_child, signal_prelude::*};
|
||||||
create_rw_signal, provide_context, run_as_child, signal_prelude::*,
|
|
||||||
RwSignal,
|
|
||||||
};
|
|
||||||
|
|
||||||
/// When you render a `Result<_, _>` in your view, in the `Err` case it will
|
/// When you render a `Result<_, _>` in your view, in the `Err` case it will
|
||||||
/// render nothing, and search up through the view tree for an `<ErrorBoundary/>`.
|
/// render nothing, and search up through the view tree for an `<ErrorBoundary/>`.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use leptos::{component, ChildrenFn, ViewFn};
|
use leptos::{component, ChildrenFn, ViewFn};
|
||||||
use leptos_dom::IntoView;
|
use leptos_dom::IntoView;
|
||||||
use leptos_reactive::{create_memo, signal_prelude::*};
|
use leptos_reactive::signal_prelude::*;
|
||||||
|
|
||||||
/// A component that will show its children when the `when` condition is `true`,
|
/// A component that will show its children when the `when` condition is `true`,
|
||||||
/// and show the fallback when it is `false`, without rerendering every time
|
/// and show the fallback when it is `false`, without rerendering every time
|
||||||
|
|
|
@ -5,10 +5,7 @@ pub mod errors;
|
||||||
use crate::errors::LeptosConfigError;
|
use crate::errors::LeptosConfigError;
|
||||||
use config::{Case, Config, File, FileFormat};
|
use config::{Case, Config, File, FileFormat};
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::{
|
use std::{env::VarError, fs, net::SocketAddr, path::Path, str::FromStr};
|
||||||
convert::TryFrom, env::VarError, fs, net::SocketAddr, path::Path,
|
|
||||||
str::FromStr,
|
|
||||||
};
|
|
||||||
use typed_builder::TypedBuilder;
|
use typed_builder::TypedBuilder;
|
||||||
|
|
||||||
/// A Struct to allow us to parse LeptosOptions from the file. Not really needed, most interactions should
|
/// A Struct to allow us to parse LeptosOptions from the file. Not really needed, most interactions should
|
||||||
|
|
|
@ -516,8 +516,10 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(all(target_arch = "wasm32", feature = "web"))]
|
||||||
struct HashRun<T>(T);
|
struct HashRun<T>(T);
|
||||||
|
|
||||||
|
#[cfg(all(target_arch = "wasm32", feature = "web"))]
|
||||||
impl<T> fmt::Debug for HashRun<T> {
|
impl<T> fmt::Debug for HashRun<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{HydrationCtx, IntoView};
|
use crate::{HydrationCtx, IntoView};
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use leptos_reactive::{signal_prelude::*, use_context, RwSignal};
|
use leptos_reactive::{signal_prelude::*, use_context};
|
||||||
use server_fn::error::Error;
|
use server_fn::error::Error;
|
||||||
use std::{borrow::Cow, collections::HashMap};
|
use std::{borrow::Cow, collections::HashMap};
|
||||||
|
|
||||||
|
|
|
@ -155,9 +155,8 @@ fn match_serialize() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[allow(clippy::needless_borrow)]
|
||||||
fn match_no_serialize() {
|
fn match_no_serialize() {
|
||||||
#![allow(clippy::needless_borrow)]
|
|
||||||
|
|
||||||
struct CustomStruct {
|
struct CustomStruct {
|
||||||
field: &'static str,
|
field: &'static str,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
use crate::{html::ElementDescriptor, HtmlElement};
|
use crate::{html::ElementDescriptor, HtmlElement};
|
||||||
use leptos_reactive::{
|
use leptos_reactive::{create_render_effect, signal_prelude::*};
|
||||||
create_render_effect, create_rw_signal, signal_prelude::*, RwSignal,
|
|
||||||
};
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
|
||||||
/// Contains a shared reference to a DOM node created while using the `view`
|
/// Contains a shared reference to a DOM node created while using the `view`
|
||||||
|
|
|
@ -9,7 +9,7 @@ use crate::{
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use futures::{stream::FuturesUnordered, Future, Stream, StreamExt};
|
use futures::{stream::FuturesUnordered, Future, Stream, StreamExt};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use leptos_reactive::{Oco, *};
|
use leptos_reactive::*;
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
|
||||||
type PinnedFuture<T> = Pin<Box<dyn Future<Output = T>>>;
|
type PinnedFuture<T> = Pin<Box<dyn Future<Output = T>>>;
|
||||||
|
|
|
@ -11,13 +11,13 @@ dependencies = [
|
||||||
[tasks.test-leptos_macro-example]
|
[tasks.test-leptos_macro-example]
|
||||||
description = "Tests the leptos_macro/example to check if macro handles doc comments correctly"
|
description = "Tests the leptos_macro/example to check if macro handles doc comments correctly"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["+nightly-2024-01-29", "test", "--doc"]
|
args = ["+nightly-2024-03-31", "test", "--doc"]
|
||||||
cwd = "example"
|
cwd = "example"
|
||||||
install_crate = false
|
install_crate = false
|
||||||
|
|
||||||
[tasks.doc-leptos_macro-example]
|
[tasks.doc-leptos_macro-example]
|
||||||
description = "Docs the leptos_macro/example to check if macro handles doc comments correctly"
|
description = "Docs the leptos_macro/example to check if macro handles doc comments correctly"
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["+nightly-2024-01-29", "doc"]
|
args = ["+nightly-2024-03-31", "doc"]
|
||||||
cwd = "example"
|
cwd = "example"
|
||||||
install_crate = false
|
install_crate = false
|
||||||
|
|
|
@ -41,15 +41,19 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
|
||||||
error: unexpected end of input, expected `=` or `(`
|
error: unexpected end of input, expected `=` or `(`
|
||||||
|
|
||||||
= help: try `#[prop(default = 5 * 10)]`
|
= help: try `#[prop(default = 5 * 10)]`
|
||||||
--> tests/ui/component.rs:36:40
|
--> tests/ui/component.rs:35:1
|
||||||
|
|
|
|
||||||
36 | fn default_without_value(#[prop(default)] default: bool) -> impl IntoView {
|
35 | #[component]
|
||||||
| ^
|
| ^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= note: this error originates in the attribute macro `component` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
|
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
|
||||||
|
|
||||||
= help: try `#[prop(default = 5 * 10)]`
|
= help: try `#[prop(default = 5 * 10)]`
|
||||||
--> tests/ui/component.rs:42:22
|
--> tests/ui/component.rs:40:1
|
||||||
|
|
|
|
||||||
42 | #[prop(default= |)] default: bool,
|
40 | #[component]
|
||||||
| ^
|
| ^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= note: this error originates in the attribute macro `component` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
|
@ -33,15 +33,19 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
|
||||||
error: unexpected end of input, expected `=` or `(`
|
error: unexpected end of input, expected `=` or `(`
|
||||||
|
|
||||||
= help: try `#[prop(default = 5 * 10)]`
|
= help: try `#[prop(default = 5 * 10)]`
|
||||||
--> tests/ui/component_absolute.rs:32:19
|
--> tests/ui/component_absolute.rs:30:1
|
||||||
|
|
|
|
||||||
32 | #[prop(default)] default: bool,
|
30 | #[::leptos::component]
|
||||||
| ^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= note: this error originates in the attribute macro `::leptos::component` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
|
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
|
||||||
|
|
||||||
= help: try `#[prop(default = 5 * 10)]`
|
= help: try `#[prop(default = 5 * 10)]`
|
||||||
--> tests/ui/component_absolute.rs:39:22
|
--> tests/ui/component_absolute.rs:37:1
|
||||||
|
|
|
|
||||||
39 | #[prop(default= |)] default: bool,
|
37 | #[::leptos::component]
|
||||||
| ^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= note: this error originates in the attribute macro `::leptos::component` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
|
@ -72,7 +72,7 @@ hydrate = [
|
||||||
"dep:web-sys",
|
"dep:web-sys",
|
||||||
]
|
]
|
||||||
ssr = ["dep:tokio"]
|
ssr = ["dep:tokio"]
|
||||||
nightly = ["rkyv?/copy"]
|
nightly = [] #["rkyv?/copy"] # not working on more recent nightlys
|
||||||
serde = []
|
serde = []
|
||||||
serde-lite = ["dep:serde-lite"]
|
serde-lite = ["dep:serde-lite"]
|
||||||
miniserde = ["dep:miniserde"]
|
miniserde = ["dep:miniserde"]
|
||||||
|
@ -81,7 +81,7 @@ experimental-islands = []
|
||||||
spin = ["ssr", "dep:spin-sdk"]
|
spin = ["ssr", "dep:spin-sdk"]
|
||||||
|
|
||||||
[package.metadata.cargo-all-features]
|
[package.metadata.cargo-all-features]
|
||||||
denylist = ["nightly"]
|
denylist = ["nightly", "rkyv"]
|
||||||
skip_feature_sets = [
|
skip_feature_sets = [
|
||||||
[
|
[
|
||||||
"csr",
|
"csr",
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use leptos_reactive::{
|
use leptos_reactive::{
|
||||||
create_isomorphic_effect, create_runtime, create_signal, signal_prelude::*,
|
create_isomorphic_effect, create_runtime, signal_prelude::*,
|
||||||
SignalGetUntracked, SignalSetUntracked,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
use leptos_reactive::console_warn;
|
use leptos_reactive::console_warn;
|
||||||
use leptos_reactive::{
|
use leptos_reactive::{
|
||||||
create_rw_signal, is_suppressing_resource_load, signal_prelude::*,
|
is_suppressing_resource_load, signal_prelude::*, spawn_local, store_value,
|
||||||
spawn_local, store_value, try_batch, use_context, ReadSignal, RwSignal,
|
try_batch, use_context, StoredValue,
|
||||||
StoredValue,
|
|
||||||
};
|
};
|
||||||
use server_fn::{error::ServerFnUrlError, ServerFn, ServerFnError};
|
use server_fn::{error::ServerFnUrlError, ServerFn, ServerFnError};
|
||||||
use std::{cell::Cell, future::Future, pin::Pin, rc::Rc};
|
use std::{cell::Cell, future::Future, pin::Pin, rc::Rc};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use leptos_reactive::{
|
use leptos_reactive::{
|
||||||
create_rw_signal, is_suppressing_resource_load, signal_prelude::*,
|
is_suppressing_resource_load, signal_prelude::*, spawn_local, store_value,
|
||||||
spawn_local, store_value, untrack, ReadSignal, RwSignal, StoredValue,
|
untrack, StoredValue,
|
||||||
};
|
};
|
||||||
use server_fn::{ServerFn, ServerFnError};
|
use server_fn::{ServerFn, ServerFnError};
|
||||||
use std::{future::Future, pin::Pin, rc::Rc};
|
use std::{future::Future, pin::Pin, rc::Rc};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::{use_head, TextProp};
|
use crate::use_head;
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use std::{cell::RefCell, rc::Rc};
|
use std::{cell::RefCell, rc::Rc};
|
||||||
|
|
|
@ -470,15 +470,13 @@ where
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
let action_url = if let Some(url) = action.url() {
|
let action_url = action.url().unwrap_or_else(|| {
|
||||||
url
|
|
||||||
} else {
|
|
||||||
debug_warn!(
|
debug_warn!(
|
||||||
"<ActionForm/> action needs a URL. Either use \
|
"<ActionForm/> action needs a URL. Either use \
|
||||||
create_server_action() or Action::using_server_fn()."
|
create_server_action() or Action::using_server_fn()."
|
||||||
);
|
);
|
||||||
String::new()
|
String::new()
|
||||||
};
|
});
|
||||||
let version = action.version();
|
let version = action.version();
|
||||||
let value = action.value();
|
let value = action.value();
|
||||||
|
|
||||||
|
@ -570,15 +568,13 @@ where
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
let action_url = if let Some(url) = action.url() {
|
let action_url = action.url().unwrap_or_else(|| {
|
||||||
url
|
|
||||||
} else {
|
|
||||||
debug_warn!(
|
debug_warn!(
|
||||||
"<MultiActionForm/> action needs a URL. Either use \
|
"<MultiActionForm/> action needs a URL. Either use \
|
||||||
create_server_action() or Action::using_server_fn()."
|
create_server_action() or Action::using_server_fn()."
|
||||||
);
|
);
|
||||||
String::new()
|
String::new()
|
||||||
};
|
});
|
||||||
|
|
||||||
let on_submit = move |ev: SubmitEvent| {
|
let on_submit = move |ev: SubmitEvent| {
|
||||||
if ev.default_prevented() {
|
if ev.default_prevented() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::{use_location, use_resolved_path, State};
|
use crate::{use_location, use_resolved_path, State};
|
||||||
use leptos::{leptos_dom::IntoView, *};
|
use leptos::*;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
/// Describes a value that is either a static or a reactive URL, i.e.,
|
/// Describes a value that is either a static or a reactive URL, i.e.,
|
||||||
|
|
|
@ -3,8 +3,7 @@ use crate::{
|
||||||
RouterContext,
|
RouterContext,
|
||||||
};
|
};
|
||||||
use leptos::{
|
use leptos::{
|
||||||
create_memo, request_animation_frame, signal_prelude::*, use_context,
|
request_animation_frame, signal_prelude::*, use_context, window, Oco,
|
||||||
window, Memo, Oco,
|
|
||||||
};
|
};
|
||||||
use std::{rc::Rc, str::FromStr};
|
use std::{rc::Rc, str::FromStr};
|
||||||
|
|
||||||
|
@ -134,9 +133,9 @@ pub fn use_params_map() -> Memo<ParamsMap> {
|
||||||
|
|
||||||
/// Returns the current route params, parsed into the given type, or an error.
|
/// Returns the current route params, parsed into the given type, or an error.
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn use_params<T: Params>() -> Memo<Result<T, ParamsError>>
|
pub fn use_params<T>() -> Memo<Result<T, ParamsError>>
|
||||||
where
|
where
|
||||||
T: PartialEq,
|
T: Params + PartialEq,
|
||||||
{
|
{
|
||||||
let route = use_route();
|
let route = use_route();
|
||||||
create_memo(move |_| route.params().with(T::from_map))
|
create_memo(move |_| route.params().with(T::from_map))
|
||||||
|
@ -150,9 +149,9 @@ pub fn use_query_map() -> Memo<ParamsMap> {
|
||||||
|
|
||||||
/// Returns the current URL search query, parsed into the given type, or an error.
|
/// Returns the current URL search query, parsed into the given type, or an error.
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn use_query<T: Params>() -> Memo<Result<T, ParamsError>>
|
pub fn use_query<T>() -> Memo<Result<T, ParamsError>>
|
||||||
where
|
where
|
||||||
T: PartialEq,
|
T: Params + PartialEq,
|
||||||
{
|
{
|
||||||
let router = use_router();
|
let router = use_router();
|
||||||
create_memo(move |_| router.inner.location.query.with(|m| T::from_map(m)))
|
create_memo(move |_| router.inner.location.query.with(|m| T::from_map(m)))
|
||||||
|
|
|
@ -128,6 +128,7 @@ denylist = [
|
||||||
"ciborium",
|
"ciborium",
|
||||||
"hyper",
|
"hyper",
|
||||||
"inventory",
|
"inventory",
|
||||||
|
"rkyv",
|
||||||
]
|
]
|
||||||
skip_feature_sets = [
|
skip_feature_sets = [
|
||||||
[
|
[
|
||||||
|
|
|
@ -13,7 +13,7 @@ use syn::{
|
||||||
parse::{Parse, ParseStream},
|
parse::{Parse, ParseStream},
|
||||||
punctuated::Punctuated,
|
punctuated::Punctuated,
|
||||||
spanned::Spanned,
|
spanned::Spanned,
|
||||||
Type, *,
|
*,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The implementation of the `server` macro.
|
/// The implementation of the `server` macro.
|
||||||
|
|
Loading…
Reference in a new issue