Skip to content

Commit

Permalink
Switch away from workspace-defined dependencies (#726)
Browse files Browse the repository at this point in the history
Both Dependabot and `cargo-edit`'s `cargo upgrade` don't seem
to handle dependencies being specified in the Cargo workspace
`Cargo.toml` and inherited by individual crates very well.

As such, this switches back to specifying those dependencies
explicitly in each crate. Dependabot always updates dependencies
across all crates, so they will still stay in sync.

This will unblock Dependabot being able to open a PR for libcnb 0.16.0.

See also:
heroku/buildpacks-jvm#614

I've left the local shared crate dependencies as workspace-defined,
since Dependabot or `cargo-edit` doesn't need to update those,
since they are path-only dependencies.

Lastly, the lists of dependencies have been sorted alphabetically.

GUS-W-14513796.
  • Loading branch information
edmorley authored Nov 17, 2023
1 parent f1bbcea commit 1af18a3
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 89 deletions.
14 changes: 0 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,8 @@ edition = "2021"
publish = false

[workspace.dependencies]
commons = { git = "https://github.com/heroku/buildpacks-ruby", branch = "main" }
heroku-nodejs-utils = { path = "./common/nodejs-utils" }
indoc = "2"
# libcnb has a much bigger impact on buildpack behaviour than any other dependencies,
# so it's pinned to an exact version to isolate it from lockfile refreshes.
libcnb-test = "=0.15.0"
libcnb = "=0.15.0"
libherokubuildpack = "=0.15.0"
opentelemetry = "0.20.0"
serde = "1"
serde_json = "1"
test_support = { path = "./test_support" }
tempfile = "3"
thiserror = "1"
toml = "0.8"
ureq = "2"

[profile.release]
strip = true
16 changes: 8 additions & 8 deletions buildpacks/nodejs-corepack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ publish.workspace = true

[dependencies]
heroku-nodejs-utils.workspace = true
libcnb.workspace = true
libherokubuildpack.workspace = true
opentelemetry.workspace = true
serde.workspace = true
thiserror.workspace = true
indoc.workspace = true
indoc = "2"
libcnb = "=0.15.0"
libherokubuildpack = "=0.15.0"
opentelemetry = "0.20.0"
serde = "1"
thiserror = "1"

[dev-dependencies]
libcnb-test.workspace = true
libcnb-test = "=0.15.0"
test_support.workspace = true
ureq.workspace = true
ureq = "2"
18 changes: 9 additions & 9 deletions buildpacks/nodejs-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ publish.workspace = true

[dependencies]
heroku-nodejs-utils.workspace = true
libcnb.workspace = true
libherokubuildpack.workspace = true
serde.workspace = true
tempfile.workspace = true
toml.workspace = true
thiserror.workspace = true
libcnb = "=0.15.0"
libherokubuildpack = "=0.15.0"
serde = "1"
tempfile = "3"
thiserror = "1"
toml = "0.8"

[dev-dependencies]
libcnb-test.workspace = true
libcnb-test = "=0.15.0"
serde_json = "1"
test_support.workspace = true
serde_json.workspace = true
ureq.workspace = true
ureq = "2"
18 changes: 9 additions & 9 deletions buildpacks/nodejs-function-invoker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ publish.workspace = true

[dependencies]
heroku-nodejs-utils.workspace = true
libcnb.workspace = true
libherokubuildpack.workspace = true
serde.workspace = true
thiserror.workspace = true
toml.workspace = true
libcnb = "=0.15.0"
libherokubuildpack = "=0.15.0"
serde = "1"
thiserror = "1"
toml = "0.8"

[dev-dependencies]
base64 = "0.21"
hex = "0.4"
libcnb-test.workspace = true
libcnb-test = "=0.15.0"
rand = "0.8"
serde_json.workspace = true
tempfile.workspace = true
serde_json = "1"
tempfile = "3"
test_support.workspace = true
ureq.workspace = true
ureq = "2"
18 changes: 9 additions & 9 deletions buildpacks/nodejs-npm-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ edition.workspace = true
publish.workspace = true

[dependencies]
commons.workspace = true
commons = { git = "https://github.com/heroku/buildpacks-ruby", branch = "main" }
fun_run = "0.1"
heroku-nodejs-utils.workspace = true
libcnb.workspace = true
libherokubuildpack.workspace = true
serde.workspace = true
indoc.workspace = true
tempfile.workspace = true
toml.workspace = true
indoc = "2"
libcnb = "=0.15.0"
libherokubuildpack = "=0.15.0"
serde = "1"
tempfile = "3"
toml = "0.8"

[dev-dependencies]
libcnb-test.workspace = true
serde_json.workspace = true
libcnb-test = "=0.15.0"
serde_json = "1"
test_support.workspace = true
18 changes: 9 additions & 9 deletions buildpacks/nodejs-npm-install/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ edition.workspace = true
publish.workspace = true

[dependencies]
commons.workspace = true
commons = { git = "https://github.com/heroku/buildpacks-ruby", branch = "main" }
fun_run = "0.1"
heroku-nodejs-utils.workspace = true
libcnb.workspace = true
libherokubuildpack.workspace = true
serde.workspace = true
indoc.workspace = true
toml.workspace = true
indoc = "2"
libcnb = "=0.15.0"
libherokubuildpack = "=0.15.0"
serde = "1"
toml = "0.8"

[dev-dependencies]
libcnb-test.workspace = true
serde_json.workspace = true
libcnb-test = "=0.15.0"
serde_json = "1"
test_support.workspace = true
ureq.workspace = true
ureq = "2"
14 changes: 7 additions & 7 deletions buildpacks/nodejs-pnpm-install/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ publish.workspace = true

[dependencies]
heroku-nodejs-utils.workspace = true
libcnb.workspace = true
libherokubuildpack.workspace = true
serde.workspace = true
indoc.workspace = true
toml.workspace = true
indoc = "2"
libcnb = "=0.15.0"
libherokubuildpack = "=0.15.0"
serde = "1"
toml = "0.8"

[dev-dependencies]
libcnb-test.workspace = true
libcnb-test = "=0.15.0"
test_support.workspace = true
ureq.workspace = true
ureq = "2"
16 changes: 8 additions & 8 deletions buildpacks/nodejs-yarn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ publish.workspace = true

[dependencies]
heroku-nodejs-utils.workspace = true
libcnb.workspace = true
libherokubuildpack.workspace = true
serde.workspace = true
thiserror.workspace = true
tempfile.workspace = true
toml.workspace = true
libcnb = "=0.15.0"
libherokubuildpack = "=0.15.0"
serde = "1"
tempfile = "3"
thiserror = "1"
toml = "0.8"

[dev-dependencies]
libcnb-test.workspace = true
libcnb-test = "=0.15.0"
test_support.workspace = true
ureq.workspace = true
ureq = "2"
22 changes: 11 additions & 11 deletions common/nodejs-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ publish.workspace = true
[dependencies]
anyhow = "1"
chrono = { version = "0.4", features = ["serde"] }
commons.workspace = true
indoc.workspace = true
commons = { git = "https://github.com/heroku/buildpacks-ruby", branch = "main" }
indoc = "2"
node-semver = "2"
opentelemetry = "0.20.0"
opentelemetry_sdk = { version = "0.20.0", features = ["trace"] }
opentelemetry-stdout = { version = "0.1.0", features = ["trace"] }
regex = "1"
serde = { workspace = true, features = ['derive'] }
serde_json.workspace = true
serde = { version = "1", features = ['derive'] }
serde_json = "1"
serde-xml-rs = "0.6"
thiserror.workspace = true
toml.workspace = true
ureq = { workspace = true, features = ["json"] }
thiserror = "1"
toml = "0.8"
ureq = { version = "2", features = ["json"] }
url = "2"
opentelemetry.workspace = true
opentelemetry-stdout = { version = "0.1.0", features = ["trace"] }
opentelemetry_sdk = { version = "0.20.0", features = ["trace"] }

[dev-dependencies]
tempfile.workspace = true
tempfile = "3"
10 changes: 5 additions & 5 deletions test_support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ edition.workspace = true
publish.workspace = true

[dependencies]
libcnb.workspace = true
libcnb-test.workspace = true
serde_json.workspace = true
tempfile.workspace = true
ureq.workspace = true
libcnb = "=0.15.0"
libcnb-test = "=0.15.0"
serde_json = "1"
tempfile = "3"
ureq = "2"

0 comments on commit 1af18a3

Please sign in to comment.