diff --git a/Cargo.lock b/Cargo.lock index 1bbd14ac3e19..8a8b615a98ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3078,9 +3078,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index 6cb58cd362e9..36bb7a062e8f 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -2004,7 +2004,7 @@ ] }, "dialogImagePath": { - "description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.", + "description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs.\n\nThe required dimensions are 493px × 312px.", "type": [ "string", "null" diff --git a/core/tauri-runtime/Cargo.toml b/core/tauri-runtime/Cargo.toml index b3802a494468..d88bbb3c33f2 100644 --- a/core/tauri-runtime/Cargo.toml +++ b/core/tauri-runtime/Cargo.toml @@ -27,13 +27,13 @@ targets = [ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] } [dependencies] -serde = { version = "1.0", features = [ "derive" ] } -serde_json = "1.0" -thiserror = "1.0" +serde = { version = "1", features = [ "derive" ] } +serde_json = "1" +thiserror = "1" tauri-utils = { version = "1.6.1", path = "../tauri-utils" } uuid = { version = "1", features = [ "v4" ] } -http = "0.2.4" -http-range = "0.1.4" +http = "0.2" +http-range = "0.1" raw-window-handle = "0.5" rand = "0.8" url = { version = "2" } diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 4db5910532e0..00b0e4b64291 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -579,7 +579,7 @@ pub struct WixConfig { pub banner_path: Option, /// Path to a bitmap file to use on the installation user interface dialogs. /// It is used on the welcome and completion dialogs. - + /// /// The required dimensions are 493px × 312px. #[serde(alias = "dialog-image-path")] pub dialog_image_path: Option, @@ -3073,7 +3073,7 @@ impl<'d> serde::Deserialize<'d> for PackageVersion { fn deserialize>(deserializer: D) -> Result { struct PackageVersionVisitor; - impl<'d> Visitor<'d> for PackageVersionVisitor { + impl Visitor<'_> for PackageVersionVisitor { type Value = PackageVersion; fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/core/tauri-utils/src/resources.rs b/core/tauri-utils/src/resources.rs index fb62a64dcc4d..181c3b621afc 100644 --- a/core/tauri-utils/src/resources.rs +++ b/core/tauri-utils/src/resources.rs @@ -126,7 +126,7 @@ impl Resource { } } -impl<'a> Iterator for ResourcePaths<'a> { +impl Iterator for ResourcePaths<'_> { type Item = crate::Result; fn next(&mut self) -> Option> { @@ -148,7 +148,7 @@ fn normalize(path: &Path) -> PathBuf { dest } -impl<'a> Iterator for ResourcePathsIter<'a> { +impl Iterator for ResourcePathsIter<'_> { type Item = crate::Result; fn next(&mut self) -> Option> { diff --git a/core/tauri/src/api/file/extract.rs b/core/tauri/src/api/file/extract.rs index 31b869370f6d..bd05e7c7db50 100644 --- a/core/tauri/src/api/file/extract.rs +++ b/core/tauri/src/api/file/extract.rs @@ -73,7 +73,7 @@ pub enum Entry<'a, R: Read> { Zip(ZipEntry), } -impl<'a, R: Read> Entry<'a, R> { +impl Entry<'_, R> { /// The entry path. pub fn path(&self) -> crate::api::Result> { match self { @@ -145,7 +145,7 @@ pub struct Extract<'a, R: Read + Seek> { tar_archive: Option>>, } -impl<'a, R: std::fmt::Debug + Read + Seek> std::fmt::Debug for Extract<'a, R> { +impl std::fmt::Debug for Extract<'_, R> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Extract") .field("reader", &self.reader) diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index b670188901a6..8410eb466d36 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -759,7 +759,7 @@ impl WindowManager { .map(|p| p.to_string()) // the `strip_prefix` only returns None when a request is made to `https://tauri.$P` on Windows // where `$P` is not `localhost/*` - .unwrap_or_else(|| "".to_string()); + .unwrap_or_default(); let asset = manager.get_asset(path)?; let mut builder = HttpResponseBuilder::new() .header("Access-Control-Allow-Origin", &window_origin) diff --git a/core/tauri/src/plugin.rs b/core/tauri/src/plugin.rs index f82fd5d410bd..c4132deb7b80 100644 --- a/core/tauri/src/plugin.rs +++ b/core/tauri/src/plugin.rs @@ -650,10 +650,7 @@ impl PluginStore { let target = tokens.next().unwrap(); if let Some(plugin) = self.store.get_mut(target) { - invoke.message.command = tokens - .next() - .map(|c| c.to_string()) - .unwrap_or_else(String::new); + invoke.message.command = tokens.next().map(|c| c.to_string()).unwrap_or_default(); #[cfg(feature = "tracing")] let _span = tracing::trace_span!("plugin::hooks::ipc", name = plugin.name()).entered(); plugin.extend_api(invoke); diff --git a/core/tauri/src/state.rs b/core/tauri/src/state.rs index fa0eaae53f72..a4a402192ee3 100644 --- a/core/tauri/src/state.rs +++ b/core/tauri/src/state.rs @@ -38,7 +38,7 @@ impl Clone for State<'_, T> { } } -impl<'r, T: Send + Sync + std::fmt::Debug> std::fmt::Debug for State<'r, T> { +impl std::fmt::Debug for State<'_, T> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_tuple("State").field(&self.0).finish() } diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index ae931b392993..39236ee772dd 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -998,7 +998,7 @@ fn copy_files_and_run( if output.status.success() { // Rename the MSI to the match file name the Skip UAC task is expecting it to be let temp_msi = temp_dir.with_file_name(bin_name).with_extension("msi"); - Move::from_source(&path) + Move::from_source(path) .to_dest(&temp_msi) .expect("Unable to move update MSI"); let exit_status = Command::new("schtasks") diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 1b917cafb621..f42232ad4ddd 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -135,7 +135,7 @@ pub struct WindowBuilder<'a, R: Runtime> { navigation_handler: Option>, } -impl<'a, R: Runtime> fmt::Debug for WindowBuilder<'a, R> { +impl fmt::Debug for WindowBuilder<'_, R> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("WindowBuilder") .field("manager", &self.manager) @@ -1101,17 +1101,17 @@ impl Window { self.window.dispatcher.is_focused().map_err(Into::into) } - /// Gets the window’s current decoration state. + /// Gets the window's current decoration state. pub fn is_decorated(&self) -> crate::Result { self.window.dispatcher.is_decorated().map_err(Into::into) } - /// Gets the window’s current resizable state. + /// Gets the window's current resizable state. pub fn is_resizable(&self) -> crate::Result { self.window.dispatcher.is_resizable().map_err(Into::into) } - /// Gets the window’s native maximize button state + /// Gets the window's native maximize button state /// /// ## Platform-specific /// @@ -1120,7 +1120,7 @@ impl Window { self.window.dispatcher.is_maximizable().map_err(Into::into) } - /// Gets the window’s native minimize button state + /// Gets the window's native minimize button state /// /// ## Platform-specific /// @@ -1129,7 +1129,7 @@ impl Window { self.window.dispatcher.is_minimizable().map_err(Into::into) } - /// Gets the window’s native close button state + /// Gets the window's native close button state /// /// ## Platform-specific /// @@ -1556,6 +1556,7 @@ impl Window { self.window.dispatcher.url().unwrap() } + /// Returns the current url of the webview. #[cfg(test)] pub fn url(&self) -> Url { self.current_url.clone() diff --git a/core/tests/app-updater/tests/update.rs b/core/tests/app-updater/tests/update.rs index 3e7a899e3323..75f83d30a34f 100644 --- a/core/tests/app-updater/tests/update.rs +++ b/core/tests/app-updater/tests/update.rs @@ -277,7 +277,7 @@ fn update_app_v1() { }, }; build_app( - &options.cli_bin_path, + options.cli_bin_path, &fixture_dir, vec![("TAURI_PRIVATE_KEY", UPDATER_PRIVATE_KEY_NEXT)], &config, @@ -585,7 +585,7 @@ fn start_updater_server( let stream = FramedRead::new(file, BytesCodec::new()); let body = Body::wrap_stream(stream); println!("sending updater response"); - return Ok(Response::new(body)); + Ok(Response::new(body)) } _ => Response::builder() .status(StatusCode::NOT_FOUND) diff --git a/tooling/api/package.json b/tooling/api/package.json index 6b45c9d6c82b..36514960b9b6 100644 --- a/tooling/api/package.json +++ b/tooling/api/package.json @@ -48,7 +48,7 @@ "@types/node": "20.16.1", "@typescript-eslint/eslint-plugin": "5.62.0", "@typescript-eslint/parser": "5.62.0", - "eslint": "8.57.0", + "eslint": "8.57.1", "eslint-config-prettier": "8.10.0", "eslint-config-standard-with-typescript": "34.0.1", "eslint-plugin-import": "2.29.1", @@ -66,6 +66,8 @@ "yarn": ">= 1.19.1" }, "resolutions": { - "braces": "3.0.3" - } + "braces": "3.0.3", + "cross-spawn": ">=7.0.6" + }, + "dependencies": {} } diff --git a/tooling/api/yarn.lock b/tooling/api/yarn.lock index 0fa5016e97fa..2a6b8120ba5d 100644 --- a/tooling/api/yarn.lock +++ b/tooling/api/yarn.lock @@ -29,17 +29,17 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@8.57.1": + version "8.57.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" + integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== dependencies: - "@humanwhocodes/object-schema" "^2.0.2" + "@humanwhocodes/object-schema" "^2.0.3" debug "^4.3.1" minimatch "^3.0.5" @@ -48,7 +48,7 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.2": +"@humanwhocodes/object-schema@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== @@ -442,10 +442,10 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -cross-spawn@^7.0.2: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== +cross-spawn@>=7.0.6, cross-spawn@^7.0.2: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" @@ -772,16 +772,16 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@8.57.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== +eslint@8.57.1: + version "8.57.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" + integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint/js" "8.57.1" + "@humanwhocodes/config-array" "^0.13.0" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" diff --git a/tooling/bench/Cargo.toml b/tooling/bench/Cargo.toml index 8be842d6371f..2347a352051c 100644 --- a/tooling/bench/Cargo.toml +++ b/tooling/bench/Cargo.toml @@ -11,11 +11,11 @@ description = "Cross-platform WebView rendering library" repository = "https://github.com/tauri-apps/wry" [dependencies] -anyhow = "1.0.40" +anyhow = "1" time = { version = "0.3", features = ["formatting"] } -tempfile = "3.2.0" -serde_json = "1.0" -serde = { version = "1.0", features = [ "derive" ] } +tempfile = "3" +serde_json = "1" +serde = { version = "1", features = [ "derive" ] } [[bin]] name = "run_benchmark" diff --git a/tooling/cli/node/package.json b/tooling/cli/node/package.json index 7dc2c4220347..7c57f122a63c 100644 --- a/tooling/cli/node/package.json +++ b/tooling/cli/node/package.json @@ -40,7 +40,7 @@ "devDependencies": { "@napi-rs/cli": "2.16.1", "cross-env": "7.0.3", - "cross-spawn": "7.0.3", + "cross-spawn": "7.0.6", "fs-extra": "11.1.1", "jest": "29.7.0", "jest-transform-toml": "1.0.0", @@ -48,7 +48,8 @@ }, "resolutions": { "semver": ">=7.5.2", - "braces": "3.0.3" + "braces": "3.0.3", + "cross-spawn": ">=7.0.6" }, "engines": { "node": ">= 10" diff --git a/tooling/cli/node/yarn.lock b/tooling/cli/node/yarn.lock index 55de20b584dd..f201d8bc6e23 100644 --- a/tooling/cli/node/yarn.lock +++ b/tooling/cli/node/yarn.lock @@ -914,10 +914,10 @@ cross-env@7.0.3: dependencies: cross-spawn "^7.0.1" -cross-spawn@7.0.3, cross-spawn@^7.0.1, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== +cross-spawn@7.0.6, cross-spawn@>=7.0.6, cross-spawn@^7.0.1, cross-spawn@^7.0.3: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 6cb58cd362e9..36bb7a062e8f 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -2004,7 +2004,7 @@ ] }, "dialogImagePath": { - "description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.", + "description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs.\n\nThe required dimensions are 493px × 312px.", "type": [ "string", "null" diff --git a/tooling/cli/src/build.rs b/tooling/cli/src/build.rs index 7eca16ea1142..ee58b62ff8df 100644 --- a/tooling/cli/src/build.rs +++ b/tooling/cli/src/build.rs @@ -426,7 +426,7 @@ mod pkgconfig_utils { if !output.stdout.is_empty() { // output would be "-L/path/to/library\n" let word = output.stdout[2..].to_vec(); - return Some(String::from_utf8_lossy(&word).trim().to_string()); + Some(String::from_utf8_lossy(&word).trim().to_string()) } else { None }