Jonas Kruckenberg 2 年 前
コミット
19fff57191

+ 10 - 0
Cargo.toml

@@ -25,6 +25,16 @@ exclude = [
   "examples/workspace"
 ]
 
+[workspace.dependencies]
+serde = { version = "1.0", features = ["derive"] }
+serde_json = "1.0"
+anyhow = "1.0"
+glob = "0.3"
+tempfile = "3.3"
+thiserror = "1.0"
+brotli = { version = "3", default-features = false, features = [ "std" ] }
+url = { version = "2.3", features = [ "serde" ] }
+
 # default to small, optimized workspace release binaries
 [profile.release]
 panic = "abort"

+ 3 - 3
core/config-schema/Cargo.toml

@@ -7,7 +7,7 @@ publish = false
 [build-dependencies]
 tauri-utils = { path = "../tauri-utils", features = [ "schema" ] }
 schemars = { version = "0.8", features = [ "url", "preserve_order" ] }
-serde = { version = "1.0", features = [ "derive" ] }
-serde_json = "1.0"
+serde.workspace = true
+serde_json.workspace = true
 serde_with = "1.12"
-url = { version = "2.3", features = [ "serde" ] }
+url.workspace = true

+ 3 - 3
core/tauri-build/Cargo.toml

@@ -17,13 +17,13 @@ all-features = true
 rustdoc-args = [ "--cfg", "doc_cfg" ]
 
 [dependencies]
-anyhow = "1"
+anyhow.workspace = true
 quote = { version = "1", optional = true }
 tauri-codegen = { version = "2.0.0-alpha.4", path = "../tauri-codegen", optional = true }
 tauri-utils = { version = "2.0.0-alpha.4", path = "../tauri-utils", features = [ "build", "resources" ] }
 cargo_toml = "0.14"
-serde = "1"
-serde_json = "1"
+serde.workspace = true
+serde_json.workspace = true
 heck = "0.4"
 json-patch = "0.3"
 walkdir = "2"

+ 4 - 4
core/tauri-codegen/Cargo.toml

@@ -18,17 +18,17 @@ base64 = "0.21"
 proc-macro2 = "1"
 quote = "1"
 serde = { version = "1", features = [ "derive" ] }
-serde_json = "1"
+serde_json.workspace = true
 tauri-utils = { version = "2.0.0-alpha.4", path = "../tauri-utils", features = [ "build" ] }
-thiserror = "1"
+thiserror.workspace = true
 walkdir = "2"
-brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] }
+brotli = { workspace = true, optional = true }
 uuid = { version = "1", features = [ "v4" ] }
 semver = "1"
 ico = "0.3"
 png = "0.17"
 json-patch = "0.3"
-url = "2"
+url.workspace = true
 
 [target."cfg(target_os = \"macos\")".dependencies]
 plist = "1"

+ 4 - 4
core/tauri-runtime/Cargo.toml

@@ -23,16 +23,16 @@ targets = [
 ]
 
 [dependencies]
-serde = { version = "1.0", features = [ "derive" ] }
-serde_json = "1.0"
-thiserror = "1.0"
+serde.workspace = true
+serde_json.workspace = true
+thiserror.workspace = true
 tauri-utils = { version = "2.0.0-alpha.4", path = "../tauri-utils" }
 uuid = { version = "1", features = [ "v4" ] }
 http = "0.2.4"
 http-range = "0.1.4"
 raw-window-handle = "0.5"
 rand = "0.8"
-url = { version = "2" }
+url.workspace = true
 
 [target."cfg(windows)".dependencies]
 webview2-com = "0.22"

+ 5 - 5
core/tauri-utils/Cargo.toml

@@ -13,11 +13,11 @@ readme = "README.md"
 
 [dependencies]
 serde = { version = "1", features = [ "derive" ] }
-serde_json = "1"
-thiserror = "1"
+serde_json.workspace = true
+thiserror.workspace = true
 phf = { version = "0.10", features = [ "macros" ] }
-brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] }
-url = { version = "2", features = [ "serde" ] }
+brotli = { workspace = true, optional = true }
+url.workspace = true
 kuchiki = "0.8"
 html5ever = "0.25"
 proc-macro2 = { version = "1", optional = true }
@@ -31,7 +31,7 @@ ctor = "0.1"
 json5 = { version = "0.4", optional = true }
 toml = { version = "0.5", optional = true }
 json-patch = "0.3"
