From 4e578e335bf26c062486a36ef05d6370f197d7b8 Mon Sep 17 00:00:00 2001 From: Roland Fredenhagen Date: Mon, 18 Mar 2024 16:39:34 +0100 Subject: [PATCH 01/13] chore: update attribute-derive (#2438) --- leptos_macro/Cargo.toml | 2 +- leptos_macro/src/component.rs | 4 ++-- leptos_macro/src/slot.rs | 4 ++-- leptos_macro/tests/ui/component.stderr | 6 ++++-- leptos_macro/tests/ui/component_absolute.stderr | 6 ++++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/leptos_macro/Cargo.toml b/leptos_macro/Cargo.toml index 20f773a9fb..008ef3fdd9 100644 --- a/leptos_macro/Cargo.toml +++ b/leptos_macro/Cargo.toml @@ -13,7 +13,7 @@ rust-version.workspace = true proc-macro = true [dependencies] -attribute-derive = { version = "0.8", features = ["syn-full"] } +attribute-derive = { version = "0.9", features = ["syn-full"]} cfg-if = "1" html-escape = "0.2" itertools = "0.12" diff --git a/leptos_macro/src/component.rs b/leptos_macro/src/component.rs index 05b171e92e..ae5386f951 100644 --- a/leptos_macro/src/component.rs +++ b/leptos_macro/src/component.rs @@ -1,4 +1,4 @@ -use attribute_derive::Attribute as AttributeDerive; +use attribute_derive::FromAttr; use convert_case::{ Case::{Pascal, Snake}, Casing, @@ -808,7 +808,7 @@ impl Docs { } } -#[derive(Clone, Debug, AttributeDerive)] +#[derive(Clone, Debug, FromAttr)] #[attribute(ident = prop)] struct PropOpt { #[attribute(conflicts = [optional_no_strip, strip_option])] diff --git a/leptos_macro/src/slot.rs b/leptos_macro/src/slot.rs index 50a3ccb69c..f2b2b60d51 100644 --- a/leptos_macro/src/slot.rs +++ b/leptos_macro/src/slot.rs @@ -1,7 +1,7 @@ use crate::component::{ convert_from_snake_case, drain_filter, is_option, unwrap_option, Docs, }; -use attribute_derive::Attribute as AttributeDerive; +use attribute_derive::FromAttr; use proc_macro2::{Ident, TokenStream}; use quote::{quote, ToTokens, TokenStreamExt}; use syn::{ @@ -179,7 +179,7 @@ impl Prop { } } -#[derive(Clone, Debug, AttributeDerive)] +#[derive(Clone, Debug, FromAttr)] #[attribute(ident = prop)] struct PropOpt { #[attribute(conflicts = [optional_no_strip, strip_option])] diff --git a/leptos_macro/tests/ui/component.stderr b/leptos_macro/tests/ui/component.stderr index 7a425f79ba..96c4b2e7e8 100644 --- a/leptos_macro/tests/ui/component.stderr +++ b/leptos_macro/tests/ui/component.stderr @@ -38,7 +38,9 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option` 30 | #[prop(optional_no_strip, strip_option)] conflicting: bool, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: unexpected end of input, expected assignment `=` +error: unexpected end of input, expected `=` or `(` + + = help: try `#[prop(default = 5 * 10)]` --> tests/ui/component.rs:36:40 | 36 | fn default_without_value(#[prop(default)] default: bool) -> impl IntoView { @@ -46,7 +48,7 @@ error: unexpected end of input, expected assignment `=` 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 | 42 | #[prop(default= |)] default: bool, diff --git a/leptos_macro/tests/ui/component_absolute.stderr b/leptos_macro/tests/ui/component_absolute.stderr index 8975dec7de..862c28af21 100644 --- a/leptos_macro/tests/ui/component_absolute.stderr +++ b/leptos_macro/tests/ui/component_absolute.stderr @@ -30,7 +30,9 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option` 25 | #[prop(optional_no_strip, strip_option)] conflicting: bool, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: unexpected end of input, expected assignment `=` +error: unexpected end of input, expected `=` or `(` + + = help: try `#[prop(default = 5 * 10)]` --> tests/ui/component_absolute.rs:32:19 | 32 | #[prop(default)] default: bool, @@ -38,7 +40,7 @@ error: unexpected end of input, expected assignment `=` 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 | 39 | #[prop(default= |)] default: bool, From fda4dba2370fdb4f5f81961bdeb7ca139d2e612d Mon Sep 17 00:00:00 2001 From: Joseph Cruz Date: Mon, 18 Mar 2024 11:58:37 -0400 Subject: [PATCH 02/13] build(examples): clean more output (#2420) * chore(examples): update workspace members * build(examples): clean e2e crates * build(examples): clean pkg directories * chore: remove simulated change comment * chore: add simulated change * chore: remove simulated change --- examples/Makefile.toml | 9 ++++++++- examples/cargo-make/clean.toml | 11 +++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/examples/Makefile.toml b/examples/Makefile.toml index 48a0a3a417..d717e26f57 100644 --- a/examples/Makefile.toml +++ b/examples/Makefile.toml @@ -5,6 +5,7 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = "" CARGO_MAKE_WORKSPACE_EMULATION = true CARGO_MAKE_CRATE_WORKSPACE_MEMBERS = [ + "action-form-error-handling", "animated_show", "counter", "counter_isomorphic", @@ -12,27 +13,33 @@ CARGO_MAKE_CRATE_WORKSPACE_MEMBERS = [ "counters_stable", "counter_url_query", "counter_without_macros", + "directives", "error_boundary", "errors_axum", "fetch", "hackernews", "hackernews_axum", + "hackernews_islands_axum", + "hackernews_js_fetch", "js-framework-benchmark", "login_with_token_csr_only", "parent_child", + "portal", "router", "server_fns_axum", "session_auth_axum", "slots", + "sso_auth_axum", "ssr_modes", "ssr_modes_axum", "suspense_tests", "tailwind_actix", - "tailwind_csr", "tailwind_axum", + "tailwind_csr", "timer", "todo_app_sqlite", "todo_app_sqlite_axum", + "todo_app_sqlite_csr", "todomvc", ] diff --git a/examples/cargo-make/clean.toml b/examples/cargo-make/clean.toml index 9b1a72e9b6..febf709709 100644 --- a/examples/cargo-make/clean.toml +++ b/examples/cargo-make/clean.toml @@ -4,11 +4,13 @@ dependencies = [ "clean-trunk", "clean-node_modules", "clean-playwright", + "clean-pkg", ] [tasks.clean-cargo] -command = "rm" -args = ["-rf", "target"] +script = ''' +find . -type d -name target | xargs rm -rf +''' [tasks.clean-trunk] script = ''' @@ -27,3 +29,8 @@ fi script = ''' find . -name playwright-report -name playwright -name test-results | xargs rm -rf ''' + +[tasks.clean-pkg] +script = ''' +find . -type d -name pkg | xargs rm -rf +''' From 7ef186f642739503b5213dbd28f6560251ec04c8 Mon Sep 17 00:00:00 2001 From: Richard Laughlin Date: Tue, 19 Mar 2024 12:35:53 -0400 Subject: [PATCH 03/13] For the session_auth_axum example, move the passhash into a separate (#2446) non-serializable struct. This prevents it from being returned in the get_user() API, and prevents it from being unintentionally returned on any new API the end-user may create on top of this example code. --- examples/session_auth_axum/src/auth.rs | 69 +++++++++++++++++--------- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/examples/session_auth_axum/src/auth.rs b/examples/session_auth_axum/src/auth.rs index 4bc6bf97ef..c7e9d4f7e9 100644 --- a/examples/session_auth_axum/src/auth.rs +++ b/examples/session_auth_axum/src/auth.rs @@ -6,10 +6,13 @@ use std::collections::HashSet; pub struct User { pub id: i64, pub username: String, - pub password: String, pub permissions: HashSet, } +// Explicitly is not Serialize/Deserialize! +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct UserPasshash(String); + impl Default for User { fn default() -> Self { let permissions = HashSet::new(); @@ -17,7 +20,6 @@ impl Default for User { Self { id: -1, username: "Guest".into(), - password: "".into(), permissions, } } @@ -25,7 +27,7 @@ impl Default for User { #[cfg(feature = "ssr")] pub mod ssr { - pub use super::User; + pub use super::{User, UserPasshash}; pub use axum_session_auth::{ Authentication, HasPermission, SessionSqlitePool, }; @@ -42,7 +44,10 @@ pub mod ssr { pub use bcrypt::{hash, verify, DEFAULT_COST}; impl User { - pub async fn get(id: i64, pool: &SqlitePool) -> Option { + pub async fn get_with_passhash( + id: i64, + pool: &SqlitePool, + ) -> Option<(Self, UserPasshash)> { let sqluser = sqlx::query_as::<_, SqlUser>( "SELECT * FROM users WHERE id = ?", ) @@ -63,10 +68,16 @@ pub mod ssr { Some(sqluser.into_user(Some(sql_user_perms))) } - pub async fn get_from_username( + pub async fn get(id: i64, pool: &SqlitePool) -> Option { + User::get_with_passhash(id, pool) + .await + .map(|(user, _)| user) + } + + pub async fn get_from_username_with_passhash( name: String, pool: &SqlitePool, - ) -> Option { + ) -> Option<(Self, UserPasshash)> { let sqluser = sqlx::query_as::<_, SqlUser>( "SELECT * FROM users WHERE username = ?", ) @@ -86,6 +97,15 @@ pub mod ssr { Some(sqluser.into_user(Some(sql_user_perms))) } + + pub async fn get_from_username( + name: String, + pool: &SqlitePool, + ) -> Option { + User::get_from_username_with_passhash(name, pool) + .await + .map(|(user, _)| user) + } } #[derive(sqlx::FromRow, Clone)] @@ -137,20 +157,22 @@ pub mod ssr { pub fn into_user( self, sql_user_perms: Option>, - ) -> User { - User { - id: self.id, - username: self.username, - password: self.password, - permissions: if let Some(user_perms) = sql_user_perms { - user_perms - .into_iter() - .map(|x| x.token) - .collect::>() - } else { - HashSet::::new() + ) -> (User, UserPasshash) { + ( + User { + id: self.id, + username: self.username, + permissions: if let Some(user_perms) = sql_user_perms { + user_perms + .into_iter() + .map(|x| x.token) + .collect::>() + } else { + HashSet::::new() + }, }, - } + UserPasshash(self.password), + ) } } } @@ -180,11 +202,12 @@ pub async fn login( let pool = pool()?; let auth = auth()?; - let user: User = User::get_from_username(username, &pool) - .await - .ok_or_else(|| ServerFnError::new("User does not exist."))?; + let (user, UserPasshash(expected_passhash)) = + User::get_from_username_with_passhash(username, &pool) + .await + .ok_or_else(|| ServerFnError::new("User does not exist."))?; - match verify(password, &user.password)? { + match verify(password, &expected_passhash)? { true => { auth.login_user(user.id); auth.remember_user(remember.is_some()); From ac75999c9f6a782467f6654baf909ac5080a9082 Mon Sep 17 00:00:00 2001 From: Joseph Cruz Date: Tue, 19 Mar 2024 12:36:30 -0400 Subject: [PATCH 04/13] chore(ci): upgrade actions to node 20 (#2444) * chore(ci): install jq with apt * chore(ci): install trunk with cargo * chore(ci): replace toolchain action * chore(ci): upgrade pnpm cache action * chore: simulate change * fix(ci): pnpm cache action typo * chore: remove simulated change --- .github/workflows/get-examples-matrix.yml | 4 ++-- .github/workflows/run-cargo-make-task.yml | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/get-examples-matrix.yml b/.github/workflows/get-examples-matrix.yml index aff211cd41..7fb309adce 100644 --- a/.github/workflows/get-examples-matrix.yml +++ b/.github/workflows/get-examples-matrix.yml @@ -17,8 +17,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Install JQ Tool - uses: mbround18/install-jq@v1 + - name: Install jq + run: sudo apt-get install jq - name: Set Matrix id: set-matrix diff --git a/.github/workflows/run-cargo-make-task.yml b/.github/workflows/run-cargo-make-task.yml index 2b8e68fc6a..90a8d9915a 100644 --- a/.github/workflows/run-cargo-make-task.yml +++ b/.github/workflows/run-cargo-make-task.yml @@ -27,11 +27,9 @@ jobs: - uses: actions/checkout@v4 - name: Setup Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ inputs.toolchain }} - override: true - components: rustfmt - name: Add wasm32-unknown-unknown run: rustup target add wasm32-unknown-unknown @@ -54,9 +52,7 @@ jobs: run: cargo binstall cargo-leptos --no-confirm - name: Install Trunk - uses: jetli/trunk-action@v0.4.0 - with: - version: "latest" + run: cargo binstall trunk --no-confirm - name: Print Trunk Version run: trunk --version @@ -78,7 +74,7 @@ jobs: run: | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 name: Setup pnpm cache with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} From 104c09f3bf3a3d42fd050fa7fd4177804ed2dc93 Mon Sep 17 00:00:00 2001 From: sify21 Date: Wed, 20 Mar 2024 00:37:42 +0800 Subject: [PATCH 05/13] register server_fn first to allow for wildcard Route path (#2435) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's normal to have a `NotFound` page with a wildcard path like this ``` ... ``` In `ssr` mode, most servers do a `first match win` approach, so we should register server functions before view routes, or else a wildcard route would block all api requests. https://discord.com/channels/1031524867910148188/1218508054442545185 Signed-off-by: 司芳源 --- integrations/actix/src/lib.rs | 32 +++++++++++++---------- integrations/axum/src/lib.rs | 48 +++++++++++++++++------------------ 2 files changed, 42 insertions(+), 38 deletions(-) diff --git a/integrations/actix/src/lib.rs b/integrations/actix/src/lib.rs index c606422969..682616d74c 100644 --- a/integrations/actix/src/lib.rs +++ b/integrations/actix/src/lib.rs @@ -1210,6 +1210,15 @@ where IV: IntoView + 'static, { let mut router = self; + + // register server functions first to allow for wildcard route in Leptos's Router + for (path, _) in server_fn::actix::server_fn_paths() { + let additional_context = additional_context.clone(); + let handler = handle_server_fns_with_context(additional_context); + router = router.route(path, handler); + } + + // register routes defined in Leptos's Router for listing in paths.iter() { let path = listing.path(); let mode = listing.mode(); @@ -1272,13 +1281,6 @@ where } } - // register server functions - for (path, _) in server_fn::actix::server_fn_paths() { - let additional_context = additional_context.clone(); - let handler = handle_server_fns_with_context(additional_context); - router = router.route(path, handler); - } - router } } @@ -1311,6 +1313,15 @@ impl LeptosRoutes for &mut ServiceConfig { IV: IntoView + 'static, { let mut router = self; + + // register server functions first to allow for wildcard route in Leptos's Router + for (path, _) in server_fn::actix::server_fn_paths() { + let additional_context = additional_context.clone(); + let handler = handle_server_fns_with_context(additional_context); + router = router.route(path, handler); + } + + // register routes defined in Leptos's Router for listing in paths.iter() { let path = listing.path(); let mode = listing.mode(); @@ -1355,13 +1366,6 @@ impl LeptosRoutes for &mut ServiceConfig { } } - // register server functions - for (path, _) in server_fn::actix::server_fn_paths() { - let additional_context = additional_context.clone(); - let handler = handle_server_fns_with_context(additional_context); - router = router.route(path, handler); - } - router } } diff --git a/integrations/axum/src/lib.rs b/integrations/axum/src/lib.rs index 76da90958a..df6301b898 100644 --- a/integrations/axum/src/lib.rs +++ b/integrations/axum/src/lib.rs @@ -1624,6 +1624,30 @@ where let mut router = self; + // register server functions first to allow for wildcard router path + for (path, method) in server_fn::axum::server_fn_paths() { + let cx_with_state = cx_with_state.clone(); + let handler = move |req: Request| async move { + handle_server_fns_with_context(cx_with_state, req).await + }; + router = router.route( + path, + match method { + Method::GET => get(handler), + Method::POST => post(handler), + Method::PUT => put(handler), + Method::DELETE => delete(handler), + Method::PATCH => patch(handler), + _ => { + panic!( + "Unsupported server function HTTP method: \ + {method:?}" + ); + } + }, + ); + } + // register router paths for listing in paths.iter() { let path = listing.path(); @@ -1722,30 +1746,6 @@ where } } - // register server functions - for (path, method) in server_fn::axum::server_fn_paths() { - let cx_with_state = cx_with_state.clone(); - let handler = move |req: Request| async move { - handle_server_fns_with_context(cx_with_state, req).await - }; - router = router.route( - path, - match method { - Method::GET => get(handler), - Method::POST => post(handler), - Method::PUT => put(handler), - Method::DELETE => delete(handler), - Method::PATCH => patch(handler), - _ => { - panic!( - "Unsupported server function HTTP method: \ - {method:?}" - ); - } - }, - ); - } - router } From 841d7a690afe8284671cd99af274987f09cbd847 Mon Sep 17 00:00:00 2001 From: martin frances Date: Tue, 19 Mar 2024 16:40:24 +0000 Subject: [PATCH 06/13] chore: examples/tailwind_axum bumped tailwindcss to 3.4.2. (#2443) --- examples/tailwind_axum/package-lock.json | 908 ----------------------- examples/tailwind_axum/package.json | 8 +- 2 files changed, 4 insertions(+), 912 deletions(-) delete mode 100644 examples/tailwind_axum/package-lock.json diff --git a/examples/tailwind_axum/package-lock.json b/examples/tailwind_axum/package-lock.json deleted file mode 100644 index 416d14e42e..0000000000 --- a/examples/tailwind_axum/package-lock.json +++ /dev/null @@ -1,908 +0,0 @@ -{ - "name": "leptos-tailwind", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "leptos-tailwind", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "tailwindcss": "^3.3.2" - } - }, - "node_modules/@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" - }, - "node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" - }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/jiti": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", - "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==", - "bin": { - "jiti": "bin/jiti.js" - } - }, - "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "engines": { - "node": ">=10" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "engines": { - "node": ">= 6" - } - }, - "node_modules/postcss": { - "version": "8.4.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", - "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dependencies": { - "camelcase-css": "^2.0.1" - }, - "engines": { - "node": "^12 || ^14 || >= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.4.21" - } - }, - "node_modules/postcss-load-config": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", - "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", - "dependencies": { - "lilconfig": "^2.0.5", - "yaml": "^2.1.1" - }, - "engines": { - "node": ">= 14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", - "dependencies": { - "postcss-selector-parser": "^6.0.11" - }, - "engines": { - "node": ">=12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dependencies": { - "pify": "^2.3.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sucrase": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.32.0.tgz", - "integrity": "sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "7.1.6", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tailwindcss": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.2.tgz", - "integrity": "sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==", - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.5.3", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.2.12", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.18.2", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.1", - "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", - "postcss-value-parser": "^4.2.0", - "resolve": "^1.22.2", - "sucrase": "^3.32.0" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", - "engines": { - "node": ">= 14" - } - } - } -} diff --git a/examples/tailwind_axum/package.json b/examples/tailwind_axum/package.json index 644fcf7bf8..6df432b0cf 100644 --- a/examples/tailwind_axum/package.json +++ b/examples/tailwind_axum/package.json @@ -4,13 +4,13 @@ "description": "\r \r \"Leptos\r ", "main": "index.js", "scripts": { - "build":"npx tailwindcss -i ./input.css -o ./style/output.css", - "watch":"npx tailwindcss -i ./input.css -o ./style/output.css --watch" + "build": "npx tailwindcss -i ./input.css -o ./style/output.css", + "watch": "npx tailwindcss -i ./input.css -o ./style/output.css --watch" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "tailwindcss": "^3.3.2" + "tailwindcss": "^3.4.1" } -} +} \ No newline at end of file From d1560f9e1f5c6b794efb4f4dcd46e17231257db0 Mon Sep 17 00:00:00 2001 From: Ratul Date: Thu, 21 Mar 2024 02:54:54 +0530 Subject: [PATCH 07/13] Added missing link for #[server] macro (#2437) * Added missing link for #[server] macro Added missing link for #[server] macro * Removed spurious entry --- .../migrations/20221118172000_create_todo_table.sql | 7 ------- server_fn/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 examples/server_fns_axum/migrations/20221118172000_create_todo_table.sql diff --git a/examples/server_fns_axum/migrations/20221118172000_create_todo_table.sql b/examples/server_fns_axum/migrations/20221118172000_create_todo_table.sql deleted file mode 100644 index 3c2908e53c..0000000000 --- a/examples/server_fns_axum/migrations/20221118172000_create_todo_table.sql +++ /dev/null @@ -1,7 +0,0 @@ - -CREATE TABLE IF NOT EXISTS todos -( - id INTEGER NOT NULL PRIMARY KEY, - title VARCHAR, - completed BOOLEAN -); \ No newline at end of file diff --git a/server_fn/src/lib.rs b/server_fn/src/lib.rs index ee803960f5..2d796d6830 100644 --- a/server_fn/src/lib.rs +++ b/server_fn/src/lib.rs @@ -28,7 +28,7 @@ //! //! ### `#[server]` //! -//! The [`#[server]`][server] macro allows you to annotate a function to +//! The [`#[server]`](../leptos/attr.server.html) macro allows you to annotate a function to //! indicate that it should only run on the server (i.e., when you have an `ssr` feature in your //! crate that is enabled). //! From 630fd4570db8d8d6eb4e4e45d25c6f8f7ef654d9 Mon Sep 17 00:00:00 2001 From: Joseph Cruz Date: Fri, 22 Mar 2024 07:23:48 -0400 Subject: [PATCH 08/13] fix(ci): trunk command not found (#2453) * chore: simulate change * chore: remove print trunk version * Revert "chore: remove print trunk version" This reverts commit c203a83b4429bc0914ce0210cd5ab1572714f8b7. * chore(ci): use jetli/trunk-action * chore: remove simulated change --- .github/workflows/run-cargo-make-task.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-cargo-make-task.yml b/.github/workflows/run-cargo-make-task.yml index 90a8d9915a..b7a073fb86 100644 --- a/.github/workflows/run-cargo-make-task.yml +++ b/.github/workflows/run-cargo-make-task.yml @@ -52,7 +52,9 @@ jobs: run: cargo binstall cargo-leptos --no-confirm - name: Install Trunk - run: cargo binstall trunk --no-confirm + uses: jetli/trunk-action@v0.4.0 + with: + version: "latest" - name: Print Trunk Version run: trunk --version From 5819014ccc71f4b4c0504ec8c5e097bd349523ba Mon Sep 17 00:00:00 2001 From: martin frances Date: Fri, 22 Mar 2024 11:23:57 +0000 Subject: [PATCH 09/13] Chore(ci) bumping tj-actions/changed-files to version 43. (#2454) --- .github/workflows/get-example-changed.yml | 2 +- .github/workflows/get-leptos-changed.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/get-example-changed.yml b/.github/workflows/get-example-changed.yml index 76155d47ec..ab36be06b5 100644 --- a/.github/workflows/get-example-changed.yml +++ b/.github/workflows/get-example-changed.yml @@ -21,7 +21,7 @@ jobs: - name: Get example files that changed id: changed-files - uses: tj-actions/changed-files@v41 + uses: tj-actions/changed-files@v43 with: files: | examples/** diff --git a/.github/workflows/get-leptos-changed.yml b/.github/workflows/get-leptos-changed.yml index 88db05c6d3..36483bc096 100644 --- a/.github/workflows/get-leptos-changed.yml +++ b/.github/workflows/get-leptos-changed.yml @@ -19,7 +19,7 @@ jobs: - name: Get source files that changed id: changed-source - uses: tj-actions/changed-files@v41 + uses: tj-actions/changed-files@v43 with: files: | integrations/** From 0b7094911838e16d6d5ede6c8be9c3a681d1aa63 Mon Sep 17 00:00:00 2001 From: martin frances Date: Fri, 22 Mar 2024 22:07:04 +0000 Subject: [PATCH 10/13] Bumped base64 to 0.22. (#2457) --- leptos_dom/Cargo.toml | 2 +- leptos_reactive/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/leptos_dom/Cargo.toml b/leptos_dom/Cargo.toml index ab3d679e59..99a6068b4f 100644 --- a/leptos_dom/Cargo.toml +++ b/leptos_dom/Cargo.toml @@ -10,7 +10,7 @@ rust-version.workspace = true [dependencies] async-recursion = "1" -base64 = { version = "0.21", optional = true } +base64 = { version = "0.22", optional = true } cfg-if = "1" drain_filter_polyfill = "0.1" futures = "0.3" diff --git a/leptos_reactive/Cargo.toml b/leptos_reactive/Cargo.toml index 8db424dd7c..0e8d8ef401 100644 --- a/leptos_reactive/Cargo.toml +++ b/leptos_reactive/Cargo.toml @@ -28,7 +28,7 @@ rustc-hash = "1" serde-wasm-bindgen = "0.6" serde_json = "1" spin-sdk = { version = "2", optional = true } -base64 = "0.21" +base64 = "0.22" thiserror = "1" tokio = { version = "1", features = [ "rt", From 572ae5bbdf1cc4cdda2a6d1f6d6547c33afd9d69 Mon Sep 17 00:00:00 2001 From: Joseph Cruz Date: Fri, 22 Mar 2024 18:51:13 -0400 Subject: [PATCH 11/13] test(ci): check semver (#2450) * test(ci): check semver * chore: simulate change * fix(ci): add checkout * fix(ci): version typo * chore: remove simulated change --- .github/workflows/ci-semver.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/ci-semver.yml diff --git a/.github/workflows/ci-semver.yml b/.github/workflows/ci-semver.yml new file mode 100644 index 0000000000..00b6a8bba3 --- /dev/null +++ b/.github/workflows/ci-semver.yml @@ -0,0 +1,28 @@ +name: CI semver + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + get-leptos-changed: + uses: ./.github/workflows/get-leptos-changed.yml + + test: + needs: [get-leptos-changed] + if: needs.get-leptos-changed.outputs.leptos_changed == 'true' + name: Run semver check (nightly-2024-01-29) + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Sember Checks + uses: obi1kenobi/cargo-semver-checks-action@v2 + with: + rust-toolchain: nightly-2024-01-29 From 0abcc348cad438ec71b752d3a22f2631790279ee Mon Sep 17 00:00:00 2001 From: boyswan Date: Fri, 22 Mar 2024 22:51:50 +0000 Subject: [PATCH 12/13] Persist parent span context within resource fetchers (#2456) --- leptos_reactive/src/resource.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/leptos_reactive/src/resource.rs b/leptos_reactive/src/resource.rs index 356e0bdd66..542c1f9180 100644 --- a/leptos_reactive/src/resource.rs +++ b/leptos_reactive/src/resource.rs @@ -1389,6 +1389,7 @@ where } } + let current_span = tracing::Span::current(); // run the Future let serializable = self.serializable; spawn_local({ @@ -1397,6 +1398,8 @@ where let set_loading = self.set_loading; let last_version = self.version.clone(); async move { + // continue trace context within resource fetcher + let _guard = current_span.enter(); let res = fut.await; if version == last_version.get() { From f3d19ca7448acb8dcc87a7cbb8d4adf2d946002d Mon Sep 17 00:00:00 2001 From: martin frances Date: Sun, 24 Mar 2024 01:27:31 +0000 Subject: [PATCH 13/13] Minor: Ran cargo clippy --fix (#2461) Manually reviewed the changes. All look like reasonable nudges. A summary :- In one place removed a redundant call to .clone(). In two places, now using clone_from() which clippy says **MAY** be an optimisation. --- leptos_macro/src/component.rs | 4 ++-- leptos_reactive/src/callback.rs | 2 +- leptos_reactive/src/slice.rs | 8 ++++---- leptos_reactive/tests/memo.rs | 2 +- router/src/components/routes.rs | 2 +- router/src/extract_routes/test_extract_routes.rs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/leptos_macro/src/component.rs b/leptos_macro/src/component.rs index ae5386f951..67c190e39c 100644 --- a/leptos_macro/src/component.rs +++ b/leptos_macro/src/component.rs @@ -705,8 +705,8 @@ impl Docs { { view_code_fence_state = ViewCodeFenceState::Rust; let view = trimmed_doc.find('v').unwrap(); - quotes = trimmed_doc[..view].to_owned(); - quote_ws = leading_ws.to_owned(); + trimmed_doc[..view].clone_into(&mut quotes); + leading_ws.clone_into(&mut quote_ws); let rust_options = &trimmed_doc [view + "view".len()..] .trim_start(); diff --git a/leptos_reactive/src/callback.rs b/leptos_reactive/src/callback.rs index fbe93e7f46..82b5981d19 100644 --- a/leptos_reactive/src/callback.rs +++ b/leptos_reactive/src/callback.rs @@ -238,7 +238,7 @@ mod tests { fn clone_callback() { let rt = create_runtime(); let callback = Callback::new(move |_no_clone: NoClone| NoClone {}); - let _cloned = callback.clone(); + let _cloned = callback; rt.dispose(); } diff --git a/leptos_reactive/src/slice.rs b/leptos_reactive/src/slice.rs index acd67ac496..52bdf451d1 100644 --- a/leptos_reactive/src/slice.rs +++ b/leptos_reactive/src/slice.rs @@ -71,8 +71,8 @@ use crate::{ #[track_caller] pub fn create_slice( signal: RwSignal, - getter: impl Fn(&T) -> O + Clone + Copy + 'static, - setter: impl Fn(&mut T, S) + Clone + Copy + 'static, + getter: impl Fn(&T) -> O + Copy + 'static, + setter: impl Fn(&mut T, S) + Copy + 'static, ) -> (Signal, SignalSetter) where O: PartialEq, @@ -88,7 +88,7 @@ where #[track_caller] pub fn create_read_slice( signal: RwSignal, - getter: impl Fn(&T) -> O + Clone + Copy + 'static, + getter: impl Fn(&T) -> O + Copy + 'static, ) -> Signal where O: PartialEq, @@ -101,7 +101,7 @@ where #[track_caller] pub fn create_write_slice( signal: RwSignal, - setter: impl Fn(&mut T, O) + Clone + Copy + 'static, + setter: impl Fn(&mut T, O) + Copy + 'static, ) -> SignalSetter { let setter = move |value| signal.update(|x| setter(x, value)); setter.into_signal_setter() diff --git a/leptos_reactive/tests/memo.rs b/leptos_reactive/tests/memo.rs index 0d072cd084..bce11dd215 100644 --- a/leptos_reactive/tests/memo.rs +++ b/leptos_reactive/tests/memo.rs @@ -248,7 +248,7 @@ fn owning_memo_slice() { let token = create_owning_memo(move |old_token| { state.with(move |state| { let is_different = old_token.as_ref() != Some(&state.token); - let mut token = old_token.unwrap_or_else(String::new); + let mut token = old_token.unwrap_or_default(); if is_different { token.clone_from(&state.token); diff --git a/router/src/components/routes.rs b/router/src/components/routes.rs index 832313f1e5..2517e4a14e 100644 --- a/router/src/components/routes.rs +++ b/router/src/components/routes.rs @@ -359,7 +359,7 @@ fn inherit_settings(children: &mut [RouteDefinition], router: &RouterContext) { ) { for child in children { if child.trailing_slash.is_none() { - child.trailing_slash = inherited.trailing_slash.clone(); + child.trailing_slash.clone_from(&inherited.trailing_slash); } route_def_inherit( &mut child.children, diff --git a/router/src/extract_routes/test_extract_routes.rs b/router/src/extract_routes/test_extract_routes.rs index 69b41bb6ad..549582d64c 100644 --- a/router/src/extract_routes/test_extract_routes.rs +++ b/router/src/extract_routes/test_extract_routes.rs @@ -186,7 +186,7 @@ impl History for TestHistory { } fn navigate(&self, new_loc: &LocationChange) { - self.loc.update(|loc| loc.value = new_loc.value.clone()) + self.loc.update(|loc| loc.value.clone_from(&new_loc.value)) } }