diff --git a/CHANGELOG.md b/CHANGELOG.md index 792222c9..7aa9faeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] + +## [0.20.0] - 2024-04-12 + ### Added - `libcnb`: @@ -276,7 +279,8 @@ version number. See the changelog below for other changes. - Remove support for legacy BOM. Remove `Launch::bom`, `Build::bom`, `bom::Bom`, `bom::Entry`. ([#489](https://github.com/heroku/libcnb.rs/pull/489)) -[unreleased]: https://github.com/heroku/libcnb.rs/compare/v0.19.0...HEAD +[unreleased]: https://github.com/heroku/libcnb.rs/compare/v0.20.0...HEAD +[0.20.0]: https://github.com/heroku/libcnb.rs/compare/v0.19.0...v0.20.0 [0.19.0]: https://github.com/heroku/libcnb.rs/compare/v0.18.0...v0.19.0 [0.18.0]: https://github.com/heroku/libcnb.rs/compare/v0.17.0...v0.18.0 [0.17.0]: https://github.com/heroku/libcnb.rs/compare/v0.16.0...v0.17.0 diff --git a/Cargo.toml b/Cargo.toml index a56220cf..f5db376d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ members = [ ] [workspace.package] -version = "0.19.0" +version = "0.20.0" rust-version = "1.76" edition = "2021" license = "BSD-3-Clause" @@ -38,10 +38,10 @@ missing_errors_doc = "allow" module_name_repetitions = "allow" [workspace.dependencies] -libcnb = { version = "=0.19.0", path = "libcnb" } -libcnb-common = { version = "=0.19.0", path = "libcnb-common" } -libcnb-data = { version = "=0.19.0", path = "libcnb-data" } -libcnb-package = { version = "=0.19.0", path = "libcnb-package" } -libcnb-proc-macros = { version = "=0.19.0", path = "libcnb-proc-macros" } -libcnb-test = { version = "=0.19.0", path = "libcnb-test" } -toml = { version = "0.8.10" } +libcnb = { version = "=0.20.0", path = "libcnb" } +libcnb-common = { version = "=0.20.0", path = "libcnb-common" } +libcnb-data = { version = "=0.20.0", path = "libcnb-data" } +libcnb-package = { version = "=0.20.0", path = "libcnb-package" } +libcnb-proc-macros = { version = "=0.20.0", path = "libcnb-proc-macros" } +libcnb-test = { version = "=0.20.0", path = "libcnb-test" } +toml = { version = "0.8.12" } diff --git a/examples/execd/Cargo.toml b/examples/execd/Cargo.toml index 09759239..bcac5001 100644 --- a/examples/execd/Cargo.toml +++ b/examples/execd/Cargo.toml @@ -7,8 +7,8 @@ rust-version.workspace = true workspace = true [dependencies] +fastrand = "2.0.2" libcnb.workspace = true -fastrand = "2.0.1" [dev-dependencies] libcnb-test.workspace = true diff --git a/libcnb-cargo/Cargo.toml b/libcnb-cargo/Cargo.toml index 611a6ef2..dc2df6d3 100644 --- a/libcnb-cargo/Cargo.toml +++ b/libcnb-cargo/Cargo.toml @@ -19,7 +19,7 @@ path = "src/main.rs" workspace = true [dependencies] -clap = { version = "4.5.1", default-features = false, features = [ +clap = { version = "4.5.4", default-features = false, features = [ "derive", "error-context", "help", @@ -29,8 +29,8 @@ clap = { version = "4.5.1", default-features = false, features = [ libcnb-data.workspace = true libcnb-package.workspace = true pathdiff = "0.2.1" -thiserror = "1.0.57" +thiserror = "1.0.58" [dev-dependencies] -tempfile = "3.10.0" libcnb-common.workspace = true +tempfile = "3.10.1" diff --git a/libcnb-common/Cargo.toml b/libcnb-common/Cargo.toml index dd5f4949..bbfae22f 100644 --- a/libcnb-common/Cargo.toml +++ b/libcnb-common/Cargo.toml @@ -15,5 +15,5 @@ workspace = true [dependencies] serde = { version = "1.0.197", features = ["derive"] } -thiserror = "1.0.57" +thiserror = "1.0.58" toml.workspace = true diff --git a/libcnb-data/Cargo.toml b/libcnb-data/Cargo.toml index 2f90528a..503026d9 100644 --- a/libcnb-data/Cargo.toml +++ b/libcnb-data/Cargo.toml @@ -18,7 +18,7 @@ workspace = true fancy-regex = { version = "0.13.0", default-features = false, features = ["std"] } libcnb-proc-macros.workspace = true serde = { version = "1.0.197", features = ["derive"] } -thiserror = "1.0.57" +thiserror = "1.0.58" toml.workspace = true uriparse = "0.6.4" diff --git a/libcnb-data/src/buildpack/api.rs b/libcnb-data/src/buildpack/api.rs index 390850af..9d5a3cc4 100644 --- a/libcnb-data/src/buildpack/api.rs +++ b/libcnb-data/src/buildpack/api.rs @@ -1,5 +1,4 @@ use serde::Deserialize; -use std::convert::TryFrom; use std::fmt; use std::fmt::{Display, Formatter}; diff --git a/libcnb-data/src/buildpack/mod.rs b/libcnb-data/src/buildpack/mod.rs index 28845bf6..c65090ed 100644 --- a/libcnb-data/src/buildpack/mod.rs +++ b/libcnb-data/src/buildpack/mod.rs @@ -232,7 +232,6 @@ pub struct Group { #[cfg(test)] mod tests { use super::*; - use crate::sbom::SbomFormat; #[test] #[allow(clippy::too_many_lines)] diff --git a/libcnb-data/src/buildpack/stack.rs b/libcnb-data/src/buildpack/stack.rs index 012d6254..45bb381b 100644 --- a/libcnb-data/src/buildpack/stack.rs +++ b/libcnb-data/src/buildpack/stack.rs @@ -53,7 +53,7 @@ id = "*" toml::from_str::(toml_str), Ok(Stack { id: String::from("*"), - mixins: vec![], + mixins: Vec::new(), }), ); } diff --git a/libcnb-data/src/buildpack/version.rs b/libcnb-data/src/buildpack/version.rs index 9fa3ad4b..2043cda3 100644 --- a/libcnb-data/src/buildpack/version.rs +++ b/libcnb-data/src/buildpack/version.rs @@ -1,5 +1,4 @@ use serde::Deserialize; -use std::convert::TryFrom; use std::fmt; use std::fmt::{Display, Formatter}; diff --git a/libcnb-data/src/newtypes.rs b/libcnb-data/src/newtypes.rs index cf914c18..0b370d22 100644 --- a/libcnb-data/src/newtypes.rs +++ b/libcnb-data/src/newtypes.rs @@ -190,7 +190,6 @@ pub(crate) use libcnb_newtype; #[cfg(test)] mod tests { - use super::libcnb_newtype; use serde_test::{assert_de_tokens, assert_de_tokens_error, Token}; libcnb_newtype!( diff --git a/libcnb-package/Cargo.toml b/libcnb-package/Cargo.toml index a18e6a28..250af6e5 100644 --- a/libcnb-package/Cargo.toml +++ b/libcnb-package/Cargo.toml @@ -16,11 +16,11 @@ workspace = true [dependencies] cargo_metadata = "0.18.1" -ignore = "0.4" -indoc = "2.0.4" +ignore = "0.4.22" +indoc = "2.0.5" libcnb-common.workspace = true libcnb-data.workspace = true petgraph = { version = "0.6.4", default-features = false } -thiserror = "1.0.57" +thiserror = "1.0.58" uriparse = "0.6.4" -which = "6.0.0" +which = "6.0.1" diff --git a/libcnb-proc-macros/Cargo.toml b/libcnb-proc-macros/Cargo.toml index 2e29d588..9c12c8c1 100644 --- a/libcnb-proc-macros/Cargo.toml +++ b/libcnb-proc-macros/Cargo.toml @@ -19,5 +19,5 @@ workspace = true [dependencies] cargo_metadata = "0.18.1" fancy-regex = { version = "0.13.0", default-features = false, features = ["std"] } -quote = "1.0.35" -syn = { version = "2.0.50", features = ["full"] } +quote = "1.0.36" +syn = { version = "2.0.58", features = ["full"] } diff --git a/libcnb-test/Cargo.toml b/libcnb-test/Cargo.toml index f2ceea32..3b786003 100644 --- a/libcnb-test/Cargo.toml +++ b/libcnb-test/Cargo.toml @@ -15,15 +15,15 @@ include = ["src/**/*", "LICENSE", "README.md"] workspace = true [dependencies] -fastrand = "2.0.1" +fastrand = "2.0.2" fs_extra = "1.3.0" libcnb-common.workspace = true libcnb-data.workspace = true libcnb-package.workspace = true -tempfile = "3.10.0" -thiserror = "1.0.57" +tempfile = "3.10.1" +thiserror = "1.0.58" [dev-dependencies] -indoc = "2.0.4" -ureq = { version = "2.9.6", default-features = false } +indoc = "2.0.5" libcnb.workspace = true +ureq = { version = "2.9.6", default-features = false } diff --git a/libcnb-test/tests/integration_test.rs b/libcnb-test/tests/integration_test.rs index 9fe96f38..52a64f01 100644 --- a/libcnb-test/tests/integration_test.rs +++ b/libcnb-test/tests/integration_test.rs @@ -683,7 +683,7 @@ fn address_for_port_when_container_crashed() { .command(["echo 'some stdout'; echo 'some stderr' >&2; exit 1"]) .expose_port(TEST_PORT), |container| { - container_name = container.container_name.clone(); + container_name.clone_from(&container.container_name); // Wait for the container to actually exit, otherwise `address_for_port()` will succeed. thread::sleep(Duration::from_secs(1)); let _ = container.address_for_port(TEST_PORT); diff --git a/libcnb/Cargo.toml b/libcnb/Cargo.toml index 053afe86..9eb6ee4a 100644 --- a/libcnb/Cargo.toml +++ b/libcnb/Cargo.toml @@ -18,7 +18,7 @@ workspace = true trace = ["dep:opentelemetry", "dep:opentelemetry_sdk", "dep:opentelemetry-stdout"] [dependencies] -anyhow = { version = "1.0.80", optional = true } +anyhow = { version = "1.0.82", optional = true } cyclonedx-bom = { version = "0.5.0", optional = true } libcnb-common.workspace = true libcnb-data.workspace = true @@ -27,9 +27,9 @@ opentelemetry = { version = "0.21.0", optional = true } opentelemetry_sdk = { version = "0.21.2", optional = true } opentelemetry-stdout = { version = "0.2.0", optional = true, features = ["trace"] } serde = { version = "1.0.197", features = ["derive"] } -thiserror = "1.0.57" +thiserror = "1.0.58" toml.workspace = true [dev-dependencies] -tempfile = "3.10.0" -serde_json = "1.0.114" +serde_json = "1.0.115" +tempfile = "3.10.1" diff --git a/libcnb/src/layer/handling.rs b/libcnb/src/layer/handling.rs index fc7f2515..39538d43 100644 --- a/libcnb/src/layer/handling.rs +++ b/libcnb/src/layer/handling.rs @@ -462,14 +462,12 @@ fn read_layer>( #[cfg(test)] mod tests { use super::*; - use crate::data::layer_content_metadata::{LayerContentMetadata, LayerTypes}; + use crate::data::layer_content_metadata::LayerTypes; use crate::data::layer_name; - use crate::generic::GenericMetadata; use crate::layer_env::{ModificationBehavior, Scope}; use crate::read_toml_file; use serde::Deserialize; use std::ffi::OsString; - use std::fs; use tempfile::tempdir; diff --git a/libcnb/src/platform.rs b/libcnb/src/platform.rs index 378082b4..21567ff4 100644 --- a/libcnb/src/platform.rs +++ b/libcnb/src/platform.rs @@ -65,7 +65,6 @@ pub(crate) fn read_platform_env(platform_dir: impl AsRef) -> std::io::Resu mod tests { use super::*; use std::ffi::OsString; - use std::fs; #[test] fn read_platform_env_reads_correct_env_vars() { diff --git a/libcnb/src/target.rs b/libcnb/src/target.rs index 0cc0cbf3..0d102aa6 100644 --- a/libcnb/src/target.rs +++ b/libcnb/src/target.rs @@ -12,7 +12,6 @@ pub struct Target { /// `amd64` or `arm64`. /// /// CNB `lifecycle` sources this value from the build OCI image's [`architecture` property](https://github.com/opencontainers/image-spec/blob/main/config.md#properties). - /// `` pub arch: String, /// The variant of the specified CPU architecture. /// @@ -29,7 +28,7 @@ pub struct Target { pub distro_name: Option, /// The version of the operating system distribution. /// - /// For example: `18.02` or `3.19`. + /// For example: `22.04` or `3.19`. /// /// CNB `lifecycle` sources this value from the build OCI image's `io.buildpacks.base.distro.version` label. pub distro_version: Option, diff --git a/libcnb/src/tracing.rs b/libcnb/src/tracing.rs index 2d0eae80..6f66f76e 100644 --- a/libcnb/src/tracing.rs +++ b/libcnb/src/tracing.rs @@ -104,7 +104,7 @@ impl BuildpackTrace { } /// Add a named event to the underlying span. pub(crate) fn add_event(&mut self, name: &'static str) { - self.span.add_event(name, vec![]); + self.span.add_event(name, Vec::new()); } } @@ -139,8 +139,8 @@ mod tests { homepage: None, clear_env: false, description: None, - keywords: vec![], - licenses: vec![], + keywords: Vec::new(), + licenses: Vec::new(), sbom_formats: HashSet::new(), }; let telemetry_path = "/tmp/libcnb-telemetry/company_com_foo-bar.jsonl"; diff --git a/libherokubuildpack/Cargo.toml b/libherokubuildpack/Cargo.toml index f178aae2..b8343c75 100644 --- a/libherokubuildpack/Cargo.toml +++ b/libherokubuildpack/Cargo.toml @@ -43,11 +43,11 @@ pathdiff = { version = "0.2.1", optional = true } sha2 = { version = "0.10.8", optional = true } tar = { version = "0.4.40", default-features = false, optional = true } termcolor = { version = "1.4.1", optional = true } -thiserror = { version = "1.0.57", optional = true } +thiserror = { version = "1.0.58", optional = true } toml = { workspace = true, optional = true } ureq = { version = "2.9.6", default-features = false, features = ["tls"], optional = true } [dev-dependencies] -indoc = "2.0.4" +indoc = "2.0.5" libcnb-test = { workspace = true } -tempfile = "3.10.0" +tempfile = "3.10.1" diff --git a/libherokubuildpack/src/buildpack_output/util.rs b/libherokubuildpack/src/buildpack_output/util.rs index ba8154d3..8a147846 100644 --- a/libherokubuildpack/src/buildpack_output/util.rs +++ b/libherokubuildpack/src/buildpack_output/util.rs @@ -160,7 +160,7 @@ mod test { fn test_paragraph_inspect_write() { use std::io::Write; - let buffer: Vec = vec![]; + let buffer: Vec = Vec::new(); let mut inspect_write = ParagraphInspectWrite::new(buffer); assert!(!inspect_write.was_paragraph); diff --git a/libherokubuildpack/src/fs.rs b/libherokubuildpack/src/fs.rs index ada992cb..1a2bcf2f 100644 --- a/libherokubuildpack/src/fs.rs +++ b/libherokubuildpack/src/fs.rs @@ -41,7 +41,6 @@ pub fn move_directory_contents( #[cfg(test)] mod test { use std::collections::HashMap; - use std::fs; use std::path::PathBuf; use tempfile::tempdir;