Skip to content

Commit

Permalink
Move common dependencies to the root cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton committed Sep 27, 2024
1 parent 2d1c687 commit ff29744
Show file tree
Hide file tree
Showing 17 changed files with 123 additions and 118 deletions.
24 changes: 24 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@ bitwarden-send = { path = "crates/bitwarden-send", version = "=1.0.0" }
bitwarden-sm = { path = "crates/bitwarden-sm", version = "=1.0.0" }
bitwarden-vault = { path = "crates/bitwarden-vault", version = "=1.0.0" }

# External crates that are expected to maintain a consistent version across all crates
chrono = { version = ">=0.4.26, <0.5", features = [
"clock",
"serde",
"std",
], default-features = false }
log = "0.4.20"
reqwest = { version = ">=0.12.5, <0.13", features = [
"json",
"multipart",
"http2",
], default-features = false }
schemars = { version = ">=0.8.9, <0.9", features = ["uuid1", "chrono"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"
serde_qs = ">=0.12.0, <0.14"
serde_repr = ">=0.1.12, <0.2"
thiserror = ">=1.0.40, <2.0"
uniffi = "=0.28.1"
uuid = { version = ">=1.3.3, <2.0", features = ["serde", "v4"] }
wasm-bindgen = { version = "0.2.91", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.41"


[workspace.lints.clippy]
unused_async = "deny"
unwrap_used = "deny"
Expand Down
16 changes: 10 additions & 6 deletions crates/bitwarden-api-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ license-file.workspace = true
keywords.workspace = true

[dependencies]
serde = { version = ">=1.0.163, <2", features = ["derive"] }
serde_with = { version = ">=3.8, <4", default-features = false, features = ["base64", "std", "macros"] }
serde_json = ">=1.0.96, <2"
serde_repr = ">=0.1.12, <0.2"
serde = { workspace = true }
serde_with = { version = ">=3.8, <4", default-features = false, features = [
"base64",
"std",
"macros",
] }
serde_json = { workspace = true }
serde_repr = { workspace = true }
url = ">=2.5, <3"
uuid = { version = ">=1.3.3, <2", features = ["serde", "v4"] }
reqwest = { version = ">=0.12.5, <0.13", features = ["json", "multipart", "http2"], default-features = false }
uuid = { workspace = true }
reqwest = { workspace = true }
16 changes: 10 additions & 6 deletions crates/bitwarden-api-identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ license-file.workspace = true
keywords.workspace = true

[dependencies]
serde = { version = ">=1.0.163, <2", features = ["derive"] }
serde_with = { version = ">=3.8, <4", default-features = false, features = ["base64", "std", "macros"] }
serde_json = ">=1.0.96, <2"
serde_repr = ">=0.1.12, <0.2"
serde = { workspace = true }
serde_with = { version = ">=3.8, <4", default-features = false, features = [
"base64",
"std",
"macros",
] }
serde_json = { workspace = true }
serde_repr = { workspace = true }
url = ">=2.5, <3"
uuid = { version = ">=1.3.3, <2", features = ["serde", "v4"] }
reqwest = { version = ">=0.12.5, <0.13", features = ["json", "multipart", "http2"], default-features = false }
uuid = { workspace = true }
reqwest = { workspace = true }
31 changes: 11 additions & 20 deletions crates/bitwarden-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,31 @@ base64 = ">=0.22.1, <0.23"
bitwarden-api-api = { workspace = true }
bitwarden-api-identity = { workspace = true }
bitwarden-crypto = { workspace = true }
chrono = { version = ">=0.4.26, <0.5", features = [
"clock",
"serde",
"std",
], default-features = false }
chrono = { workspace = true, features = ["std"] }
# We don't use this directly (it's used by rand), but we need it here to enable WASM support
getrandom = { version = ">=0.2.9, <0.3", features = ["js"] }
hmac = ">=0.12.1, <0.13"
log = ">=0.4.18, <0.5"
rand = ">=0.8.5, <0.9"
reqwest = { version = ">=0.12.5, <0.13", features = [
"http2",
"json",
], default-features = false }
schemars = { version = ">=0.8.9, <0.9", features = ["uuid1", "chrono"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"
serde_qs = ">=0.12.0, <0.14"
serde_repr = ">=0.1.12, <0.2"
reqwest = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_qs = { workspace = true }
serde_repr = { workspace = true }
sha1 = ">=0.10.5, <0.11"
sha2 = ">=0.10.6, <0.11"
thiserror = ">=1.0.40, <2.0"
uniffi = { version = "=0.28.1", optional = true, features = ["tokio"] }
uuid = { version = ">=1.3.3, <2.0", features = ["serde"] }
thiserror = { workspace = true }
uniffi = { workspace = true, optional = true, features = ["tokio"] }
uuid = { workspace = true }
validator = { version = "0.18.1", features = ["derive"] }
zeroize = { version = ">=1.7.0, <2.0", features = ["derive", "aarch64"] }
zxcvbn = { version = ">=3.0.1, <4.0", optional = true }

[target.'cfg(not(target_arch="wasm32"))'.dependencies]
# By default, we use rustls as the TLS stack and rust-platform-verifier to support user-installed root certificates
# The only exception is WASM, as it just uses the browsers/node fetch
reqwest = { version = ">=0.12.5, <0.13", features = [
"rustls-tls-manual-roots",
], default-features = false }
reqwest = { workspace = true, features = ["rustls-tls-manual-roots"] }
rustls-platform-verifier = "0.3.4"

[dev-dependencies]
Expand Down
12 changes: 6 additions & 6 deletions crates/bitwarden-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ pbkdf2 = { version = ">=0.12.1, <0.13", default-features = false }
rand = ">=0.8.5, <0.9"
rayon = ">=1.8.1, <2.0"
rsa = ">=0.9.2, <0.10"
schemars = { version = ">=0.8, <0.9", features = ["uuid1"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
schemars = { workspace = true }
serde = { workspace = true }
sha1 = ">=0.10.5, <0.11"
sha2 = ">=0.10.6, <0.11"
subtle = ">=2.5.0, <3.0"
thiserror = ">=1.0.40, <2.0"
uniffi = { version = "=0.28.1", optional = true }
uuid = { version = ">=1.3.3, <2.0", features = ["serde"] }
thiserror = { workspace = true }
uniffi = { workspace = true, optional = true }
uuid = { workspace = true }
zeroize = { version = ">=1.7.0, <2.0", features = ["derive", "aarch64"] }

[dev-dependencies]
criterion = "0.5.1"
rand_chacha = "0.3.1"
serde_json = ">=1.0.96, <2.0"
serde_json = { workspace = true }

[[bench]]
name = "default_allocator"
Expand Down
18 changes: 7 additions & 11 deletions crates/bitwarden-exporters/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,14 @@ base64 = ">=0.22.1, <0.23"
bitwarden-core = { workspace = true }
bitwarden-crypto = { workspace = true }
bitwarden-vault = { workspace = true }
chrono = { version = ">=0.4.26, <0.5", features = [
"clock",
"serde",
"std",
], default-features = false }
chrono = { workspace = true, features = ["std"] }
csv = "1.3.0"
schemars = { version = ">=0.8.9, <0.9", features = ["uuid1", "chrono"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"
thiserror = ">=1.0.40, <2.0"
uniffi = { version = "=0.28.1", optional = true }
uuid = { version = ">=1.3.3, <2.0", features = ["serde", "v4"] }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
uniffi = { workspace = true, optional = true }
uuid = { workspace = true }

[lints]
workspace = true
19 changes: 8 additions & 11 deletions crates/bitwarden-fido/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ base64 = ">=0.22.1, <0.23"
bitwarden-core = { workspace = true }
bitwarden-crypto = { workspace = true }
bitwarden-vault = { workspace = true }
chrono = { version = ">=0.4.26, <0.5", features = [
"clock",
"serde",
], default-features = false }
chrono = { workspace = true }
coset = { version = "0.3.7" }
itertools = "0.13.0"
log = ">=0.4.18, <0.5"
Expand All @@ -34,13 +31,13 @@ passkey = { git = "https://github.com/bitwarden/passkey-rs", rev = "ff757604cd7b
passkey-client = { git = "https://github.com/bitwarden/passkey-rs", rev = "ff757604cd7b4e8f321ed1616fef7e40e21ac5df", features = [
"android-asset-validation",
] }
reqwest = { version = ">=0.12.5, <0.13", default-features = false }
schemars = { version = "0.8.21", features = ["uuid1", "chrono"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"
thiserror = ">=1.0.40, <2.0"
uniffi = { version = "=0.28.1", optional = true }
uuid = { version = ">=1.3.3, <2.0", features = ["serde"] }
reqwest = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
uniffi = { workspace = true, optional = true }
uuid = { workspace = true }

[lints]
workspace = true
15 changes: 6 additions & 9 deletions crates/bitwarden-generators/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ uniffi = ["dep:uniffi"] # Uniffi bindings
bitwarden-core = { workspace = true, features = ["internal"] }
bitwarden-crypto = { workspace = true }
rand = ">=0.8.5, <0.9"
reqwest = { version = ">=0.12.5, <0.13", features = [
"http2",
"json",
], default-features = false }
schemars = { version = ">=0.8.9, <0.9", features = ["uuid1", "chrono"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"
thiserror = ">=1.0.40, <2.0"
uniffi = { version = "=0.28.1", optional = true }
reqwest = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
uniffi = { workspace = true, optional = true }

[dev-dependencies]
rand_chacha = "0.3.1"
Expand Down
6 changes: 3 additions & 3 deletions crates/bitwarden-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ secrets = ["bitwarden/secrets"] # Secrets manager API
[dependencies]
bitwarden = { workspace = true }
log = ">=0.4.18, <0.5"
schemars = ">=0.8.12, <0.9"
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/bitwarden-napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bitwarden-json = { path = "../bitwarden-json", version = "0.3.0", features = [
"secrets",
] }
env_logger = "0.11.1"
log = "0.4.20"
log = { workspace = true }
napi = { version = "2", features = ["async"] }
napi-derive = "2"

Expand Down
17 changes: 7 additions & 10 deletions crates/bitwarden-send/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,13 @@ base64 = ">=0.22.1, <0.23"
bitwarden-api-api = { workspace = true }
bitwarden-core = { workspace = true }
bitwarden-crypto = { workspace = true }
chrono = { version = ">=0.4.26, <0.5", features = [
"clock",
"serde",
], default-features = false }
schemars = { version = ">=0.8.9, <0.9", features = ["uuid1", "chrono"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_repr = ">=0.1.12, <0.2"
thiserror = ">=1.0.40, <2.0"
uniffi = { version = "=0.28.1", optional = true }
uuid = { version = ">=1.3.3, <2.0", features = ["serde"] }
chrono = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde_repr = { workspace = true }
thiserror = { workspace = true }
uniffi = { workspace = true, optional = true }
uuid = { workspace = true }
zeroize = { version = ">=1.7.0, <2.0" }

[lints]
Expand Down
15 changes: 6 additions & 9 deletions crates/bitwarden-sm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ keywords.workspace = true
bitwarden-api-api = { workspace = true }
bitwarden-core = { workspace = true }
bitwarden-crypto = { workspace = true }
chrono = { version = ">=0.4.26, <0.5", features = [
"clock",
"serde",
], default-features = false }
schemars = { version = ">=0.8.9, <0.9", features = ["uuid1", "chrono"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"
thiserror = ">=1.0.40, <2.0"
uuid = { version = ">=1.3.3, <2.0", features = ["serde"] }
chrono = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
uuid = { workspace = true }
validator = { version = "0.18.1", features = ["derive"] }

[dev-dependencies]
Expand Down
17 changes: 7 additions & 10 deletions crates/bitwarden-uniffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,13 @@ bitwarden-fido = { workspace = true, features = ["uniffi"] }
bitwarden-generators = { workspace = true, features = ["uniffi"] }
bitwarden-send = { workspace = true, features = ["uniffi"] }
bitwarden-vault = { workspace = true, features = ["uniffi"] }
chrono = { version = ">=0.4.26, <0.5", features = [
"serde",
"std",
], default-features = false }
log = "0.4.20"
chrono = { workspace = true, features = ["std"] }
log = { workspace = true }
env_logger = "0.11.1"
schemars = { version = ">=0.8, <0.9", optional = true }
thiserror = ">=1.0.40, <2.0"
uniffi = "=0.28.1"
uuid = ">=1.3.3, <2"
schemars = { workspace = true, optional = true }
thiserror = { workspace = true }
uniffi = { workspace = true }
uuid = { workspace = true }

[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.14"
Expand All @@ -50,7 +47,7 @@ rustls-platform-verifier = "0.3.4"
oslog = "0.2.0"

[build-dependencies]
uniffi = { version = "=0.28.1", features = ["build"] }
uniffi = { workspace = true, features = ["build"] }

[lints]
workspace = true
19 changes: 8 additions & 11 deletions crates/bitwarden-vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,19 @@ base64 = ">=0.22.1, <0.23"
bitwarden-api-api = { workspace = true }
bitwarden-core = { workspace = true, features = ["internal"] }
bitwarden-crypto = { workspace = true }
chrono = { version = ">=0.4.26, <0.5", features = [
"clock",
"serde",
], default-features = false }
chrono = { workspace = true }
rand = ">=0.8.5, <0.9"
hmac = ">=0.12.1, <0.13"
reqwest = { version = ">=0.12.5, <0.13", default-features = false }
schemars = { version = ">=0.8.9, <0.9", features = ["uuid1", "chrono"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"
serde_repr = ">=0.1.12, <0.2"
reqwest = { workspace = true }
schemars = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_repr = { workspace = true }
sha1 = ">=0.10.5, <0.11"
sha2 = ">=0.10.6, <0.11"
thiserror = ">=1.0.40, <2.0"
thiserror = { workspace = true }
uniffi = { version = "=0.28.1", optional = true }
uuid = { version = ">=1.3.3, <2.0", features = ["serde"] }
uuid = { workspace = true }

[dev-dependencies]
tokio = { version = "1.36.0", features = ["rt", "macros"] }
Expand Down
10 changes: 7 additions & 3 deletions crates/bitwarden/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ uniffi = [
"bitwarden-send/uniffi",
"bitwarden-vault/uniffi",
] # Uniffi bindings
secrets = ["bitwarden-core/secrets", "dep:bitwarden-sm", "dep:bitwarden-generators"] # Secrets manager API
secrets = [
"bitwarden-core/secrets",
"dep:bitwarden-sm",
"dep:bitwarden-generators",
] # Secrets manager API

[dependencies]
bitwarden-api-api = { workspace = true }
Expand All @@ -48,10 +52,10 @@ bitwarden-generators = { workspace = true, optional = true }
bitwarden-send = { workspace = true, optional = true }
bitwarden-sm = { workspace = true, optional = true }
bitwarden-vault = { workspace = true, optional = true }
thiserror = ">=1.0.40, <2.0"
thiserror = { workspace = true }

[dev-dependencies]
uuid = { version = ">=1.3.3, <2.0" }
uuid = { workspace = true }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/sdk-schemas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ bitwarden = { workspace = true }
bitwarden-json = { path = "../bitwarden-json" }
bitwarden-uniffi = { path = "../bitwarden-uniffi", optional = true }
itertools = "0.13.0"
schemars = { version = "0.8.16", features = ["preserve_order"] }
schemars = { workspace = true, features = ["preserve_order"] }
serde_json = "1.0.113"
Loading

0 comments on commit ff29744

Please sign in to comment.