From 85904566e7bc18636262cd8c2461fde16c757893 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 15 Sep 2026 14:24:13 -0700 Subject: [PATCH] chore(plugins): replace deprecated zip-extract with zip --- Cargo.lock | 48 +----------------------------- crates/yaak-plugins/Cargo.toml | 2 +- crates/yaak-plugins/src/error.rs | 2 +- crates/yaak-plugins/src/install.rs | 3 +- 4 files changed, 5 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cfb450cf..49e25e67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4181,26 +4181,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "liblzma" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66352d7a8ac12d4877b6e6ea5a9b7650ee094257dc40889955bea5bc5b08c1d0" -dependencies = [ - "liblzma-sys", -] - -[[package]] -name = "liblzma-sys" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b9596486f6d60c3bbe644c0e1be1aa6ccc472ad630fe8927b456973d7cb736" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "libredox" version = "0.1.3" @@ -11671,7 +11651,7 @@ dependencies = [ "yaak-crypto", "yaak-models", "yaak-templates", - "zip-extract", + "zip 7.0.0", ] [[package]] @@ -12094,25 +12074,10 @@ version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caa8cd6af31c3b31c6631b8f483848b91589021b28fffe50adada48d4f4d2ed1" dependencies = [ - "aes", "arbitrary", - "bzip2", - "constant_time_eq 0.3.1", "crc32fast", - "deflate64", - "flate2", - "getrandom 0.3.3", - "hmac", "indexmap 2.14.0", - "liblzma", "memchr", - "pbkdf2", - "ppmd-rust", - "sha1 0.10.7", - "time", - "zeroize", - "zopfli", - "zstd", ] [[package]] @@ -12143,17 +12108,6 @@ dependencies = [ "zstd", ] -[[package]] -name = "zip-extract" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa5b9958fd0b5b685af54f2c3fa21fca05fe295ebaf3e77b6d24d96c4174037" -dependencies = [ - "log 0.4.34", - "thiserror 2.0.20", - "zip 4.6.1", -] - [[package]] name = "zlib-rs" version = "0.6.7" diff --git a/crates/yaak-plugins/Cargo.toml b/crates/yaak-plugins/Cargo.toml index 3f4f2945..8f393cf0 100644 --- a/crates/yaak-plugins/Cargo.toml +++ b/crates/yaak-plugins/Cargo.toml @@ -27,4 +27,4 @@ yaak-common = { workspace = true } yaak-crypto = { workspace = true } yaak-models = { workspace = true } yaak-templates = { workspace = true } -zip-extract = "0.4.0" +zip = "7" diff --git a/crates/yaak-plugins/src/error.rs b/crates/yaak-plugins/src/error.rs index f5db0333..944874e3 100644 --- a/crates/yaak-plugins/src/error.rs +++ b/crates/yaak-plugins/src/error.rs @@ -43,7 +43,7 @@ pub enum Error { PluginErr(String), #[error("zip error: {0}")] - ZipError(#[from] zip_extract::ZipExtractError), + ZipError(#[from] zip::result::ZipError), #[error("Client not initialized error")] ClientNotInitializedErr, diff --git a/crates/yaak-plugins/src/install.rs b/crates/yaak-plugins/src/install.rs index fe677650..0e6aeb9e 100644 --- a/crates/yaak-plugins/src/install.rs +++ b/crates/yaak-plugins/src/install.rs @@ -65,7 +65,8 @@ pub async fn download_and_install( let _ = remove_dir_all(&plugin_dir); create_dir_all(&plugin_dir)?; - zip_extract::extract(Cursor::new(&bytes), &plugin_dir, true)?; + zip::ZipArchive::new(Cursor::new(&bytes))? + .extract_unwrapped_root_dir(&plugin_dir, zip::read::root_dir_common_filter)?; info!("Extracted plugin {} to {}", plugin_version.id, plugin_dir_str); let plugin = query_manager.with_tx(|db| {