mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-20 09:09:35 +02:00
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) <noreply@anthropic.com>
This commit is contained in:
1 parent
d18deed51d
commit
02ea9251f8
1 file changed
+4
-2
@@ -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', () => {
|
||||
|
||||
Reference in new issue
Block a user