Skip to content

feat: block layout for long/multiline/markdown changelog entries#122

Merged
theoephraim merged 1 commit into
mainfrom
claude/elastic-meninsky-61b0bc
Jun 18, 2026
Merged

feat: block layout for long/multiline/markdown changelog entries#122
theoephraim merged 1 commit into
mainfrom
claude/elastic-meninsky-61b0bc

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Problem

Both changelog formatters always jammed the entry description onto the same line as the metadata, e.g. - #50 (major) Thanks @Saeris! - <summary>. That reads fine for a short one-liner, but badly when the summary is markdown or long (see discordkit's CHANGELOG).

Change

Added a shared heuristic summaryNeedsBlockLayout() that switches an entry to a block layout — metadata on its own line, summary indented below — when the summary is any of:

  • multi-line (>1 non-empty line),
  • long (first line >120 chars), or
  • markdown-ish — contains a block-level construct (# heading, list item, > blockquote, ```/~~~ fence, table row), anchored to line starts so a stray | in prose doesn't trigger it.

Short single-line summaries stay inline exactly as before. The block path also now preserves internal blank lines so markdown paragraphs/lists render correctly. Applied to both the default and github formatters.

- *(minor)* Added a new flag to the CLI          ← short stays inline

- [#50](…) *(major)* Thanks [@Saeris](…)!         ← markdown/long/multiline → block
  ## New config option
  You can now set `foo` in your config

Thresholds live as single constants (INLINE_SUMMARY_MAX_LENGTH, MARKDOWN_BLOCK_RE) in changelog.ts.

Tests

  • Full suite: 309 pass / 0 fail.
  • Added inline / long / markdown / multi-paragraph cases for both formatters; updated the one existing test that asserted the old inline-multiline behavior.
  • oxlint + tsc --noEmit clean.

@github-actions

Copy link
Copy Markdown

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/bumpy 1.14.0 → 1.14.1

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

@theoephraim theoephraim merged commit 9207029 into main Jun 18, 2026
5 checks passed
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.

1 participant