Skip to content

Commit

Permalink
Merge branch '1.x' into backport_check_parent_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored Jan 3, 2025
2 parents 3729339 + cbf38b9 commit 3f7253f
Show file tree
Hide file tree
Showing 19 changed files with 65 additions and 64 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/tauri-config-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions core/tauri-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-utils/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ pub struct WixConfig {
pub banner_path: Option<PathBuf>,
/// 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<PathBuf>,
Expand Down Expand Up @@ -3073,7 +3073,7 @@ impl<'d> serde::Deserialize<'d> for PackageVersion {
fn deserialize<D: Deserializer<'d>>(deserializer: D) -> Result<PackageVersion, D::Error> {
struct PackageVersionVisitor;

impl<'d> Visitor<'d> for PackageVersionVisitor {
impl Visitor<'_> for PackageVersionVisitor {
type Value = PackageVersion;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-utils/src/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl Resource {
}
}

impl<'a> Iterator for ResourcePaths<'a> {
impl Iterator for ResourcePaths<'_> {
type Item = crate::Result<PathBuf>;

fn next(&mut self) -> Option<crate::Result<PathBuf>> {
Expand All @@ -148,7 +148,7 @@ fn normalize(path: &Path) -> PathBuf {
dest
}

impl<'a> Iterator for ResourcePathsIter<'a> {
impl Iterator for ResourcePathsIter<'_> {
type Item = crate::Result<Resource>;

fn next(&mut self) -> Option<crate::Result<Resource>> {
Expand Down
4 changes: 2 additions & 2 deletions core/tauri/src/api/file/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub enum Entry<'a, R: Read> {
Zip(ZipEntry),
}

impl<'a, R: Read> Entry<'a, R> {
impl<R: Read> Entry<'_, R> {
/// The entry path.
pub fn path(&self) -> crate::api::Result<Cow<'_, Path>> {
match self {
Expand Down Expand Up @@ -145,7 +145,7 @@ pub struct Extract<'a, R: Read + Seek> {
tar_archive: Option<tar::Archive<&'a mut ArchiveReader<R>>>,
}

impl<'a, R: std::fmt::Debug + Read + Seek> std::fmt::Debug for Extract<'a, R> {
impl<R: std::fmt::Debug + Read + Seek> 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)
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ impl<R: Runtime> WindowManager<R> {
.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)
Expand Down
5 changes: 1 addition & 4 deletions core/tauri/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,7 @@ impl<R: Runtime> PluginStore<R> {
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);
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl<T: Send + Sync + 'static> Clone for State<'_, T> {
}
}

impl<'r, T: Send + Sync + std::fmt::Debug> std::fmt::Debug for State<'r, T> {
impl<T: Send + Sync + std::fmt::Debug> 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()
}
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/updater/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
13 changes: 7 additions & 6 deletions core/tauri/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub struct WindowBuilder<'a, R: Runtime> {
navigation_handler: Option<Box<NavigationHandler>>,
}

impl<'a, R: Runtime> fmt::Debug for WindowBuilder<'a, R> {
impl<R: Runtime> fmt::Debug for WindowBuilder<'_, R> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("WindowBuilder")
.field("manager", &self.manager)
Expand Down Expand Up @@ -1101,17 +1101,17 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.is_focused().map_err(Into::into)
}

/// Gets the windows current decoration state.
/// Gets the window's current decoration state.
pub fn is_decorated(&self) -> crate::Result<bool> {
self.window.dispatcher.is_decorated().map_err(Into::into)
}

/// Gets the windows current resizable state.
/// Gets the window's current resizable state.
pub fn is_resizable(&self) -> crate::Result<bool> {
self.window.dispatcher.is_resizable().map_err(Into::into)
}

/// Gets the windows native maximize button state
/// Gets the window's native maximize button state
///
/// ## Platform-specific
///
Expand All @@ -1120,7 +1120,7 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.is_maximizable().map_err(Into::into)
}

/// Gets the windows native minimize button state
/// Gets the window's native minimize button state
///
/// ## Platform-specific
///
Expand All @@ -1129,7 +1129,7 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.is_minimizable().map_err(Into::into)
}

/// Gets the windows native close button state
/// Gets the window's native close button state
///
/// ## Platform-specific
///
Expand Down Expand Up @@ -1556,6 +1556,7 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.url().unwrap()
}

/// Returns the current url of the webview.
#[cfg(test)]
pub fn url(&self) -> Url {
self.current_url.clone()
Expand Down
4 changes: 2 additions & 2 deletions core/tests/app-updater/tests/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions tooling/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -66,6 +66,8 @@
"yarn": ">= 1.19.1"
},
"resolutions": {
"braces": "3.0.3"
}
"braces": "3.0.3",
"cross-spawn": ">=7.0.6"
},
"dependencies": {}
}
40 changes: 20 additions & 20 deletions tooling/api/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"

"@eslint/[email protected].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/[email protected].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"

Expand All @@ -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==
Expand Down Expand Up @@ -442,10 +442,10 @@ [email protected]:
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"
Expand Down Expand Up @@ -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==

[email protected].0:
version "8.57.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668"
integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==
[email protected].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"
Expand Down
8 changes: 4 additions & 4 deletions tooling/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions tooling/cli/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@
"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",
"prettier": "2.8.8"
},
"resolutions": {
"semver": ">=7.5.2",
"braces": "3.0.3"
"braces": "3.0.3",
"cross-spawn": ">=7.0.6"
},
"engines": {
"node": ">= 10"
Expand Down
8 changes: 4 additions & 4 deletions tooling/cli/node/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -914,10 +914,10 @@ [email protected]:
dependencies:
cross-spawn "^7.0.1"

[email protected].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==
[email protected].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"
Expand Down
2 changes: 1 addition & 1 deletion tooling/cli/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tooling/cli/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 3f7253f

Please sign in to comment.