chore: bump nightly version in examples (#2479)

This commit is contained in:
Greg Johnston 2024-04-01 15:16:53 -04:00 committed by GitHub
parent bfac4cba2a
commit 41f3c46830
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
71 changed files with 122 additions and 122 deletions

View File

@ -29,4 +29,4 @@ jobs:
with:
directory: ${{ matrix.directory }}
cargo_make_task: "ci"
toolchain: nightly-2024-01-29
toolchain: nightly-2024-03-31

View File

@ -24,4 +24,4 @@ jobs:
with:
directory: ${{ matrix.directory }}
cargo_make_task: "ci"
toolchain: nightly-2024-01-29
toolchain: nightly-2024-03-31

View File

@ -9,7 +9,7 @@ jobs:
test:
needs: [get-leptos-changed]
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
steps:
@ -19,4 +19,4 @@ jobs:
- name: Sember Checks
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
rust-toolchain: nightly-2024-01-29
rust-toolchain: nightly-2024-03-31

View File

@ -40,4 +40,4 @@ jobs:
with:
directory: ${{ matrix.directory }}
cargo_make_task: "ci"
toolchain: nightly-2024-01-29
toolchain: nightly-2024-03-31

View File

@ -48,6 +48,9 @@ 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

View File

@ -3,5 +3,5 @@ alias = "check-all"
[tasks.check-all]
command = "cargo"
args = ["+nightly-2024-01-29", "check-all-features"]
args = ["+nightly-2024-03-31", "check-all-features"]
install_crate = "cargo-all-features"

View File

@ -9,12 +9,10 @@ args = ["fmt", "--", "--check", "--config-path", "${LEPTOS_PROJECT_DIRECTORY}"]
dependencies = ["install-clippy"]
command = "cargo"
args = [
"hack",
"clippy",
"--all",
"--each-feature",
"--no-dev-deps",
"--all-features",
"--no-deps",
"--",
"-D",
"clippy::print_stdout"
"clippy::print_stdout",
]

View File

@ -3,5 +3,5 @@ alias = "test-all"
[tasks.test-all]
command = "cargo"
args = ["+nightly-2024-01-29", "test-all-features"]
args = ["+nightly-2024-03-31", "test-all-features"]
install_crate = "cargo-all-features"

View File

@ -15,13 +15,13 @@ clear = true
dependencies = ["check-debug", "check-release"]
[tasks.check-debug]
toolchain = "nightly-2024-01-29"
toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"
[tasks.check-release]
toolchain = "nightly-2024-01-29"
toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features", "--release"]
install_crate = "cargo-all-features"

View File

@ -1,11 +1,11 @@
[tasks.build]
toolchain = "nightly-2024-01-29"
toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["build-all-features"]
install_crate = "cargo-all-features"
[tasks.check]
toolchain = "nightly-2024-01-29"
toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"

View File

@ -12,13 +12,13 @@ clear = true
dependencies = ["check-debug", "check-release"]
[tasks.check-debug]
toolchain = "nightly-2024-01-29"
toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"
[tasks.check-release]
toolchain = "nightly-2024-01-29"
toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features", "--release"]
install_crate = "cargo-all-features"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,4 +1,4 @@
use leptos::{ev, html::*, *};
use leptos::{html::*, *};
/// A simple counter view.
// A component is really just a function call: it runs once to create the DOM and reactive system

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,4 +1,4 @@
use leptos::{For, *};
use leptos::*;
const MANY_COUNTERS: usize = 1000;

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,5 +1,5 @@
use crate::errors::AppError;
use leptos::{logging::log, Errors, *};
use leptos::{logging::log, *};
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -5,13 +5,13 @@ extend = [
]
[tasks.build]
toolchain = "nightly-2024-01-29"
toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["build-all-features", "--target", "wasm32-unknown-unknown"]
install_crate = "cargo-all-features"
[tasks.check]
toolchain = "nightly-2024-01-29"
toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features", "--target", "wasm32-unknown-unknown"]
install_crate = "cargo-all-features"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,4 +1,4 @@
use leptos::{ev, *};
use leptos::*;
#[component]
pub fn CredentialsForm(

View File

@ -16,7 +16,7 @@ impl AppState {
credentials: Credentials,
) -> Result<(), CreateUserError> {
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 {
return Err(CreateUserError::UserExists);
}
@ -124,6 +124,7 @@ impl EmailAddress {
#[derive(Clone)]
pub struct CurrentUser {
pub email: EmailAddress,
#[allow(dead_code)] // possibly a lint regression, this is used at line 65
pub token: Uuid,
}

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
use leptos::{Errors, *};
use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
use leptos::{Errors, *};
use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -8,12 +8,12 @@ use axum::{
Router,
};
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_axum::{
generate_route_list, handle_server_fns_with_context, LeptosRoutes,
};
use sqlx::{sqlite::SqlitePoolOptions, SqlitePool};
use sqlx::sqlite::SqlitePoolOptions;
use sso_auth_axum::{
auth::*, fallback::file_and_error_handler, state::AppState,
};

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
use leptos::{Errors, *};
use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
use leptos::{Errors, *};
use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;

View File

@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-29"
channel = "nightly-2024-03-31"

View File

@ -16,13 +16,18 @@ leptos_macro = { workspace = true }
leptos_reactive = { workspace = true }
leptos_server = { 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"
typed-builder = "0.18"
typed-builder-macro = "0.18"
serde = { 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 = [
"ShadowRoot",
"ShadowRootInit",
@ -68,10 +73,7 @@ miniserde = ["leptos_reactive/miniserde"]
rkyv = ["leptos_reactive/rkyv"]
tracing = ["leptos_macro/tracing"]
nonce = ["leptos_dom/nonce"]
spin = [
"leptos_reactive/spin",
"leptos-spin-macro"
]
spin = ["leptos_reactive/spin", "leptos-spin-macro"]
experimental-islands = [
"leptos_dom/experimental-islands",
"leptos_macro/experimental-islands",
@ -81,7 +83,7 @@ experimental-islands = [
]
trace-component-props = [
"leptos_dom/trace-component-props",
"leptos_macro/trace-component-props"
"leptos_macro/trace-component-props",
]
[package.metadata.cargo-all-features]
@ -92,9 +94,10 @@ denylist = [
"rustls",
"default-tls",
"wasm-bindgen",
"rkyv", # was causing clippy issues on nightly
"trace-component-props",
"spin",
"experimental-islands"
"experimental-islands",
]
skip_feature_sets = [
[

View File

@ -1,10 +1,7 @@
use crate::Children;
use leptos_dom::{Errors, HydrationCtx, IntoView};
use leptos_macro::{component, view};
use leptos_reactive::{
create_rw_signal, provide_context, run_as_child, signal_prelude::*,
RwSignal,
};
use leptos_reactive::{provide_context, run_as_child, signal_prelude::*};
/// 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/>`.

View File

@ -1,6 +1,6 @@
use leptos::{component, ChildrenFn, ViewFn};
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`,
/// and show the fallback when it is `false`, without rerendering every time

View File

@ -5,10 +5,7 @@ pub mod errors;
use crate::errors::LeptosConfigError;
use config::{Case, Config, File, FileFormat};
use regex::Regex;
use std::{
convert::TryFrom, env::VarError, fs, net::SocketAddr, path::Path,
str::FromStr,
};
use std::{env::VarError, fs, net::SocketAddr, path::Path, str::FromStr};
use typed_builder::TypedBuilder;
/// A Struct to allow us to parse LeptosOptions from the file. Not really needed, most interactions should

View File

@ -516,8 +516,10 @@ where
}
}
#[cfg(all(target_arch = "wasm32", feature = "web"))]
struct HashRun<T>(T);
#[cfg(all(target_arch = "wasm32", feature = "web"))]
impl<T> fmt::Debug for HashRun<T> {
#[inline]
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {

View File

@ -1,6 +1,6 @@
use crate::{HydrationCtx, IntoView};
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 std::{borrow::Cow, collections::HashMap};

View File

@ -155,9 +155,8 @@ fn match_serialize() {
}
#[test]
#[allow(clippy::needless_borrow)]
fn match_no_serialize() {
#![allow(clippy::needless_borrow)]
struct CustomStruct {
field: &'static str,
}

View File

@ -1,7 +1,5 @@
use crate::{html::ElementDescriptor, HtmlElement};
use leptos_reactive::{
create_render_effect, create_rw_signal, signal_prelude::*, RwSignal,
};
use leptos_reactive::{create_render_effect, signal_prelude::*};
use std::cell::Cell;
/// Contains a shared reference to a DOM node created while using the `view`

View File

@ -9,7 +9,7 @@ use crate::{
use cfg_if::cfg_if;
use futures::{stream::FuturesUnordered, Future, Stream, StreamExt};
use itertools::Itertools;
use leptos_reactive::{Oco, *};
use leptos_reactive::*;
use std::pin::Pin;
type PinnedFuture<T> = Pin<Box<dyn Future<Output = T>>>;

View File

@ -11,13 +11,13 @@ dependencies = [
[tasks.test-leptos_macro-example]
description = "Tests the leptos_macro/example to check if macro handles doc comments correctly"
command = "cargo"
args = ["+nightly-2024-01-29", "test", "--doc"]
args = ["+nightly-2024-03-31", "test", "--doc"]
cwd = "example"
install_crate = false
[tasks.doc-leptos_macro-example]
description = "Docs the leptos_macro/example to check if macro handles doc comments correctly"
command = "cargo"
args = ["+nightly-2024-01-29", "doc"]
args = ["+nightly-2024-03-31", "doc"]
cwd = "example"
install_crate = false

View File

@ -41,15 +41,19 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
error: unexpected end of input, expected `=` or `(`
= 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`
= 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)

View File

@ -33,15 +33,19 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
error: unexpected end of input, expected `=` or `(`
= 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`
= 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)

View File

@ -72,7 +72,7 @@ hydrate = [
"dep:web-sys",
]
ssr = ["dep:tokio"]
nightly = ["rkyv?/copy"]
nightly = [] #["rkyv?/copy"] # not working on more recent nightlys
serde = []
serde-lite = ["dep:serde-lite"]
miniserde = ["dep:miniserde"]
@ -81,7 +81,7 @@ experimental-islands = []
spin = ["ssr", "dep:spin-sdk"]
[package.metadata.cargo-all-features]
denylist = ["nightly"]
denylist = ["nightly", "rkyv"]
skip_feature_sets = [
[
"csr",

View File

@ -1,6 +1,5 @@
use leptos_reactive::{
create_isomorphic_effect, create_runtime, create_signal, signal_prelude::*,
SignalGetUntracked, SignalSetUntracked,
create_isomorphic_effect, create_runtime, signal_prelude::*,
};
#[test]

View File

@ -2,9 +2,8 @@
#[cfg(debug_assertions)]
use leptos_reactive::console_warn;
use leptos_reactive::{
create_rw_signal, is_suppressing_resource_load, signal_prelude::*,
spawn_local, store_value, try_batch, use_context, ReadSignal, RwSignal,
StoredValue,
is_suppressing_resource_load, signal_prelude::*, spawn_local, store_value,
try_batch, use_context, StoredValue,
};
use server_fn::{error::ServerFnUrlError, ServerFn, ServerFnError};
use std::{cell::Cell, future::Future, pin::Pin, rc::Rc};

View File

@ -1,6 +1,6 @@
use leptos_reactive::{
create_rw_signal, is_suppressing_resource_load, signal_prelude::*,
spawn_local, store_value, untrack, ReadSignal, RwSignal, StoredValue,
is_suppressing_resource_load, signal_prelude::*, spawn_local, store_value,
untrack, StoredValue,
};
use server_fn::{ServerFn, ServerFnError};
use std::{future::Future, pin::Pin, rc::Rc};

View File

@ -1,4 +1,4 @@
use crate::{use_head, TextProp};
use crate::use_head;
use cfg_if::cfg_if;
use leptos::*;
use std::{cell::RefCell, rc::Rc};

View File

@ -470,15 +470,13 @@ where
}
});
}
let action_url = if let Some(url) = action.url() {
url
} else {
let action_url = action.url().unwrap_or_else(|| {
debug_warn!(
"<ActionForm/> action needs a URL. Either use \
create_server_action() or Action::using_server_fn()."
);
String::new()
};
});
let version = action.version();
let value = action.value();
@ -570,15 +568,13 @@ where
}
});
}
let action_url = if let Some(url) = action.url() {
url
} else {
let action_url = action.url().unwrap_or_else(|| {
debug_warn!(
"<MultiActionForm/> action needs a URL. Either use \
create_server_action() or Action::using_server_fn()."
);
String::new()
};
});
let on_submit = move |ev: SubmitEvent| {
if ev.default_prevented() {

View File

@ -1,5 +1,5 @@
use crate::{use_location, use_resolved_path, State};
use leptos::{leptos_dom::IntoView, *};
use leptos::*;
use std::borrow::Cow;
/// Describes a value that is either a static or a reactive URL, i.e.,

View File

@ -3,8 +3,7 @@ use crate::{
RouterContext,
};
use leptos::{
create_memo, request_animation_frame, signal_prelude::*, use_context,
window, Memo, Oco,
request_animation_frame, signal_prelude::*, use_context, window, Oco,
};
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.
#[track_caller]
pub fn use_params<T: Params>() -> Memo<Result<T, ParamsError>>
pub fn use_params<T>() -> Memo<Result<T, ParamsError>>
where
T: PartialEq,
T: Params + PartialEq,
{
let route = use_route();
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.
#[track_caller]
pub fn use_query<T: Params>() -> Memo<Result<T, ParamsError>>
pub fn use_query<T>() -> Memo<Result<T, ParamsError>>
where
T: PartialEq,
T: Params + PartialEq,
{
let router = use_router();
create_memo(move |_| router.inner.location.query.with(|m| T::from_map(m)))

View File

@ -128,6 +128,7 @@ denylist = [
"ciborium",
"hyper",
"inventory",
"rkyv",
]
skip_feature_sets = [
[

View File

@ -13,7 +13,7 @@ use syn::{
parse::{Parse, ParseStream},
punctuated::Punctuated,
spanned::Spanned,
Type, *,
*,
};
/// The implementation of the `server` macro.