From 07f5accc2e2a6a41e85bf2de7d2ddabe98c2af8e Mon Sep 17 00:00:00 2001 From: Yonas Date: Mon, 22 Dec 2025 14:46:03 -0500 Subject: [PATCH 1/2] refactor: Use workspaces in Cargo.toml. --- Cargo.toml | 25 +++++++++++++++++++++++++ backpack/cli/Cargo.toml | 20 +++++++++----------- backpack/e2e/Cargo.toml | 8 +++----- backpack/lib/Cargo.toml | 30 ++++++++++++++---------------- 4 files changed, 51 insertions(+), 32 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1950e60..ffd4553 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,3 +5,28 @@ members = ["backpack/cli", "backpack/lib", "backpack/e2e", "xtask"] resolver = "2" default-members = ["backpack/cli"] + +[workspace.package] +edition = "2024" +license = "MIT" +repository = "https://github.com/yonasBSD/github-rs" + +[workspace.dependencies] +tokio = { version = "1.48.0", features = ["full", "macros"] } +clap = { version = "4", features = ["derive"] } +tracing = { version = "0.1.44", features = ["log"] } +tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] } +terminal-banner = { version = "0.4.1", features = ["color"] } +test-log = { version = "0.2.19", features = ["trace", "color"] } + +# crates used only by lib but still common enough to centralize +colored = "3.0.0" +which = "8.0.0" +config = "0.15.19" +xdg = "3.0.0" +reqwest = { version = "0.12.27", default-features = false, features = ["blocking", "hickory-dns", "json", "rustls-tls"] } +env_logger = "0.11.8" +serde_json5 = "0.2.1" + +# external git dependency +octocrab = { version = "*", git = "https://github.com/yonasBSD/octocrab", branch = "yonasBSD" } diff --git a/backpack/cli/Cargo.toml b/backpack/cli/Cargo.toml index 50b39a9..5593856 100644 --- a/backpack/cli/Cargo.toml +++ b/backpack/cli/Cargo.toml @@ -5,18 +5,19 @@ name = "github-rs" version = "0.1.0" edition = "2024" -license = "MIT" -repository = "https://github.com/yonasBSD/github-rs" [dependencies] -github-rs-lib = { package = "github-rs-lib", path = "../lib" } -tokio = { version = "1.48.0", features = ["full", "macros"] } -clap = { version = "*", features = ["derive"] } -tracing = { version = "0.1.44", features = ["log"] } -tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] } -terminal-banner = { version = "0.4.1", features = ["color"] } +github-rs-lib = { path = "../lib" } +tokio.workspace = true +clap.workspace = true +tracing.workspace = true +tracing-subscriber.workspace = true +terminal-banner.workspace = true console-subscriber = "0.5.0" +[dev-dependencies] +test-log.workspace = true + [[bin]] name = "github-rs" path = "src/main.rs" @@ -24,9 +25,6 @@ path = "src/main.rs" [features] coverage = [] -[dev-dependencies] -test-log = { version = "0.2.19", features = ["trace", "color"] } - [package.metadata.binstall.signing] algorithm = "minisign" pubkey = "RWS6/A1iiYtBjU101ofgB5ZBUq+erhj0pAF06delVbHPUiDee7PQvIML" diff --git a/backpack/e2e/Cargo.toml b/backpack/e2e/Cargo.toml index 2f66eed..2de30b2 100644 --- a/backpack/e2e/Cargo.toml +++ b/backpack/e2e/Cargo.toml @@ -5,15 +5,13 @@ name = "github-rs-e2e" version = "0.1.0" edition = "2024" -license = "MIT" -repository = "https://github.com/yonasBSD/github-rs" [dev-dependencies] -github-rs-lib = { package = "github-rs-lib", path = "../lib" } +github-rs-lib = { path = "../lib" } cucumber = { version = "0.22.0", features = ["libtest", "output-json", "output-junit", "timestamps", "tracing"] } -tokio = { version = "1.48.0", features = ["full", "macros"] } +tokio.workspace = true [[test]] name = "token" -harness = false # allows Cucumber to print output instead of libtest +harness = false path = "tests/token/main.rs" diff --git a/backpack/lib/Cargo.toml b/backpack/lib/Cargo.toml index 58a1b02..5292ef4 100644 --- a/backpack/lib/Cargo.toml +++ b/backpack/lib/Cargo.toml @@ -5,26 +5,24 @@ name = "github-rs-lib" version = "0.1.0" edition = "2024" -license = "MIT" -repository = "https://github.com/yonasBSD/github-rs" [features] coverage = [] [dependencies] -octocrab = { version = "*", git = "https://github.com/yonasBSD/octocrab", branch = "yonasBSD" } -tokio = { version = "1.48.0", features = ["full", "macros"] } -clap = { version = "*", features = ["derive"] } -colored = "3.0.0" -which = "8.0.0" -config = "0.15.19" -xdg = "3.0.0" -reqwest = { version = "0.12.27", default-features = false, features = ["blocking", "hickory-dns", "json", "rustls-tls"] } -env_logger = "0.11.8" -tracing = { version = "0.1.44", features = ["log"] } -tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] } -terminal-banner = { version = "0.4.1", features = ["color"] } -serde_json5 = "0.2.1" +octocrab.workspace = true +tokio.workspace = true +clap.workspace = true +colored.workspace = true +which.workspace = true +config.workspace = true +xdg.workspace = true +reqwest.workspace = true +env_logger.workspace = true +tracing.workspace = true +tracing-subscriber.workspace = true +terminal-banner.workspace = true +serde_json5.workspace = true [dev-dependencies] -test-log = { version = "0.2.19", features = ["trace", "color"] } +test-log.workspace = true From 976bb53b5aedeafa03b55121df51813a6ef7aa41 Mon Sep 17 00:00:00 2001 From: Yonas Date: Mon, 22 Dec 2025 15:10:10 -0500 Subject: [PATCH 2/2] fix: Add MIT license to crates. --- backpack/cli/Cargo.toml | 1 + backpack/e2e/Cargo.toml | 1 + backpack/lib/Cargo.toml | 1 + 3 files changed, 3 insertions(+) diff --git a/backpack/cli/Cargo.toml b/backpack/cli/Cargo.toml index 5593856..b633ae3 100644 --- a/backpack/cli/Cargo.toml +++ b/backpack/cli/Cargo.toml @@ -4,6 +4,7 @@ [package] name = "github-rs" version = "0.1.0" +license = "MIT" edition = "2024" [dependencies] diff --git a/backpack/e2e/Cargo.toml b/backpack/e2e/Cargo.toml index 2de30b2..93e917f 100644 --- a/backpack/e2e/Cargo.toml +++ b/backpack/e2e/Cargo.toml @@ -4,6 +4,7 @@ [package] name = "github-rs-e2e" version = "0.1.0" +license = "MIT" edition = "2024" [dev-dependencies] diff --git a/backpack/lib/Cargo.toml b/backpack/lib/Cargo.toml index 5292ef4..2e4fe7e 100644 --- a/backpack/lib/Cargo.toml +++ b/backpack/lib/Cargo.toml @@ -4,6 +4,7 @@ [package] name = "github-rs-lib" version = "0.1.0" +license = "MIT" edition = "2024" [features]