From 2b42967d86215f8611003e8ea3a1fd6a8b1b9df1 Mon Sep 17 00:00:00 2001 From: Marcin Szczepanski Date: Tue, 18 Jul 2023 10:49:52 +1000 Subject: [PATCH] Bump oxipng from 6.0.0 -> 8.0.0 This fixes an issue building for aarch64-unknown-linux-musl - where a C dependency of oxipng was failing to compile. The latest version does not use this dependency. --- Cargo.lock | 96 ++++++++++++++-------------- packages/optimizers/image/Cargo.toml | 2 +- packages/optimizers/image/src/lib.rs | 3 +- 3 files changed, 49 insertions(+), 52 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26fdc8a95fd..83efe403269 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -126,12 +126,6 @@ dependencies = [ "scoped-tls", ] -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitflags" version = "1.3.2" @@ -144,6 +138,18 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "block-buffer" version = "0.10.3" @@ -260,24 +266,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "cloudflare-zlib" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfcefb5df07f146eb15756342a135eb7d76b8bb609eff9c111f7539d060f94d" -dependencies = [ - "cloudflare-zlib-sys", -] - -[[package]] -name = "cloudflare-zlib-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2040b6d1edfee6d75f172d81e2d2a7807534f3f294ce18184c70e7bb0105cd6f" -dependencies = [ - "cc", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -318,21 +306,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - [[package]] name = "crc32fast" version = "1.3.2" @@ -610,6 +583,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "generic-array" version = "0.14.6" @@ -964,18 +943,18 @@ checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libdeflate-sys" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43afa5b192ff058426ba20a4f35c290ef402478d6045ac934ac15aa947a3898d" +checksum = "cb6784b6b84b67d71b4307963d456a9c7c29f9b47c658f533e598de369e34277" dependencies = [ "cc", ] [[package]] name = "libdeflater" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e656b7960ec49e864badc7ad1b810427a7ac8b78511a699ce5cdc3ead0b32e5b" +checksum = "d8e285aa6a046fd338b2592c16bee148b2b00789138ed6b7bb56bb13d585050d" dependencies = [ "libdeflate-sys", ] @@ -1229,14 +1208,12 @@ checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" [[package]] name = "oxipng" -version = "6.0.1" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40d437cd5308cba163907008d4c91a0280fc3b1ec1265dd20820e739002f4d9" +checksum = "630638e107fb436644c300e781d3f17e1b04656138ba0d40564be4be3b06db32" dependencies = [ - "bit-vec", + "bitvec", "clap", - "cloudflare-zlib", - "crc", "crossbeam-channel", "filetime", "image", @@ -1244,9 +1221,9 @@ dependencies = [ "itertools", "libdeflater", "log", - "miniz_oxide", "rayon", "rgb", + "rustc-hash", "rustc_version 0.4.0", "stderrlog", "wild", @@ -1608,6 +1585,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.8.5" @@ -2498,6 +2481,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" version = "3.3.0" @@ -2980,6 +2969,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + [[package]] name = "xxhash-rust" version = "0.8.6" diff --git a/packages/optimizers/image/Cargo.toml b/packages/optimizers/image/Cargo.toml index 8a1393396ec..7e85abfd0f3 100644 --- a/packages/optimizers/image/Cargo.toml +++ b/packages/optimizers/image/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["cdylib"] [dependencies] napi = {version = "2.12.6", features = ["napi4", "compat-mode"]} napi-derive = "2.12.5" -oxipng = "6.0.0" +oxipng = "8.0.0" mozjpeg-sys = "1.0.0" libc = "0.2" diff --git a/packages/optimizers/image/src/lib.rs b/packages/optimizers/image/src/lib.rs index 8e6ec212240..3c78e926cef 100644 --- a/packages/optimizers/image/src/lib.rs +++ b/packages/optimizers/image/src/lib.rs @@ -2,7 +2,7 @@ use mozjpeg_sys::*; use napi::bindgen_prelude::*; use napi::{Env, Error, JsBuffer, Result}; use napi_derive::napi; -use oxipng::{optimize_from_memory, Deflaters, Headers, Options}; +use oxipng::{optimize_from_memory, Headers, Options}; use std::mem; use std::ptr; use std::slice; @@ -14,7 +14,6 @@ pub fn optimize(kind: String, buf: Buffer, env: Env) -> Result { match kind.as_ref() { "png" => { let options = Options { - deflate: Deflaters::Libdeflater, strip: Headers::Safe, ..Default::default() };