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 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-12-01 16:45:07 +01:00
co-authored by Claude Opus 5.5
parent c9285f0349
commit a416411f01
2 changed files with 12 additions and 1 deletions
+8
View File
@@ -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 > silence one: `{ "off": true, "reason": "…", "until": "2027-03-01" }` (docs/doctor.md). The `growth-*` rules stay
> warnings and infos. > 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 > **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 > 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 > `pnpm generate:importmap`** after turning it on); `forms: { submissionRetentionDays }`; `Media eager` (a logo
+4 -1
View File
@@ -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 // 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 // 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. // 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 (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) { if (count('error').length > expected.length) {
console.error('[legacy:site] ✗ the doctor reports an error on a site that had none') console.error('[legacy:site] ✗ the doctor reports an error on a site that had none')