From a416411f01b315c33923ac1f287cc4bb59cdc4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Smoli=C5=84ski?= Date: Tue, 1 Dec 2026 16:45:07 +0100 Subject: [PATCH] legacy:site accepts only the performance errors the unedited 1.16.7 site meets (perf-budgets); changelog: /client helpers are plain values in server components, iaplTtlFrom in MongoDB types Co-Authored-By: Claude Opus 5.5 --- docs/CHANGELOG.md | 8 ++++++++ scripts/legacy-site-check.mjs | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a0af392..aeb4d64 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -76,6 +76,14 @@ once there are more than 20. > silence one: `{ "off": true, "reason": "…", "until": "2027-03-01" }` (docs/doctor.md). The `growth-*` rules stay > warnings and infos. > +> 10. **Helpers from `@intecion/ipal-kit/client` are plain values in a server component.** The `/client` barrels have +> no `'use client'` any more, so a helper without its own directive (`pushDataLayer`, the role predicates, …) +> imported into a server component is now the function itself, not a client reference. Only a project that passed +> such a function from a server component to a client component as a prop notices it (Next: "Functions cannot be +> passed directly to Client Components"): import it inside the client component instead. +> 11. **MongoDB: the generated types gain `iaplTtlFrom`** on consent records and statistics visits (the hidden TTL +> date, point 2) after `payload generate:types`. Nothing to change in code. +> > **New, off until a project turns it on:** `iapl({ unusedMedia: true })` — above the Media list, how many files no > page, entry or setting uses, with a link to Payload's list filtered to them (deleting stays manual; **run > `pnpm generate:importmap`** after turning it on); `forms: { submissionRetentionDays }`; `Media eager` (a logo diff --git a/scripts/legacy-site-check.mjs b/scripts/legacy-site-check.mjs index f04d926..4a990d1 100644 --- a/scripts/legacy-site-check.mjs +++ b/scripts/legacy-site-check.mjs @@ -107,7 +107,10 @@ results.push(`ipal-doctor: ${count('error').length} error(s), ${count('warning') // The performance rules are errors since 1.18.0 (the owner's decision; the changelog tells existing sites that // iapl-doctor can fail on them and how to lower or silence one). An old site may meet them — e.g. Playwright without a // budget test (perf-budgets) — and still work: they are listed, not failed. Any other error still fails. -const expected = count('error').filter((f) => f.rule.startsWith('perf-')) +// Exactly the rules the unedited v1.16.7 site meets today: a performance rule that starts failing on an old site, or a +// rule that breaks, fails the gate and gets a look (add it here only after judging it). +const EXPECTED_ON_OLD_SITE = new Set(['perf-budgets']) +const expected = count('error').filter((f) => EXPECTED_ON_OLD_SITE.has(f.rule)) if (expected.length) {results.push(`ipal-doctor: performance rules an old site meets (errors since 1.18.0, expected): ${[...new Set(expected.map((f) => f.rule))].join(', ')}`)} if (count('error').length > expected.length) { console.error('[legacy:site] ✗ the doctor reports an error on a site that had none')