From 72e68933875b97f1937eeedfa186d94497673179 Mon Sep 17 00:00:00 2001 From: karim Date: Thu, 1 Aug 2024 09:47:45 -0400 Subject: [PATCH] Move common dependencies to workspace --- Cargo.toml | 29 +++++++++++++++++++++++++++++ yazi-adapter/Cargo.toml | 22 +++++++++++----------- yazi-boot/Cargo.toml | 8 ++++---- yazi-cli/Cargo.toml | 20 ++++++++++---------- yazi-config/Cargo.toml | 18 +++++++++--------- yazi-core/Cargo.toml | 34 +++++++++++++++++----------------- yazi-dds/Cargo.toml | 18 +++++++++--------- yazi-fm/Cargo.toml | 22 +++++++++++----------- yazi-fs/Cargo.toml | 10 +++++----- yazi-plugin/Cargo.toml | 34 +++++++++++++++++----------------- yazi-proxy/Cargo.toml | 6 +++--- yazi-scheduler/Cargo.toml | 14 +++++++------- yazi-shared/Cargo.toml | 26 +++++++++++++------------- 13 files changed, 145 insertions(+), 116 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d0276a6f..0b2e4560 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,3 +8,32 @@ codegen-units = 1 lto = true panic = "abort" strip = true + +[workspace.dependencies] +ansi-to-tui = "=3.1.0" +anyhow = "1.0.86" +arc-swap = "1.7.1" +base64 = "0.22.1" +bitflags = "2.6.0" +clap = { version = "4.5.11", features = [ "derive" ] } +crossterm = { version = "0.27.0", features = [ "event-stream", "use-dev-tty" ] } +dirs = "5.0.1" +futures = "0.3.30" +globset = "0.4.14" +libc = "0.2.155" +md-5 = "0.10.6" +mlua = { version = "0.9.9", features = [ "lua54", "serialize", "macros", "async" ] } +parking_lot = "0.12.3" +ratatui = "0.27.0" +regex = "1.10.5" +scopeguard = "1.2.0" +serde = { version = "1.0.204", features = [ "derive" ] } +serde_json = "1.0.121" +shell-words = "1.1.0" +tokio = { version = "1.39.2", features = [ "full" ] } +tokio-stream = "0.1.15" +tokio-util = "0.7.11" +unicode-width = "0.1.13" + +# Logging +tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] } diff --git a/yazi-adapter/Cargo.toml b/yazi-adapter/Cargo.toml index 3224b6a3..eee9a9b9 100644 --- a/yazi-adapter/Cargo.toml +++ b/yazi-adapter/Cargo.toml @@ -13,22 +13,22 @@ yazi-config = { path = "../yazi-config", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -ansi-to-tui = "=3.1.0" -anyhow = "1.0.86" -arc-swap = "1.7.1" -base64 = "0.22.1" +ansi-to-tui = { workspace = true } +anyhow = { workspace = true } +arc-swap = { workspace = true } +base64 = { workspace = true } color_quant = "1.1.0" -crossterm = "0.27.0" -futures = "0.3.30" +crossterm = { workspace = true } +futures = { workspace = true } image = "0.25.2" imagesize = "0.13.0" kamadak-exif = "0.5.5" -ratatui = "0.27.0" -scopeguard = "1.2.0" -tokio = { version = "1.39.2", features = [ "full" ] } +ratatui = { workspace = true } +scopeguard = { workspace = true } +tokio = { workspace = true } # Logging -tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] } +tracing = { workspace = true } [target.'cfg(target_os = "macos")'.dependencies] -crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] } +crossterm = { workspace = true } diff --git a/yazi-boot/Cargo.toml b/yazi-boot/Cargo.toml index b334dfb6..50c517ff 100644 --- a/yazi-boot/Cargo.toml +++ b/yazi-boot/Cargo.toml @@ -9,17 +9,17 @@ homepage = "https://yazi-rs.github.io" repository = "https://github.com/sxyazi/yazi" [dependencies] -regex = "1.10.5" +regex = { workspace = true } yazi-adapter = { path = "../yazi-adapter", version = "0.3.0" } yazi-config = { path = "../yazi-config", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -clap = { version = "4.5.11", features = [ "derive" ] } -serde = { version = "1.0.204", features = [ "derive" ] } +clap = { workspace = true } +serde = { workspace = true } [build-dependencies] -clap = { version = "4.5.11", features = [ "derive" ] } +clap = { workspace = true } clap_complete = "4.5.11" clap_complete_fig = "4.5.2" clap_complete_nushell = "4.5.3" diff --git a/yazi-cli/Cargo.toml b/yazi-cli/Cargo.toml index b512f4a0..67869b31 100644 --- a/yazi-cli/Cargo.toml +++ b/yazi-cli/Cargo.toml @@ -14,28 +14,28 @@ yazi-dds = { path = "../yazi-dds", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -anyhow = "1.0.86" -clap = { version = "4.5.11", features = [ "derive" ] } -crossterm = "0.27.0" -md-5 = "0.10.6" -serde_json = "1.0.121" -tokio = { version = "1.39.2", features = [ "full" ] } +anyhow = { workspace = true } +clap = { workspace = true } +crossterm = { workspace = true } +md-5 = { workspace = true } +serde_json = { workspace = true } +tokio = { workspace = true } toml_edit = "0.22.18" [build-dependencies] yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External build dependencies -anyhow = "1.0.86" -clap = { version = "4.5.11", features = [ "derive" ] } +anyhow = { workspace = true } +clap = { workspace = true } clap_complete = "4.5.11" clap_complete_fig = "4.5.2" clap_complete_nushell = "4.5.3" -serde_json = "1.0.121" +serde_json = { workspace = true } vergen-gitcl = { version = "1.0.0", features = [ "build" ] } [target.'cfg(target_os = "macos")'.dependencies] -crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] } +crossterm = { workspace = true } [[bin]] name = "ya" diff --git a/yazi-config/Cargo.toml b/yazi-config/Cargo.toml index c5b778c1..f2571430 100644 --- a/yazi-config/Cargo.toml +++ b/yazi-config/Cargo.toml @@ -12,17 +12,17 @@ repository = "https://github.com/sxyazi/yazi" yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -anyhow = "1.0.86" -arc-swap = "1.7.1" -bitflags = "2.6.0" -crossterm = "0.27.0" -globset = "0.4.14" +anyhow = { workspace = true } +arc-swap = { workspace = true } +bitflags = { workspace = true } +crossterm = { workspace = true } +globset = { workspace = true } indexmap = "2.2.6" -ratatui = "0.27.0" -regex = "1.10.5" -serde = { version = "1.0.204", features = [ "derive" ] } +ratatui = { workspace = true } +regex = { workspace = true } +serde = { workspace = true } toml = { version = "0.8.17", features = [ "preserve_order" ] } validator = { version = "0.18.1", features = [ "derive" ] } [target.'cfg(target_os = "macos")'.dependencies] -crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] } +crossterm = { workspace = true } diff --git a/yazi-core/Cargo.toml b/yazi-core/Cargo.toml index 5acc011a..32a3b059 100644 --- a/yazi-core/Cargo.toml +++ b/yazi-core/Cargo.toml @@ -20,27 +20,27 @@ yazi-scheduler = { path = "../yazi-scheduler", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -anyhow = "1.0.86" -bitflags = "2.6.0" -crossterm = "0.27.0" -dirs = "5.0.1" -futures = "0.3.30" +anyhow = { workspace = true } +bitflags = { workspace = true } +crossterm = { workspace = true } +dirs = { workspace = true } +futures = { workspace = true } notify = { git = "https://github.com/notify-rs/notify.git", rev = "96dec74316a93bed6eec9db177b233e6e017275e", default-features = false, features = [ "macos_fsevent" ] } -parking_lot = "0.12.3" -ratatui = "0.27.0" -scopeguard = "1.2.0" -serde = "1.0.204" -shell-words = "1.1.0" -tokio = { version = "1.39.2", features = [ "full" ] } -tokio-stream = "0.1.15" -tokio-util = "0.7.11" -unicode-width = "0.1.13" +parking_lot = { workspace = true } +ratatui = { workspace = true } +scopeguard = { workspace = true } +serde = { workspace = true } +shell-words = { workspace = true } +tokio = { workspace = true } +tokio-stream = { workspace = true } +tokio-util = { workspace = true } +unicode-width = { workspace = true } # Logging -tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] } +tracing = { workspace = true } [target."cfg(unix)".dependencies] -libc = "0.2.155" +libc = { workspace = true } [target.'cfg(target_os = "macos")'.dependencies] -crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] } +crossterm = { workspace = true } diff --git a/yazi-dds/Cargo.toml b/yazi-dds/Cargo.toml index f9e5f062..e247bd36 100644 --- a/yazi-dds/Cargo.toml +++ b/yazi-dds/Cargo.toml @@ -17,17 +17,17 @@ yazi-boot = { path = "../yazi-boot", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -anyhow = "1.0.86" -mlua = { version = "0.9.9", features = [ "lua54" ] } -parking_lot = "0.12.3" -serde = { version = "1.0.204", features = [ "derive" ] } -serde_json = "1.0.121" -tokio = { version = "1.39.2", features = [ "full" ] } -tokio-stream = "0.1.15" -tokio-util = "0.7.11" +anyhow = { workspace = true } +mlua = { workspace = true } +parking_lot = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +tokio = { workspace = true } +tokio-stream = { workspace = true } +tokio-util = { workspace = true } # Logging -tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] } +tracing = { workspace = true } [build-dependencies] vergen-gitcl = { version = "1.0.0", features = [ "build" ] } diff --git a/yazi-fm/Cargo.toml b/yazi-fm/Cargo.toml index f58688ab..72b1f794 100644 --- a/yazi-fm/Cargo.toml +++ b/yazi-fm/Cargo.toml @@ -24,29 +24,29 @@ yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -anyhow = "1.0.86" +anyhow = { workspace = true } better-panic = "0.3.0" -crossterm = { version = "0.27.0", features = [ "event-stream" ] } +crossterm = { workspace = true } fdlimit = "0.3.0" -futures = "0.3.30" -mlua = { version = "0.9.9", features = [ "lua54" ] } -ratatui = "0.27.0" -scopeguard = "1.2.0" +futures = { workspace = true } +mlua = { workspace = true } +ratatui = { workspace = true } +scopeguard = { workspace = true } syntect = { version = "5.2.0", default-features = false, features = [ "parsing", "plist-load", "regex-onig" ] } -tokio = { version = "1.39.2", features = [ "full" ] } -tokio-stream = "0.1.15" +tokio = { workspace = true } +tokio-stream = { workspace = true } # Logging -tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] } +tracing = { workspace = true } tracing-appender = "0.2.3" tracing-subscriber = "0.3.18" [target."cfg(unix)".dependencies] -libc = "0.2.155" +libc = { workspace = true } signal-hook-tokio = { version = "0.3.1", features = [ "futures-v0_3" ] } [target.'cfg(target_os = "macos")'.dependencies] -crossterm = { version = "0.27.0", features = [ "event-stream", "use-dev-tty" ] } +crossterm = { workspace = true } [target.'cfg(all(not(target_os = "macos"), not(target_os = "windows")))'.dependencies] tikv-jemallocator = "0.6.0" diff --git a/yazi-fs/Cargo.toml b/yazi-fs/Cargo.toml index b4e2c63a..1e3c4093 100644 --- a/yazi-fs/Cargo.toml +++ b/yazi-fs/Cargo.toml @@ -14,8 +14,8 @@ yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -anyhow = "1.0.86" -futures = "0.3.30" -ratatui = "0.27.0" -regex = "1.10.5" -tokio = { version = "1.39.2", features = [ "full" ] } +anyhow = { workspace = true } +futures = { workspace = true } +ratatui = { workspace = true } +regex = { workspace = true } +tokio = { workspace = true } diff --git a/yazi-plugin/Cargo.toml b/yazi-plugin/Cargo.toml index 47ec884d..71ce2490 100644 --- a/yazi-plugin/Cargo.toml +++ b/yazi-plugin/Cargo.toml @@ -21,26 +21,26 @@ yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -ansi-to-tui = "=3.1.0" -anyhow = "1.0.86" -base64 = "0.22.1" -crossterm = "0.27.0" -futures = "0.3.30" -globset = "0.4.14" -md-5 = "0.10.6" -mlua = { version = "0.9.9", features = [ "lua54", "serialize", "macros", "async" ] } -parking_lot = "0.12.3" -ratatui = "0.27.0" -shell-words = "1.1.0" +ansi-to-tui = { workspace = true } +anyhow = { workspace = true } +base64 = { workspace = true } +crossterm = { workspace = true } +futures = { workspace = true } +globset = { workspace = true } +md-5 = { workspace = true } +mlua = { workspace = true } +parking_lot = { workspace = true } +ratatui = { workspace = true } +shell-words = { workspace = true } syntect = { version = "5.2.0", default-features = false, features = [ "parsing", "plist-load", "regex-onig" ] } -tokio = { version = "1.39.2", features = [ "full" ] } -tokio-stream = "0.1.15" -tokio-util = "0.7.11" -unicode-width = "0.1.13" +tokio = { workspace = true } +tokio-stream = { workspace = true } +tokio-util = { workspace = true } +unicode-width = { workspace = true } yazi-prebuild = "0.1.2" # Logging -tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] } +tracing = { workspace = true } [target."cfg(unix)".dependencies] uzers = "0.12.0" @@ -49,4 +49,4 @@ uzers = "0.12.0" clipboard-win = "5.4.0" [target.'cfg(target_os = "macos")'.dependencies] -crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] } +crossterm = { workspace = true } diff --git a/yazi-proxy/Cargo.toml b/yazi-proxy/Cargo.toml index 1266adeb..ed97a726 100644 --- a/yazi-proxy/Cargo.toml +++ b/yazi-proxy/Cargo.toml @@ -17,6 +17,6 @@ yazi-config = { path = "../yazi-config", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -anyhow = "1.0.86" -mlua = { version = "0.9.9", features = [ "lua54" ] } -tokio = { version = "1.39.2", features = [ "full" ] } +anyhow = { workspace = true } +mlua = { workspace = true } +tokio = { workspace = true } diff --git a/yazi-scheduler/Cargo.toml b/yazi-scheduler/Cargo.toml index e732d540..b48ee40f 100644 --- a/yazi-scheduler/Cargo.toml +++ b/yazi-scheduler/Cargo.toml @@ -16,18 +16,18 @@ yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" } yazi-shared = { path = "../yazi-shared", version = "0.3.0" } # External dependencies -anyhow = "1.0.86" +anyhow = { workspace = true } async-priority-channel = "0.2.0" -futures = "0.3.30" -parking_lot = "0.12.3" -scopeguard = "1.2.0" -tokio = { version = "1.39.2", features = [ "full" ] } +futures = { workspace = true } +parking_lot = { workspace = true } +scopeguard = { workspace = true } +tokio = { workspace = true } # Logging -tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] } +tracing = { workspace = true } [target."cfg(unix)".dependencies] -libc = "0.2.155" +libc = { workspace = true } [target.'cfg(not(target_os = "android"))'.dependencies] trash = "5.0.0" diff --git a/yazi-shared/Cargo.toml b/yazi-shared/Cargo.toml index fd419cbe..9581cdbf 100644 --- a/yazi-shared/Cargo.toml +++ b/yazi-shared/Cargo.toml @@ -10,22 +10,22 @@ repository = "https://github.com/sxyazi/yazi" rust-version = "1.78.0" [dependencies] -anyhow = "1.0.86" -bitflags = "2.6.0" -crossterm = "0.27.0" -dirs = "5.0.1" -futures = "0.3.30" -libc = "0.2.155" -parking_lot = "0.12.3" +anyhow = { workspace = true } +bitflags = { workspace = true } +crossterm = { workspace = true } +dirs = { workspace = true } +futures = { workspace = true } +libc = { workspace = true } +parking_lot = { workspace = true } percent-encoding = "2.3.1" -ratatui = "0.27.0" -regex = "1.10.5" -serde = { version = "1.0.204", features = [ "derive" ] } -shell-words = "1.1.0" -tokio = { version = "1.39.2", features = [ "full" ] } +ratatui = { workspace = true } +regex = { workspace = true } +serde = { workspace = true } +shell-words = { workspace = true } +tokio = { workspace = true } [target.'cfg(windows)'.dependencies] windows-sys = { version = "0.59.0", features = [ "Win32_Storage_FileSystem", "Win32_UI_Shell" ] } [target.'cfg(target_os = "macos")'.dependencies] -crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] } +crossterm = { workspace = true }