-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Summary
PR #168 fails markdown linting because CHANGELOG.md lacks a version entry, causing release-please to mangle the file structure.
Root Cause
When release-please's updateContent() method runs on a CHANGELOG.md that has no version entry matching its regex ('\n###? v?[0-9[]'), it takes the "no version found" code path which:
- Prepends
# Changelog\nheader - Adds the new changelog entry
- Calls
adjustHeaders()on all existing content (including frontmatter) - Appends the adjusted content at the end of the file
This results in the YAML frontmatter being pushed to the bottom of the file, causing these markdown lint failures:
- MD003:
---misinterpreted as setext heading style - MD012: Multiple consecutive blank lines
- MD022: Headings not surrounded by blank lines
- MD013: Line too long (description field)
Solution
Seed CHANGELOG.md with a ## 0.0.0 (Initial) placeholder version entry. This triggers release-please's "version found" path which uses:
const before = content.slice(0, lastEntryIndex);This preserves everything before the first version header, including YAML frontmatter.
Affected PR
- chore(main): release hve-core 1.1.0 #168 (release-please generated PR for v1.1.0)
References
- release-please changelog.ts -
updateContent()algorithm
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation