From daf3b7ee9ae668717b6546bcba8c1656e68e94c7 Mon Sep 17 00:00:00 2001 From: Caelan Date: Tue, 1 Oct 2024 09:28:51 -0600 Subject: [PATCH] use workspace dependencies --- Cargo.lock | 31 +++--- Cargo.toml | 56 ++++++++++- src/bins/Cargo.toml | 98 ++++++++++--------- .../crates/velopack_nodeffi/Cargo.toml | 29 +++--- src/lib-rust/Cargo.toml | 55 ++++++----- 5 files changed, 174 insertions(+), 95 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f7e0018d..ab40b645 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -308,9 +308,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "cc" -version = "1.1.22" +version = "1.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" +checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" dependencies = [ "jobserver", "libc", @@ -1267,9 +1267,12 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] [[package]] name = "openssl" @@ -1395,6 +1398,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -1505,9 +1514,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -1517,9 +1526,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -1528,9 +1537,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "remove_dir_all" @@ -2094,7 +2103,7 @@ dependencies = [ [[package]] name = "velopack_nodeffi" -version = "0.1.0" +version = "0.0.0-local" dependencies = [ "lazy_static", "log", diff --git a/Cargo.toml b/Cargo.toml index f326817f..026f2fca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,8 @@ exclude = [ ] [workspace.package] -authors = ["Caelan Sayler "] +version = "0.0.0-local" +authors = ["Velopack Ltd, Caelan Sayler "] homepage = "https://velopack.io" repository = "https://github.com/velopack/velopack" documentation = "https://docs.velopack.io" @@ -21,6 +22,59 @@ license = "MIT" edition = "2021" rust-version = "1.75" +[workspace.dependencies] +velopack = { path = "src/lib-rust" } +log = "0.4" +native-tls = "0.2" +ureq = { version = "2.10", default-features = false, features = ["native-tls", "gzip"] } +url = "2.5" +semver = "1.0" +xml = "0.8" +derivative = "2.2" +glob = "0.3" +serde = { version = "1.0", features = ["derive"] } +serde_json = { version = "1.0" } +zip = { version = "2.2", default-features = false, features = ["deflate"] } +thiserror = "1.0" +lazy_static = "1.5" +regex = "1.10" +normpath = "1.3" +bitflags = "2.6" +rand = "0.8" +ts-rs = "10.0" +zstd = "0.13" +async-std = "1.13" +anyhow = "1.0" +pretty-bytes-rust = "0.3" +simplelog = "0.12" +clap = "4.5" +chrono = "0.4" +wait-timeout = "0.2" +strum = { version = "0.26", features = ["derive"] } +file-rotate = "0.7" +simple-stopwatch = "0.1" +enum-flags = "0.3" +remove_dir_all = { git = "https://github.com/caesay/remove_dir_all.git", features = ["log"] } +sha1_smol = "1.0" +time = "0.3" +os_info = "3.8" +neon = "1" +winres = "0.1" +tempfile = "3.9" +ntest = "0.9" +pretty_assertions = "1.4" +native-dialog = "0.7" +waitpid-any = "0.2" +dialog = "0.3" +libc = "0.2" +libloading = "0.8" +strsim = "0.11" +same-file = "1.0" +filelocksmith = "0.1" +image = { version = "0.25", default-features = false, features = ["gif", "jpeg", "png"] } +fs_extra = "1.3" +memmap2 = "0.9" + # default to small, optimized workspace release binaries [profile.release] opt-level = "z" # optimize for size diff --git a/src/bins/Cargo.toml b/src/bins/Cargo.toml index 3f7e45e9..9f705cbb 100644 --- a/src/bins/Cargo.toml +++ b/src/bins/Cargo.toml @@ -1,8 +1,16 @@ [package] name = "velopack_bins" -version = "0.0.0-local" -edition = "2021" publish = false +version.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true +documentation.workspace = true +keywords.workspace = true +categories.workspace = true +license.workspace = true +edition.workspace = true +rust-version.workspace = true [features] windows = [] @@ -31,48 +39,42 @@ name = "testapp" path = "src/testapp.rs" [dependencies] -velopack = { path = "../lib-rust" } -anyhow = "1.0" -pretty-bytes-rust = "0.3" -rand = "0.8" -log = "0.4" -simplelog = "0.12" -clap = "4.5" -semver = "1.0" -chrono = "0.4" -wait-timeout = "0.2" -lazy_static = "1.5" -strum = { version = "0.26", features = ["derive"] } -file-rotate = "0.7" -derivative = "2.2" -simple-stopwatch = "0.1" -glob = "0.3" -enum-flags = "0.3" -remove_dir_all = { git = "https://github.com/caesay/remove_dir_all.git", features = [ - "log", -] } -sha1_smol = "1.0" -time = "0.3" -os_info = "3.8" -bitflags = "2.6" -regex = "1.10" -normpath = "1.3" +velopack.workspace = true +anyhow.workspace = true +rand.workspace = true +log.workspace = true +simplelog.workspace = true +clap.workspace = true +semver.workspace = true +chrono.workspace = true +lazy_static.workspace = true +strum.workspace = true +derivative.workspace = true +glob.workspace = true +remove_dir_all.workspace = true +sha1_smol.workspace = true +time.workspace = true +os_info.workspace = true +bitflags.workspace = true +regex.workspace = true +normpath.workspace = true +simple-stopwatch.workspace = true +file-rotate.workspace = true +wait-timeout.workspace = true +pretty-bytes-rust.workspace = true +enum-flags.workspace = true [target.'cfg(unix)'.dependencies] -native-dialog = "0.7" -waitpid-any = "0.2" -dialog = "0.3" -libc = "0.2" +native-dialog.workspace = true +waitpid-any.workspace = true +dialog.workspace = true +libc.workspace = true [target.'cfg(windows)'.dependencies] -fs_extra = "1.3" -memmap2 = "0.9" +fs_extra.workspace = true +memmap2.workspace = true +image.workspace = true winsafe = { version = "0.0.20", features = ["gui"] } -image = { version = "0.25", default-features = false, features = [ - "gif", - "jpeg", - "png", -] } windows = { version = "0.58", default-features = false, features = [ "Win32_Foundation", "Win32_Security", @@ -100,18 +102,18 @@ windows = { version = "0.58", default-features = false, features = [ "Wdk_System_Threading", ] } webview2-com = "0.33" -libloading = "0.8" -strsim = "0.11" -same-file = "1.0" -filelocksmith = "0.1" +libloading.workspace = true +strsim.workspace = true +same-file.workspace = true +filelocksmith.workspace = true [dev-dependencies] -tempfile = "3.9" -ntest = "0.9" -pretty_assertions = "1.4" +tempfile.workspace = true +ntest.workspace = true +pretty_assertions.workspace = true [build-dependencies] -semver = "1.0" +semver.workspace = true [target.'cfg(windows)'.build-dependencies] -winres = "0.1" +winres.workspace = true diff --git a/src/lib-nodejs/crates/velopack_nodeffi/Cargo.toml b/src/lib-nodejs/crates/velopack_nodeffi/Cargo.toml index 8601bf5b..19b81b5e 100644 --- a/src/lib-nodejs/crates/velopack_nodeffi/Cargo.toml +++ b/src/lib-nodejs/crates/velopack_nodeffi/Cargo.toml @@ -1,22 +1,29 @@ [package] name = "velopack_nodeffi" -version = "0.1.0" -license = "MIT" -edition = "2021" exclude = ["index.node"] publish = false +version.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true +documentation.workspace = true +keywords.workspace = true +categories.workspace = true +license.workspace = true +edition.workspace = true +rust-version.workspace = true [lib] crate-type = ["cdylib"] [dependencies] -neon = "1" -serde_json = "1" -velopack = { path = "../../../lib-rust" } -semver = "1.0" -log = "0.4" -lazy_static = "1.5" +velopack.workspace = true +serde_json.workspace = true +semver.workspace = true +log.workspace = true +lazy_static.workspace = true +neon.workspace = true [build-dependencies] -ts-rs = "10.0" -velopack = { path = "../../../lib-rust", features = ["typescript"] } \ No newline at end of file +velopack = { workspace = true, features = ["typescript"] } +ts-rs.workspace = true \ No newline at end of file diff --git a/src/lib-rust/Cargo.toml b/src/lib-rust/Cargo.toml index fbc47dbd..60835188 100644 --- a/src/lib-rust/Cargo.toml +++ b/src/lib-rust/Cargo.toml @@ -1,10 +1,17 @@ [package] name = "velopack" -version = "0.0.0-local" -edition = "2021" description = "Installer and automatic updates for cross-platform desktop applications" -readme = "readme.md" -exclude = ["/samples"] +readme = "README.md" +version.workspace = true +authors.workspace = true +homepage.workspace = true +repository.workspace = true +documentation.workspace = true +keywords.workspace = true +categories.workspace = true +license.workspace = true +edition.workspace = true +rust-version.workspace = true [features] default = ["zstd"] @@ -20,29 +27,29 @@ name = "velopack" path = "src/lib.rs" [dependencies] -log = "0.4" -native-tls = "0.2" -ureq = { version = "2.10", default-features = false, features = ["native-tls", "gzip"] } -url = "2.5" -semver = "1.0" -xml = "0.8" -derivative = "2.2" -glob = "0.3" -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0" } -zip = { version = "2.2", default-features = false, features = ["deflate"] } -thiserror = "1.0" -lazy_static = "1.5" -regex = "1.10" -normpath = "1.3" -bitflags = "2.6" -rand = "0.8" +log.workspace = true +ureq.workspace = true +url.workspace = true +semver.workspace = true +xml.workspace = true +derivative.workspace = true +glob.workspace = true +serde.workspace = true +serde_json.workspace = true +zip.workspace = true +thiserror.workspace = true +lazy_static.workspace = true +regex.workspace = true +normpath.workspace = true +bitflags.workspace = true +rand.workspace = true +native-tls.workspace = true # typescript -ts-rs = { version = "10.0", optional = true } +ts-rs = { workspace = true, optional = true } # delta packages -zstd = { version = "0.13", optional = true } +zstd = { workspace = true, optional = true } # async -async-std = { version = "1.13", optional = true } +async-std = { workspace = true, optional = true }