Skip to content

fix(cli): spell date and sequence strategies as configured in JSON output - #1293

Merged
BryanFRD merged 1 commit into
mainfrom
fix/strategy-names-kebab
Oct 7, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
fix/strategy-names-kebab

Conversation

@BryanFRD

@BryanFRD BryanFRD commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Closes #1292

strategy_label (which feeds bump_type in check --json and release --json) and the strategy field of why --json built the name from Debug lowercased, so a calver-short-seq package reported calvershortseq, a value the config rejects. Both now use VersioningStrategy's Display from #1259, so they print calver-short, calver-seq and calver-short-seq.

This changes JSON values that scripts may match on, which is why #1259 left it out. It ships as a fix, not a major: the old spelling was never valid configuration and no documentation listed it. calver, sequential, the semver bump types and FERRFLOW_BUMP_TYPE (which comes from BumpType, not this label) are unchanged.

A new test pins strategy_label for a hyphenated strategy, a semver bump and a forced version.

@ferrfleet ferrfleet Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct. VersioningStrategy's Display impl already matches the serde kebab-case spelling (strategy_display_matches_the_config_spelling checks it), so to_string() fixes calvershortseq -> calver-short-seq in both places. The new test covers the date/seq, semver and forced branches.

Nit: the other format!("{x:?}").to_lowercase() calls in api_check.rs and plan_interactive.rs use BumpType, which has single-word variants and its own Display. They aren't wrong, but to_string() would be more consistent there too.

@BryanFRD
BryanFRD merged commit b9e4cd2 into main Oct 7, 2026
32 checks passed
@BryanFRD
BryanFRD deleted the fix/strategy-names-kebab branch October 7, 2026 06:48
ferrflow Bot added a commit that referenced this pull request Oct 7, 2026
## [7.28.5] - 2026-10-07

### Bug Fixes

- fix(cli): spell date and sequence strategies as configured in JSON output (#1293)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cli): JSON output spells date and sequence strategies without their hyphens

1 participant