fix(notices): keep the release modal up across the whole 4.x line

The 4.0.0 notice was scoped to a 4.0.x window on the assumption that each
release would bring its own entry. 4.1.0 shipped without one, so the modal
switched itself off and nothing took its place: the thank-you notice it
replaced is retired below 4.0.0, leaving a 4.1 install with no notice at all.

Hold it open to the 5.0.0 boundary instead. What it introduces is the 4.x
line, which is still what somebody arriving on 4.1 or 4.2 is meeting for the
first time, and a later major gets its own entry the way this one did.
This commit is contained in:
Maurice
2026-08-29 13:14:30 +02:00
parent 88ebf89ab3
commit 061a3d91a0
2 changed files with 16 additions and 11 deletions
@@ -65,19 +65,21 @@ describe('registry integrity', () => {
}
});
it('the 4.0.0 release notice is confined to the 4.0.x line', () => {
it('the 4.0.0 release notice covers the whole 4.x line', () => {
const release = SYSTEM_NOTICES.find(n => n.id === 'release-4-0-0');
expect(release).toBeDefined();
// Its copy is about this release, so it must not greet somebody who skipped
// straight past it, and it must not run alongside the next release's notice.
// It must not greet somebody still on 3.x...
expect(isNoticeVersionActive(release!, '3.4.1')).toBe(false);
expect(isNoticeVersionActive(release!, '4.0.0')).toBe(true);
expect(isNoticeVersionActive(release!, '4.0.7')).toBe(true);
// The upper bound is exclusive, so every 4.0.x patch still gets it.
expect(isNoticeVersionActive(release!, '4.0.9')).toBe(true);
expect(isNoticeVersionActive(release!, '4.0.12')).toBe(true);
expect(isNoticeVersionActive(release!, '4.1.0')).toBe(false);
expect(isNoticeVersionActive(release!, '4.2.0')).toBe(false);
// ...and it stays up across the minors, so no 4.x install is left without a
// notice the way 4.1.0 was under the old per-release window.
expect(isNoticeVersionActive(release!, '4.1.0')).toBe(true);
expect(isNoticeVersionActive(release!, '4.2.0')).toBe(true);
expect(isNoticeVersionActive(release!, '4.9.9')).toBe(true);
// The upper bound is exclusive: 5.0.0 gets its own notice.
expect(isNoticeVersionActive(release!, '5.0.0')).toBe(false);
});
it('the thank-you notice hands over to the release modal at 4.0.0', () => {