Overrides for Payload's mongoose and happy-dom advisories; doctor rule transitive-min

@payloadcms/db-mongodb pins mongoose 8.24.1 (one critical, two high, two moderate
advisories, fixed by 8.24.7) and @lexical/headless 0.50 brings happy-dom 20.x (two
high, fixed by 21.0.4). Payload 3.93.0 fixes neither.

- reference/package.json (and so the starter): pnpm.overrides for mongoose
  (~8.24.10) and happy-dom (^21.0.4); pnpm audit --prod on the reference is clean
- root package.json: the happy-dom override for the plugin's own dev tree
- ipal-doctor: transitive-min reports mongoose 8.x < 8.24.7 (error) and
  happy-dom < 21.0.4 (warning) from the lockfile and prints the override line;
  DoctorContext.installedAll(name)
- AGENT.md §4 item 12, ipal-setup, ipal-upgrade, doctor.md, README, CHANGELOG

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-17 00:01:58 +01:00
co-authored by Claude Fable 5.2
parent 7c034a07ef
commit de8362820f
15 changed files with 209 additions and 36 deletions
+4 -1
View File
@@ -97,7 +97,10 @@ pnpm add @intecion/ipal-kit @payloadcms/plugin-seo @payloadcms/plugin-form-build
GHSA-mfr8-8qww-v76h — AGENT.md §4 item 11): `pnpm add [email protected] [email protected] sharp@^0.35.5` when
create-payload-app gave you an older one.
**Node.js 20 or later** (the plugin's `nodemailer` 10 requires it). After the install, `pnpm audit --prod` → no high or
critical; with `payload` 3.90.x add the `dompurify`, `graphql-scalars` and `undici` overrides from AGENT.md §4 item 12.
critical; with `payload` 3.90.x add the `dompurify`, `graphql-scalars`, `happy-dom`, `mongoose` and `undici` overrides
from AGENT.md §4 item 12 (`"mongoose@>=8 <8.24.7": "~8.24.10"` lifts the 8.24.1 that `@payloadcms/db-mongodb` pins —
one critical and two high advisories; `"happy-dom@<21.0.4": "^21.0.4"` fixes two high ones). `pnpm exec ipal-doctor`
→ no `transitive-min` finding.
`nodemailer`, `lucide-react`, `slugify`, `server-only` come with the plugin — do not add them (your own
`lucide-react` only `~0.400.0`). In `package.json`: pin every `@payloadcms/*` (ui, next, db-*, richtext-lexical,
plugin-seo, plugin-form-builder, storage-s3) in `pnpm.overrides` **to the exact `payload` version**, then
+11 -2
View File
@@ -88,8 +88,17 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
prints no security-upgrade warning.
**Every upgrade — dependency advisories** (AGENT.md §4 item 12): `pnpm audit --prod`; with `payload` 3.90.x add the
`dompurify`, `graphql-scalars` and `undici` overrides, `pnpm install`, audit again. **Check:** no high or critical (the
`deepmerge` low has no fix yet).
`dompurify`, `graphql-scalars`, `happy-dom`, `mongoose` and `undici` overrides to `pnpm.overrides`, `pnpm install`, audit
again. MongoDB sites need the `mongoose` one now: `@payloadcms/db-mongodb` pins 8.24.1 (up to Payload 3.93.0), which has
a critical advisory (GHSA-pcrw-h46h-c93h) and four more, all fixed in 8.24.7:
```json
"happy-dom@<21.0.4": "^21.0.4",
"mongoose@>=8 <8.24.7": "~8.24.10"
```
Then `pnpm install`, `pnpm build`, commit `package.json` and the lockfile, redeploy on Coolify (the new image ships the
fixed packages; no data or schema change, no migration). **Check:** `pnpm audit --prod` → no high or critical (the
`deepmerge` low has no fix yet); `pnpm why mongoose happy-dom` → 8.24.7 or later, 21.0.4 or later;
`pnpm exec ipal-doctor` → no `transitive-min` finding; the panel opens and a document saves.
**→ 1.14.0 (PROGRAMISTA §6, items 48–49; CHANGELOG "What projects must update" — do all 8, in order):**
1. `pnpm payload generate:importmap` — `@intecion/ipal-kit/admin#FaviconCheck` (hint under Site settings → Site icon)