From 2780bedd1402d91c1b38fc566ff0cdb1b21796ab Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Wed, 25 Sep 2024 11:40:15 +0800 Subject: [PATCH] Update to use workspace.dependencies --- Cargo.toml | 49 ++++++++++++++++++++++++++++++++------- crates/cli/Cargo.toml | 8 +++---- crates/extract/Cargo.toml | 24 +++++++++---------- crates/macro/Cargo.toml | 20 ++++++++-------- crates/support/Cargo.toml | 30 ++++++++++++------------ 5 files changed, 81 insertions(+), 50 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 84b91f2..0b64683 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,21 +18,52 @@ readme = "README.md" repository = "https://github.com/longbridgeapp/rust-i18n" version = "3.1.2" -[dependencies] +[workspace.dependencies] +anyhow = "1" +arc-swap = "1.6.0" +base62 = "2.0.2" +clap = { version = "4.1.14", features = ["derive"] } +criterion = "0.5" +foo = { path = "examples/foo" } +glob = "0.3" +globwalk = "0.8.1" +ignore = "0.4" +indoc = "1" +itertools = "0.11.0" +lazy_static = "1" +normpath = "1.1.1" once_cell = "1.10.0" -rust-i18n-support = { path = "./crates/support", version = "3.1.2" } -rust-i18n-macro = { path = "./crates/macro", version = "3.1.2" } +proc-macro2 = { version = "1", features = ["span-locations"] } +quote = "1.0.2" +regex = "1" +rust-i18n = { path = "." } +rust-i18n-extract = { path = "./crates/extract", version = "3.1" } +rust-i18n-macro = { path = "./crates/macro", version = "3.1" } +rust-i18n-support = { path = "./crates/support", version = "3.1" } +serde = { version = "1", features = ["derive"] } +serde_json = "1" +serde_yml = "0.0.12" +siphasher = "1.0" smallvec = "1.12.0" +syn = { version = "2.0.18", features = ["full", "extra-traits"] } +toml = "0.8.8" +triomphe = { version = "0.1.11", features = ["arc-swap"] } + +[dependencies] +once_cell.workspace = true +rust-i18n-support.workspace = true +rust-i18n-macro.workspace = true +smallvec.workspace = true [dev-dependencies] -foo = { path = "examples/foo" } -criterion = "0.5" -lazy_static = "1" -serde_yml = "0.0.11" +foo.workspace = true +criterion.workspace = true +lazy_static.workspace = true +serde_yml.workspace = true [build-dependencies] -globwalk = "0.8.1" -regex = "1" +globwalk.workspace = true +regex.workspace = true [features] log-miss-tr = ["rust-i18n-macro/log-miss-tr"] diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 8142f64..5d03609 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -8,10 +8,10 @@ repository = "https://github.com/longbridgeapp/rust-i18n" version = "3.1.1" [dependencies] -anyhow = "1" -clap = { version = "4.1.14", features = ["derive"] } -rust-i18n-support = { path = "../support", version = "3.0.0" } -rust-i18n-extract = { path = "../extract", version = "3.0.0" } +anyhow.workspace = true +clap.workspace = true +rust-i18n-support.workspace = true +rust-i18n-extract.workspace = true [[bin]] name = "cargo-i18n" diff --git a/crates/extract/Cargo.toml b/crates/extract/Cargo.toml index afec66e..4fe41bf 100644 --- a/crates/extract/Cargo.toml +++ b/crates/extract/Cargo.toml @@ -10,17 +10,17 @@ version = "3.1.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1" -ignore = "0.4" -proc-macro2 = { version = "1", features = ["span-locations"] } -quote = "1" -regex = "1" -rust-i18n-support = { path = "../support", version = "3.0.0" } -serde = "1" -serde_json = "1" -serde_yml = "0.0.11" -syn = { version = "2.0.18", features = ["full"] } -toml = "0.7.4" +anyhow.workspace = true +ignore.workspace = true +proc-macro2.workspace = true +quote.workspace = true +regex.workspace = true +rust-i18n-support.workspace = true +serde.workspace = true +serde_json.workspace = true +serde_yml.workspace = true +syn.workspace = true +toml.workspace = true [dev-dependencies] -indoc = "1" +indoc.workspace = true diff --git a/crates/macro/Cargo.toml b/crates/macro/Cargo.toml index 774d068..9c06ba8 100644 --- a/crates/macro/Cargo.toml +++ b/crates/macro/Cargo.toml @@ -10,18 +10,18 @@ version = "3.1.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -glob = "0.3" -once_cell = "1.10.0" -proc-macro2 = "1.0" -quote = "1.0.2" -rust-i18n-support = { path = "../support", version = "3.0.0" } -serde = "1" -serde_json = "1" -serde_yml = "0.0.11" -syn = { version = "2.0.18", features = ["full", "extra-traits"] } +glob.workspace = true +once_cell.workspace = true +proc-macro2.workspace = true +quote.workspace = true +rust-i18n-support.workspace = true +serde.workspace = true +serde_json.workspace = true +serde_yml.workspace = true +syn.workspace = true [dev-dependencies] -rust-i18n = { path = "../.." } +rust-i18n.workspace = true [lib] proc-macro = true diff --git a/crates/support/Cargo.toml b/crates/support/Cargo.toml index d760aae..d8c5574 100644 --- a/crates/support/Cargo.toml +++ b/crates/support/Cargo.toml @@ -8,18 +8,18 @@ repository = "https://github.com/longbridgeapp/rust-i18n" version = "3.1.2" [dependencies] -arc-swap = "1.6.0" -base62 = "2.0.2" -globwalk = "0.8.1" -itertools = "0.11.0" -once_cell = "1.10.0" -proc-macro2 = "1.0" -serde = { version = "1", features = ["derive"] } -serde_json = "1" -serde_yml = "0.0.11" -siphasher = "1.0" -toml = "0.7.4" -normpath = "1.1.1" -lazy_static = "1" -regex = "1" -triomphe = { version = "0.1.11", features = ["arc-swap"] } +arc-swap.workspace = true +base62.workspace = true +globwalk.workspace = true +itertools.workspace = true +once_cell.workspace = true +proc-macro2.workspace = true +serde.workspace = true +serde_json.workspace = true +serde_yml.workspace = true +siphasher.workspace = true +toml.workspace = true +normpath.workspace = true +lazy_static.workspace = true +regex.workspace = true +triomphe.workspace = true