From 83462df56b32082caf5718cd1665346765c6ee32 Mon Sep 17 00:00:00 2001 From: Ossama Hjaji Date: Fri, 11 Aug 2023 23:46:06 +0200 Subject: [PATCH] use workspace inheritance (#1142) --- Cargo.toml | 37 +++++++++++++++++++++++++------------ ascii/Cargo.toml | 13 ++++++------- image/Cargo.toml | 17 ++++++++--------- manifest/Cargo.toml | 15 +++++++-------- 4 files changed, 46 insertions(+), 36 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9926f941..05b33535 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,27 +1,40 @@ [package] -authors = ["o2sh "] +authors.workspace = true +edition.workspace = true +version.workspace = true +license.workspace = true +repository.workspace = true categories = ["command-line-utilities"] description = "Command-line Git information tool" -edition = "2021" exclude = ["docs/vercel/*"] keywords = ["git", "cli", "terminal"] -license = "MIT" name = "onefetch" -readme = "README.md" -repository = "https://github.com/o2sh/onefetch" homepage = "https://onefetch.dev" -rust-version = "1.65.0" -version = "2.18.1" +rust-version = "1.70.0" [workspace] members = ["ascii", "image", "manifest"] -[dependencies] +[workspace.package] +authors = ["o2sh "] +edition = "2021" +license = "MIT" +version = "2.18.1" +repository = "https://github.com/o2sh/onefetch" + +[workspace.dependencies] +owo-colors = "3.5.0" anyhow = "1.0" +clap = { version = "4.3.19", features = ["derive"] } +image = "0.24.6" +strum = { version = "0.25.0", features = ["derive"] } + +[dependencies] +anyhow.workspace = true askalono = "0.4.6" byte-unit = "4.0.19" bytecount = "0.6.3" -clap = { version = "4.3.19", features = ["derive"] } +clap.workspace = true clap_complete = "4.3.2" crossbeam-channel = "0.5.8" gix-features-for-configuration-only = { package = "gix-features", version = "0.31.0", features = [ @@ -33,19 +46,19 @@ gix = { version = "0.49.1", default-features = false, features = [ git2 = { version = "0.17.2", default-features = false } globset = "0.4.13" human-panic = "1.1.5" -image = "0.24.6" +image.workspace = true num-format = "0.4.4" onefetch-ascii = { path = "ascii", version = "2.18.1" } onefetch-image = { path = "image", version = "2.18.1" } onefetch-manifest = { path = "manifest", version = "2.18.1" } -owo-colors = "3.5.0" +owo-colors.workspace = true regex = "1.9.3" serde = "1.0" serde_json = "1.0" serde_yaml = "0.9.25" # TODO With the new value parsers, we're really close to being able to eliminate # the strum dependency -strum = { version = "0.25.0", features = ["derive"] } +strum.workspace = true time = { version = "0.3.25", features = ["formatting"] } time-humanize = { version = "0.1.3", features = ["time"] } tokei = "12.1.2" diff --git a/ascii/Cargo.toml b/ascii/Cargo.toml index 5f625d7c..0f1135ab 100644 --- a/ascii/Cargo.toml +++ b/ascii/Cargo.toml @@ -1,12 +1,11 @@ [package] -authors = ["o2sh "] +authors.workspace = true +edition.workspace = true +version.workspace = true +license.workspace = true +repository.workspace = true name = "onefetch-ascii" description = "Display colorized ascii art to the terminal" -version = "2.18.1" -edition = "2021" -license = "MIT" -readme = "README.md" -repository = "https://github.com/o2sh/onefetch" [dependencies] -owo-colors = "3.5.0" +owo-colors.workspace = true diff --git a/image/Cargo.toml b/image/Cargo.toml index 0c47331c..fc35d6cc 100644 --- a/image/Cargo.toml +++ b/image/Cargo.toml @@ -1,17 +1,16 @@ [package] -authors = ["o2sh "] +authors.workspace = true +edition.workspace = true +version.workspace = true +license.workspace = true +repository.workspace = true name = "onefetch-image" description = "Display images in the terminal" -version = "2.18.1" -edition = "2021" -license = "MIT" -readme = "README.md" -repository = "https://github.com/o2sh/onefetch" [dependencies] -anyhow = "1.0" -clap = { version = "4.3.19", features = ["derive"] } -image = "0.24.6" +anyhow.workspace = true +clap.workspace = true +image.workspace = true [target.'cfg(not(windows))'.dependencies] color_quant = "1.1.0" diff --git a/manifest/Cargo.toml b/manifest/Cargo.toml index bbf111a3..cae1badc 100644 --- a/manifest/Cargo.toml +++ b/manifest/Cargo.toml @@ -1,15 +1,14 @@ [package] -authors = ["o2sh "] +authors.workspace = true +edition.workspace = true +version.workspace = true +license.workspace = true +repository.workspace = true name = "onefetch-manifest" description = "Detect and parse manifest files" -version = "2.18.1" -edition = "2021" -license = "MIT" -readme = "README.md" -repository = "https://github.com/o2sh/onefetch" [dependencies] -anyhow = "1.0" +anyhow.workspace = true cargo_toml = "0.15.3" npm-package-json = "0.1.3" -strum = { version = "0.25.0", features = ["derive"] } +strum.workspace = true