-glob = { version = "0.3", optional = true }
+glob = { workspace = true, optional = true }
 walkdir = { version = "2", optional = true }
 memchr = "2"
 semver = "1"

+ 9 - 9
core/tauri/Cargo.toml

@@ -35,14 +35,14 @@ targets = [
 ]
 
 [dependencies]
-serde_json = { version = "1.0", features = [ "raw_value" ] }
-serde = { version = "1.0", features = [ "derive" ] }
+serde_json = { workspace = true, features = [ "raw_value" ] }
+serde.workspace = true
 tokio = { version = "1", features = [ "rt", "rt-multi-thread", "sync", "fs", "io-util" ] }
 futures-util = "0.3"
 uuid = { version = "1", features = [ "v4" ] }
-url = { version = "2.3" }
-anyhow = "1.0"
-thiserror = "1.0"
+url.workspace = true
+anyhow.workspace = true
+thiserror.workspace = true
 once_cell = "1"
 tauri-runtime = { version = "0.13.0-alpha.4", path = "../tauri-runtime" }
 tauri-macros = { version = "2.0.0-alpha.4", path = "../tauri-macros" }
@@ -53,7 +53,7 @@ semver = { version = "1.0", features = [ "serde" ] }
 serde_repr = "0.1"
 state = "0.5"
 tar = "0.4.38"
-tempfile = "3"
+tempfile.workspace = true
 zip = { version = "0.6", default-features = false, optional = true }
 ignore = "0.4"
 flate2 = "1.0"
@@ -67,7 +67,7 @@ raw-window-handle = "0.5"
 minisign-verify = { version = "0.2", optional = true }
 time = { version = "0.3", features = [ "parsing", "formatting" ], optional = true }
 os_info = { version = "3", optional = true }
-glob = "0.3"
+glob.workspace = true
 data-url = { version = "0.2", optional = true }
 serialize-to-javascript = "=0.1.1"
 infer = { version = "0.9", optional = true }
@@ -115,8 +115,8 @@ mockito = "0.31"
 proptest = "1.0.0"
 quickcheck = "1.0.3"
 quickcheck_macros = "1.0.0"
-serde = { version = "1.0", features = [ "derive" ] }
-serde_json = "1.0"
+serde.workspace = true
+serde_json.workspace = true
 tauri = { path = ".", default-features = false, features = [ "wry" ] }
 tokio-test = "0.4.2"
 tokio = { version = "1", features = [ "full" ] }

+ 1 - 1
core/tests/app-updater/Cargo.toml

@@ -8,7 +8,7 @@ tauri-build = { path = "../../tauri-build", features = [] }
 
 [dependencies]
 serde = { version = "1", features = ["derive"] }
-serde_json = "1"
+serde_json.workspace = true
 tiny_http = "0.11"
 tauri = { path = "../../tauri", features = ["updater"] }
 time = { version = "0.3", features = ["formatting"] }

+ 1 - 1
core/tests/restart/Cargo.toml

@@ -9,4 +9,4 @@ edition = "2021"
 path = "../../tauri"
 
 [dev-dependencies]
-tempfile = "3"
+tempfile.workspace = true

+ 3 - 3
tooling/bench/Cargo.toml

@@ -13,9 +13,9 @@ repository = "https://github.com/tauri-apps/wry"
 [dependencies]
 anyhow = "1.0.40"
 time = { version = "0.3", features = ["formatting"] }
-tempfile = "3.2.0"
-serde_json = "1.0"
-serde = { version = "1.0", features = [ "derive" ] }
+tempfile.workspace = true
+serde_json.workspace = true
+serde.workspace = true
 
 [[bin]]
 name = "run_benchmark"

+ 2 - 2
tooling/bench/tests/cpu_intensive/src-tauri/Cargo.toml

@@ -9,8 +9,8 @@ rust-version = "1.64"
 tauri-build = { path = "../../../../../core/tauri-build", features = [ "codegen" ] }
 
 [dependencies]
-serde_json = "1.0"
-serde = { version = "1.0", features = [ "derive" ] }
+serde_json.workspace = true
+serde.workspace = true
 tauri = { path = "../../../../../core/tauri", features = [] }
 
 [features]

+ 2 - 2
tooling/bench/tests/files_transfer/src-tauri/Cargo.toml

@@ -9,8 +9,8 @@ rust-version = "1.64"
 tauri-build = { path = "../../../../../core/tauri-build", features = [ "codegen" ] }
 
 [dependencies]
