From 2b033f513b4005291047272f76c39ef1ff479b45 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 17 Dec 2025 10:29:43 +0100 Subject: [PATCH 1/2] chore: remove unnecessary import Signed-off-by: squidfunk --- crates/mono-project/src/project/workspace.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/mono-project/src/project/workspace.rs b/crates/mono-project/src/project/workspace.rs index 61f3725..661fc3f 100644 --- a/crates/mono-project/src/project/workspace.rs +++ b/crates/mono-project/src/project/workspace.rs @@ -25,7 +25,7 @@ //! Workspace. -use std::collections::btree_map::{Values, ValuesMut}; +use std::collections::btree_map::Values; use std::collections::BTreeMap; use std::path::{Path, PathBuf}; From 1fb7cfe03850ec49463903534df4dd307d64772d Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 17 Dec 2025 10:39:13 +0100 Subject: [PATCH 2/2] fix: summary not written when changelog is empty Signed-off-by: squidfunk --- .../mono/src/cli/command/version/changelog.rs | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/crates/mono/src/cli/command/version/changelog.rs b/crates/mono/src/cli/command/version/changelog.rs index 6241899..d199118 100644 --- a/crates/mono/src/cli/command/version/changelog.rs +++ b/crates/mono/src/cli/command/version/changelog.rs @@ -27,6 +27,7 @@ use clap::Args; use semver::Version; +use std::borrow::Cow; use mono_changeset::Changeset; use mono_project::version::VersionExt; @@ -72,22 +73,19 @@ where // careful about line feeds, we collect everything before writing let mut queue = Vec::new(); if self.summary { - queue.push(changeset.summary()?); + queue.push(Cow::Borrowed(changeset.summary()?)); } - // Only write to standard out if the changelog is not empty, which can - // happen despite changes being present - this happens when changes do - // not touch published artifacts, as they solely improve on formatting, - // documentation, or the build setup. + // Generate changelog, and append to queue if it's not empty - we also + // need to support summary-only releases, i.e., pure version bumps let changelog = changeset.to_changelog(); if !changelog.is_empty() { - let value = changelog.to_string(); - queue.push(&value); + queue.push(Cow::Owned(changelog.to_string())); + } - // Got something to say - if !queue.is_empty() { - println!("{}", queue.join("\n\n")); - } + // Write everything to standard out + if !queue.is_empty() { + println!("{}", queue.join("\n\n")); } // No errors occurred