Skip to content

fix(changelog): emit publishedAt in generated changelog frontmatter - #54

Merged
nibzard merged 1 commit into
mainfrom
fix/changelog-generator-publishedat
Jun 6, 2026
Merged

fix(changelog): emit publishedAt in generated changelog frontmatter#54
nibzard merged 1 commit into
mainfrom
fix/changelog-generator-publishedat

Conversation

@nibzard

@nibzard nibzard commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Problem

scripts/generate-changelog-draft.ts never wrote a publishedAt field. lib/source.ts derives the sidebar NEW badge from publishedAt within a 10-day window (ENABLE_GIT_NEW_DETECTION is off), so every auto-generated changelog landed without the badge until someone added the date by hand — as just happened for #28.

Fix

buildMdxDocument now takes a publishedAt arg and emits it after imageAlt, matching the convention in #27/#26. The value is windowSelection.until.slice(0, 10) — the same date already used to build the branch name, so frontmatter and branch stay consistent.

Verified: only one caller, types line up, Biome clean.

The generator never wrote a publishedAt field, so every auto-generated
changelog landed without the sidebar NEW badge (lib/source.ts derives the
badge from publishedAt within a 10-day window). Set it to the window's
upper-bound date, matching the date label already used for the branch name.
@nibzard
nibzard merged commit 73f3727 into main Jun 6, 2026
1 of 2 checks passed
@nibzard
nibzard deleted the fix/changelog-generator-publishedat branch June 6, 2026 07:28
@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Building Building Preview, Comment Jun 6, 2026 7:28am

Request Review

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