-serde_json = "1.0"
-serde = { version = "1.0", features = [ "derive" ] }
+serde_json.workspace = true
+serde.workspace = true
 tauri = { path = "../../../../../core/tauri", features = ["fs-read-file"] }
 
 [features]

+ 2 - 2
tooling/bench/tests/helloworld/src-tauri/Cargo.toml

@@ -9,8 +9,8 @@ rust-version = "1.64"
 tauri-build = { path = "../../../../../core/tauri-build", features = [ "codegen" ] }
 
 [dependencies]
-serde_json = "1.0"
-serde = { version = "1.0", features = [ "derive" ] }
+serde_json.workspace = true
+serde.workspace = true
 tauri = { path = "../../../../../core/tauri", features = [] }
 
 [features]

+ 6 - 6
tooling/bundler/Cargo.toml

@@ -20,15 +20,15 @@ exclude = [ "CHANGELOG.md", "/target", "rustfmt.toml" ]
 tauri-utils = { version = "2.0.0-alpha.4", path = "../../core/tauri-utils", features = [ "resources" ] }
 image = "0.24.5"
 libflate = "1.2"
-anyhow = "1.0"
-thiserror = "1.0"
-serde_json = "1.0"
-serde = { version = "1.0", features = [ "derive" ] }
+anyhow.workspace = true
+thiserror.workspace = true = "1.0"
+serde_json.workspace = true
+serde.workspace = true
 strsim = "0.10.0"
 tar = "0.4.38"
 walkdir = "2"
 handlebars = "4.3"
-tempfile = "3.3.0"
+tempfile.workspace = true
 log = { version = "0.4.17", features = [ "kv_unstable" ] }
 dirs-next = "2.0"
 encoding_rs = "0.8"
@@ -44,7 +44,7 @@ zip = "0.6"
 uuid = { version = "1", features = [ "v4", "v5" ] }
 bitness = "0.4"
 winreg = "0.10"
-glob = "0.3"
+glob.workspace = true
 
 [target."cfg(target_os = \"macos\")".dependencies]
 icns = { package = "tauri-icns", version = "0.1" }

+ 5 - 5
tooling/cli/Cargo.toml

@@ -48,15 +48,15 @@ jsonrpsee = { version = "0.16", features = [ "server" ] }
 jsonrpsee-core = "0.16"
 jsonrpsee-client-transport = { version = "0.16", features = [ "ws" ] }
 jsonrpsee-ws-client = { version = "0.16", default-features = false }
-thiserror = "1"
+thiserror.workspace = true = "1"
 sublime_fuzzy = "0.7"
 clap = { version = "4.0", features = [ "derive" ] }
-anyhow = "1.0"
+anyhow.workspace = true
 tauri-bundler = { version = "2.0.0-alpha.4", path = "../bundler" }
 colored = "2.0"
 once_cell = "1"
-serde = { version = "1.0", features = [ "derive" ] }
-serde_json = "1.0"
+serde.workspace = true
+serde_json.workspace = true
 notify = "5.0"
 notify-debouncer-mini = "0.2"
 shared_child = "1.0"
@@ -78,7 +78,7 @@ unicode-width = "0.1"
 zeroize = "1.5"
 heck = { version = "0.4", features = [ "unicode" ] }
 dialoguer = "0.10"
-url = { version = "2.3", features = [ "serde" ] }
+url.workspace = true
 os_pipe = "1"
 ignore = "0.4"
 ctrlc = "3.2"

+ 1 - 1
tooling/cli/node/test/jest/fixtures/app/src-tauri/Cargo.toml

@@ -25,7 +25,7 @@ tauri-build = { path = "../../../../../../../../core/tauri-build", features = []
 
 [dependencies]
 serde_json = "1.0.91"
-serde = "1.0"
+serde.workspace = true
 serde_derive = "1.0"
 tauri = { path = "../../../../../../../../core/tauri", features = ["api-all"] }
 

+ 2 - 2
tooling/webdriver/Cargo.toml

@@ -14,12 +14,12 @@ edition = "2021"
 rust-version = "1.57"
 
 [dependencies]
-anyhow = "1"
+anyhow.workspace = true
 hyper = { version = "0.14", features = [ "client", "http1", "runtime", "server", "stream", "tcp" ] }
 futures = "0.3"
 pico-args = "0.4"
 serde = { version = "1", features = [ "derive" ] }
-serde_json = "1"
+serde_json.workspace = true
 tokio = { version = "1", features = [ "macros" ] }
 which = "4"