Skip to content

Commit b727aa6

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 b727aa6

File tree

13 files changed

+66
-54
lines changed

13 files changed

+66
-54
lines changed

Cargo.toml

Lines changed: 12 additions & 0 deletions
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

Lines changed: 6 additions & 6 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 4 additions & 4 deletions
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)