Skip to content

Commit 89768e4

Browse files
committed
Updates dependencies to use Cargo workspace
- Updates any common dependencies across the workspace to use the cargo workspaces dependency feature. - Also uses the workspace rust edition feature. Signed-off-by: Jess Bowers <[email protected]>
1 parent a42555d commit 89768e4

File tree

13 files changed

+66
-54
lines changed

13 files changed

+66
-54
lines changed

Cargo.toml

+12
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
1+
[workspace.package]
2+
version = "0.4.1"
3+
edition = "2018"
4+
authors = ["Ulysse Carion <[email protected]>"]
5+
16
[workspace]
27
members = ["crates/*"]
8+
9+
[workspace.dependencies]
10+
jtd = "0.2.1"
11+
serde_json = "1.0"
12+
lazy_static = "1.4.0"
13+
jtd-codegen = { path = "./crates/core" }
14+
jtd_codegen_test = { path = "./crates/test" }

crates/cli/Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
22
name = "jtd_codegen_cli"
3-
version = "0.4.1"
4-
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
3+
version.workspace = true
4+
edition.workspace = true
5+
authors.workspace = true
66

77
[[bin]]
88
name = "jtd-codegen"
99
path = "src/main.rs"
1010

1111
[dependencies]
12-
jtd-codegen = { path = "../core" }
12+
jtd-codegen.workspace = true
1313
jtd_codegen_target_csharp_system_text = { path = "../target_csharp_system_text" }
1414
jtd_codegen_target_go = { path = "../target_go" }
1515
jtd_codegen_target_java_jackson = { path = "../target_java_jackson" }
@@ -19,8 +19,8 @@ jtd_codegen_target_ruby_sig = { path = "../target_ruby_sig" }
1919
jtd_codegen_target_rust = { path = "../target_rust" }
2020
jtd_codegen_target_typescript = { path = "../target_typescript" }
2121
serde = "1.0"
22-
serde_json = "1.0"
23-
jtd = "0.2.1"
22+
serde_json.workspace = true
23+
jtd.workspace = true
2424
clap = { version = "2.33.3", features = ["yaml"] }
2525
colored = "2.0.0"
2626
anyhow = "1.0"

crates/core/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
name = "jtd-codegen"
33
version = "0.1.0"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66
description = "A framework for generating code from JSON Typedef schemas"
77
license = "MIT"
88

99
[dependencies]
1010
thiserror = "1.0.22"
1111
teeter_inflector = { version = "0.11.4", package = "Inflector" }
12-
jtd = "0.2.1"
13-
serde_json = "1.0"
12+
jtd.workspace = true
13+
serde_json.workspace = true
1414
textwrap = "0.13"

crates/target_csharp_system_text/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
name = "jtd_codegen_target_csharp_system_text"
33
version = "0.2.1"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
8-
jtd-codegen = { path = "../core" }
9-
lazy_static = "1.4.0"
10-
serde_json = "1.0"
8+
jtd-codegen.workspace = true
9+
lazy_static.workspace = true
10+
serde_json.workspace = true
1111

1212
[dev-dependencies]
13-
jtd_codegen_test = { path = "../test" }
13+
jtd_codegen_test.workspace = true

crates/target_go/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
name = "jtd_codegen_target_go"
33
version = "0.2.1"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
8-
jtd-codegen = { path = "../core" }
9-
lazy_static = "1.4.0"
10-
serde_json = "1.0"
8+
jtd-codegen.workspace = true
9+
lazy_static.workspace = true
10+
serde_json.workspace = true
1111

1212
[dev-dependencies]
13-
jtd_codegen_test = { path = "../test" }
13+
jtd_codegen_test.workspace = true

crates/target_java_jackson/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
name = "jtd_codegen_target_java_jackson"
33
version = "0.2.1"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
8-
jtd-codegen = { path = "../core" }
9-
lazy_static = "1.4.0"
8+
jtd-codegen.workspace = true
9+
lazy_static.workspace = true
1010
askama = "0.8"
11-
serde_json = "1.0"
11+
serde_json.workspace = true
1212

1313
[dev-dependencies]
14-
jtd_codegen_test = { path = "../test" }
14+
jtd_codegen_test.workspace = true

crates/target_python/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
name = "jtd_codegen_target_python"
33
version = "0.3.1"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
8-
jtd-codegen = { path = "../core" }
9-
lazy_static = "1.4.0"
10-
serde_json = "1.0"
8+
jtd-codegen.workspace = true
9+
lazy_static.workspace = true
10+
serde_json.workspace = true
1111

1212
[dev-dependencies]
13-
jtd_codegen_test = { path = "../test" }
13+
jtd_codegen_test.workspace = true

crates/target_ruby/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
name = "jtd_codegen_target_ruby"
33
version = "0.1.1"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
8-
jtd-codegen = { path = "../core" }
9-
lazy_static = "1.4.0"
10-
serde_json = "1.0"
8+
jtd-codegen.workspace = true
9+
lazy_static.workspace = true
10+
serde_json.workspace = true
1111

1212
[dev-dependencies]
13-
jtd_codegen_test = { path = "../test" }
13+
jtd_codegen_test.workspace = true

crates/target_ruby_sig/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
name = "jtd_codegen_target_ruby_sig"
33
version = "0.1.1"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
8-
jtd-codegen = { path = "../core" }
9-
lazy_static = "1.4.0"
10-
serde_json = "1.0"
8+
jtd-codegen.workspace = true
9+
lazy_static.workspace = true
10+
serde_json.workspace = true
1111

1212
[dev-dependencies]
13-
jtd_codegen_test = { path = "../test" }
13+
jtd_codegen_test.workspace = true

crates/target_rust/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
name = "jtd_codegen_target_rust"
33
version = "0.2.1"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
8-
jtd-codegen = { path = "../core" }
9-
lazy_static = "1.4.0"
10-
serde_json = "1.0"
8+
jtd-codegen.workspace = true
9+
lazy_static.workspace = true
10+
serde_json.workspace = true
1111

1212
[dev-dependencies]
13-
jtd_codegen_test = { path = "../test" }
13+
jtd_codegen_test.workspace = true

crates/target_rust/docker/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "jtd_e2e_test"
33
version = "0.1.0"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
88
chrono = { version = "0.4", features = ["serde"] }

crates/target_typescript/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
name = "jtd_codegen_target_typescript"
33
version = "0.2.1"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
8-
jtd-codegen = { path = "../core" }
9-
lazy_static = "1.4.0"
10-
serde_json = "1.0"
8+
jtd-codegen.workspace = true
9+
lazy_static.workspace = true
10+
serde_json.workspace = true
1111
regex = "1"
1212

1313
[dev-dependencies]
14-
jtd_codegen_test = { path = "../test" }
14+
jtd_codegen_test.workspace = true

crates/test/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
name = "jtd_codegen_test"
33
version = "0.1.0"
44
authors = ["Ulysse Carion <[email protected]>"]
5-
edition = "2018"
5+
edition.workspace = true
66

77
[dependencies]
8-
jtd-codegen = { path = "../core" }
9-
jtd = "0.2.1"
10-
serde_json = "1.0"
8+
jtd-codegen.workspace = true
9+
jtd.workspace = true
10+
serde_json.workspace = true
1111
tempfile = "3"
1212
jtd-fuzz = "0.1.21"
1313
rand = "0.7"

0 commit comments

Comments
 (0)