From 02ea9251f8e4861c313cef0b9183abf6b567835c Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Fri, 16 Oct 2026 01:27:26 +0200 Subject: [PATCH] fix(#618): keep the release commit green when a release has no bold lead-ins The shipped-json test asserted at least one highlight. Many releases are written without bold lead-ins (1.32.1, 1.29.1 and 1.24.7 here, and every changesets-bot release whose changesets are plain sentences, this PR's own changeset included), and the generator handles that on purpose: it warns and writes an empty list, and the client then stays quiet. Running `npm run version-packages` in a scratch copy with only this PR's changeset produced `{"version":"1.42.0","highlights":[]}` and turned the gate red on exactly the release commit. The version check, which is what keeps a hand bump from shipping the previous release's notes, stays. Co-Authored-By: Claude Opus 5.5 (1M context) --- test/whats-new.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/whats-new.test.ts b/test/whats-new.test.ts index 95c4ba84..435de7cb 100644 --- a/test/whats-new.test.ts +++ b/test/whats-new.test.ts @@ -54,11 +54,13 @@ describe('whats-new extraction', () => { }); describe('shipped whats-new.json', () => { - it('matches the package version and has highlights, so the release announces itself', () => { + it("matches the package version, so a release cannot ship the previous release's notes", () => { const pkg = JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf8')); const notes = JSON.parse(readFileSync(resolve(root, 'src/web/public/whats-new.json'), 'utf8')); expect(notes.version).toBe(pkg.version); - expect(notes.highlights.length).toBeGreaterThan(0); + // A release written without bold lead-ins legitimately has none (the client then stays + // quiet), so an empty list must not turn the release commit's CI red. + expect(Array.isArray(notes.highlights)).toBe(true); }); it('is regenerated by the release script and consumed once per version by the client', () => {