Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e603561de4 | ||
|
|
e29f882aa6 | ||
|
|
195ca3ab11 | ||
|
|
b9df570e84 | ||
|
|
a0c576e54c | ||
|
|
ab51027617 | ||
|
|
13b66413f8 | ||
|
|
5d9bc10cfd | ||
|
|
1917686b52 | ||
|
|
de8362820f |
@@ -77,10 +77,12 @@ site with every team convention, installs it from a shipped lockfile and makes t
|
||||
|
||||
`nodemailer`, `lucide-react`, `slugify` and `server-only` are regular
|
||||
`dependencies` of the plugin — they install with it; don't add them yourself.
|
||||
The plugin's `nodemailer` 10 needs **Node.js 20 or later**.
|
||||
The plugin's `nodemailer` 10 needs **Node.js 20 or later**; Payload 3.94 itself needs **Node.js 22.23.5 or later**
|
||||
on the 22 line.
|
||||
|
||||
What you provide are the **peer dependencies** — packages the plugin shares with
|
||||
your project — in a version matching your Payload:
|
||||
your project — in a version matching your Payload. The plugin accepts Payload `^3.90.2`; the reference site and the starter use
|
||||
**3.94.1** (with `react` / `react-dom` 19.3.1, which Payload 3.94 requires):
|
||||
|
||||
| Peer | Range | Notes |
|
||||
|---|---|---|
|
||||
@@ -91,16 +93,17 @@ your project — in a version matching your Payload:
|
||||
| `@payloadcms/storage-s3` | `^3.90.2` | optional — only when media go to Cloudflare R2 ([docs/storage.md](./docs/storage.md)) |
|
||||
|
||||
```bash
|
||||
pnpm add @payloadcms/[email protected]0.2 @payloadcms/[email protected]0.2 \
|
||||
pnpm add @payloadcms/[email protected]4.1 @payloadcms/[email protected]4.1 \
|
||||
@clocklimited/payload-2fa
|
||||
pnpm add @payloadcms/[email protected]0.2 # only with R2 media
|
||||
pnpm add @payloadcms/[email protected]4.1 # only with R2 media
|
||||
```
|
||||
|
||||
Keep every `@payloadcms/*` at exactly the same version as `payload`
|
||||
(`pnpm.overrides` — see PROGRAMISTA.md §1). Then run `pnpm audit --prod`: with
|
||||
`payload` 3.90.x, Payload's own tree pins a vulnerable `undici`, `dompurify` and
|
||||
`graphql-scalars` (the last one even in the latest Payload) — add the three overrides from [AGENT.md §4 item 12](./docs/agent/AGENT.md) (recommended, not
|
||||
required by the plugin). Upload optimization and image
|
||||
(`pnpm.overrides` — see PROGRAMISTA.md §1). Then run `pnpm audit --prod`: even
|
||||
Payload 3.94.1 brings a vulnerable `happy-dom` (via Lexical) and `dompurify` — add
|
||||
the two overrides from [AGENT.md §4 item 12](./docs/agent/AGENT.md); an older Payload
|
||||
also needs the `mongoose` (MongoDB adapter, up to 3.93) and `undici` (up to 3.91)
|
||||
ones listed there (recommended, not required by the plugin). Upload optimization and image
|
||||
placeholders also use the `sharp` you pass to `buildConfig({ sharp })`
|
||||
(standard in a `create-payload-app` project).
|
||||
|
||||
|
||||
@@ -8,6 +8,100 @@ versions at once, go through every "Requires project changes" section in order,
|
||||
version you have. A new release = a new section at the top; we remove the oldest ones only
|
||||
once there are more than 20.
|
||||
|
||||
## 1.16.3
|
||||
|
||||
### Changed
|
||||
- **Payload 3.94.1** in the reference site and the project starter (was 3.90.2), with `react` / `react-dom` 19.3.1 and
|
||||
Node.js `>=22.23.5 <23` in the reference `engines`. The plugin is built and tested against 3.94.1; its peer range is
|
||||
unchanged (`^3.90.2`), so a project on 3.90.x is not forced to move. What Payload 3.91–3.94 change that a project
|
||||
notices: Node.js 22.23.5 or later (24.22.3 / 26.13.1 on newer lines), `react` ^19.3.1, Next.js 16.4.5 or later,
|
||||
`@payloadcms/db-mongodb` ships `mongoose` 8.24.7 (3.94.0), the `deepmerge` dependency is gone (3.94.1), field access
|
||||
now receives the document id, draft read access and block child read access are checked more strictly, and the slug
|
||||
field no longer fails required validation on create (a 3.90.2 bug). Nothing in the plugin needed a code change; the
|
||||
generated types and the import map of the reference site are unchanged.
|
||||
- **Overrides re-checked against Payload 3.94.1** (AGENT.md §4 item 12): `dompurify` and `happy-dom` are still needed
|
||||
(Lexical still brings `happy-dom` ^20.9.0: two highs). `mongoose` (MongoDB, Payload 3.90–3.93) and `undici` (Payload
|
||||
3.90–3.91) are needed only on an older Payload. **`graphql-scalars` needs no override any more**: GHSA-x8rm-f576-gq67
|
||||
now covers 1.24.1–2.0.0 only, and `@payloadcms/graphql` pins 1.22.2. The reference site and the starter keep only the
|
||||
`dompurify` and `happy-dom` lines.
|
||||
- **ipal-doctor `transitive-min`:** the `mongoose` finding names the Payload upgrade (3.94.1) as the first fix; the
|
||||
thresholds are unchanged.
|
||||
- Dependencies: `nodemailer` 10.6.1 (runtime). Dev tooling: Playwright 1.65.1 (run `pnpm exec playwright install
|
||||
chromium` once), Vitest 5.1.1, Prettier 3.10.1, `@swc/cli` 0.8.2 (with `piscina` 4.9.4 and `@xhmikosr/decompress` 11: clears the two critical dev
|
||||
advisories), `vite` 7.3.8 as a direct dev dependency (Vitest's peer; clears the vite high), `rimraf` 6,
|
||||
`cross-env` 10 (also in the reference site), `open` 11, `sort-package-json` 4, `@swc-node/register` 1.12.1,
|
||||
`vite-tsconfig-paths` 6.1.1, Tailwind 4.3.5 and PostCSS 8.5.33 in the reference site. `pnpm audit` of the plugin's
|
||||
dev tree: 31 → 4 (0 critical, 0 high; what is left sits under `drizzle-kit` and the ESLint toolchain). `--prod` stays
|
||||
at 0, and the reference site at 0.
|
||||
- Kept back, with the reason: TypeScript 7 (typescript-eslint supports TypeScript below 6.1 only), ESLint 10
|
||||
(`eslint-config-next` 16.4.6 plugins do not support it — the lint run crashes), `graphql` 17 (Payload requires
|
||||
^16.8.1), `@types/node` 26 (projects stay on Node 22), `lucide-react` 1.x (a runtime dependency: projects are told to
|
||||
keep their own lucide on 0.400.x; moving needs its own change and icon-map checks).
|
||||
|
||||
### What projects must update
|
||||
- **Nothing is required.** The plugin still works with Payload 3.90.2 and later.
|
||||
- **Recommended — move to Payload 3.94.1** (the `ipal-upgrade` skill, "Every upgrade — Payload"): every `payload` /
|
||||
`@payloadcms/*` to 3.94.1 (in `dependencies` and `pnpm.overrides`), `react` and `react-dom` 19.3.1, Node.js 22.23.5
|
||||
or later (`"engines": { "node": ">=22.23.5 <23" }`, `.nvmrc` stays `22`), `pnpm install`, `pnpm payload generate:types`,
|
||||
`pnpm payload generate:importmap`, `rm -rf .next`, build, redeploy on Coolify. Postgres/SQLite: run
|
||||
`pnpm payload migrate:create` and commit it if it is not empty (Payload 3.94.1 changes how long index and foreign
|
||||
key names are built). MongoDB: no migration.
|
||||
- **Node.js 22.23.5 or later everywhere the site runs — before you move to Payload 3.94.** Payload 3.94 refuses older
|
||||
Node (`engines`: `^22.23.5 || ^24.22.3 || >=26.13.1`). Locally: `node -v`. **Coolify:** Nixpacks picks the Node major
|
||||
from `engines` / `.nvmrc`, and the patch version comes from the Nixpacks release on the server — so after the first
|
||||
deploy open the app → Terminal and run `node -v` (the build log shows it too). If it is below 22.23.5, update Coolify
|
||||
(newer Nixpacks) before you deploy Payload 3.94; until then, stay on 3.90.x. CI images (`node:22` / `setup-node`
|
||||
with `22`) must resolve to 22.23.5 or later as well.
|
||||
- **Overrides** (`pnpm.overrides`): on 3.94.x keep `"dompurify@<3.4.17": "^3.4.17"` and
|
||||
`"happy-dom@<21.0.4": "^21.0.4"`; the `mongoose` and `undici` lines do nothing there — remove them. Remove
|
||||
`"graphql-scalars@<2.0.1": "^2.0.1"` if you have it (optional). Sites that stay on 3.90–3.93 keep the 1.16.2 lines.
|
||||
- **Verify:** `pnpm ls payload` → 3.94.1; `pnpm audit --prod` → no high or critical; `pnpm exec ipal-doctor` → no
|
||||
`versions` finding; the panel opens and a document saves; a form submission arrives.
|
||||
- `pnpm ipal:skills` for the updated `ipal-setup` / `ipal-upgrade` skills.
|
||||
|
||||
## 1.16.2
|
||||
|
||||
### Security
|
||||
- **`mongoose` and `happy-dom` overrides for Payload's own dependencies.** `@payloadcms/db-mongodb` pins `mongoose`
|
||||
8.24.1 exactly (still so in Payload 3.93.0). 8.x below 8.24.7 has five advisories published 2026-11-10:
|
||||
[GHSA-pcrw-h46h-c93h](https://github.com/advisories/GHSA-pcrw-h46h-c93h) (critical, `sanitizeFilter` not applied on
|
||||
`countDocuments`; fixed in 8.24.3), [GHSA-gg4r-jv3p-qx3c](https://github.com/advisories/GHSA-gg4r-jv3p-qx3c) and
|
||||
[GHSA-8332-j7wj-wjw4](https://github.com/advisories/GHSA-8332-j7wj-wjw4) (high),
|
||||
[GHSA-wr5m-5jph-8m96](https://github.com/advisories/GHSA-wr5m-5jph-8m96) and
|
||||
[GHSA-6972-9mcm-vhwj](https://github.com/advisories/GHSA-6972-9mcm-vhwj) (moderate) — all fixed in 8.24.7.
|
||||
`@payloadcms/richtext-lexical` → `@lexical/headless` 0.50 brings `happy-dom` 20.x, which has
|
||||
[GHSA-c8p4-j97h-3vg8](https://github.com/advisories/GHSA-c8p4-j97h-3vg8) (high, fixed in 21.0.0) and
|
||||
[GHSA-834v-8h66-3h79](https://github.com/advisories/GHSA-834v-8h66-3h79) (high, fixed in 21.0.4). The plugin has no
|
||||
part in either; only the project's lockfile can lift them. The reference site and the project starter now carry
|
||||
`"mongoose@>=8 <8.24.7": "~8.24.10"` and `"happy-dom@<21.0.4": "^21.0.4"` in `pnpm.overrides`; with them
|
||||
`pnpm audit --prod` on the reference site reports no known vulnerabilities, and its seed, production build, smoke
|
||||
tests and doctor pass. The plugin forces neither override on a project.
|
||||
|
||||
### Added
|
||||
- **ipal-doctor `transitive-min`** (group `versions`): reports a `mongoose` 8.x below 8.24.7 (error) and a `happy-dom`
|
||||
below 21.0.4 (warning) anywhere in the dependency tree, read from `pnpm-lock.yaml`, and prints the exact
|
||||
`pnpm.overrides` line. Silence it in `ipal-doctor.json` like any rule
|
||||
(`"transitive-min": { "off": true, "reason": "…" }`). `DoctorContext.installedAll(name)` is the building block for
|
||||
your own rules on transitive packages.
|
||||
|
||||
### Changed
|
||||
- AGENT.md §4 item 12, the `ipal-setup` and `ipal-upgrade` skills, doctor.md and the README list five overrides.
|
||||
|
||||
### What projects must update
|
||||
- **Every MongoDB site** (`@payloadcms/db-mongodb`): add the two lines to `pnpm.overrides` in `package.json`, next to
|
||||
the existing `dompurify` / `graphql-scalars` / `undici` entries:
|
||||
```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 `pnpm-lock.yaml`, redeploy on Coolify. No data change,
|
||||
no migration, no import map change. The selectors only touch the vulnerable versions: a mongoose 9 or a mongoose
|
||||
8.24.7 and later is left as it is.
|
||||
- **Postgres / SQLite sites:** only the `happy-dom` line (they have no mongoose).
|
||||
- **Verify:** `pnpm why mongoose happy-dom` → mongoose 8.24.10 (MongoDB sites), happy-dom 21.0.4; `pnpm audit --prod` →
|
||||
no high or critical; `pnpm exec ipal-doctor` → no `transitive-min` finding; open the panel and save a document.
|
||||
- `pnpm ipal:skills` for the updated `ipal-setup` / `ipal-upgrade` skills.
|
||||
|
||||
## 1.16.1
|
||||
|
||||
### Security
|
||||
|
||||
+32
-16
@@ -514,27 +514,43 @@ No abbreviations (`HeroSection`, not `HeroSec`). Do not create `lib/pages.ts`,
|
||||
(`pnpm why sharp`). The plugin's peer range stays open (`next >=15`) — the minimum is yours to keep.
|
||||
**Check:** `pnpm ls next sharp` → next ≥ 16.4.5, sharp ≥ 0.35.5; `pnpm exec ipal-doctor` → no `next-min`
|
||||
finding; `pnpm dev` prints no security-upgrade warning.
|
||||
12. **No open production advisories.** Node.js 20 or later (the plugin's `nodemailer` 10 requires it). Run
|
||||
12. **No open production advisories.** Node.js 20 or later for the plugin itself (its `nodemailer` 10 requires it);
|
||||
**Payload 3.94 needs Node.js 22.23.5 or later** on the 22 line (`engines`: `">=22.23.5 <23"`, `.nvmrc` `22`), locally,
|
||||
in CI and in Coolify (Nixpacks takes the major from `engines` / `.nvmrc` and the patch from its own release: check
|
||||
`node -v` in the app's Terminal; below 22.23.5, update Coolify before moving to Payload 3.94). Run
|
||||
`pnpm audit --prod`. The plugin's own dependencies are clean; what remains comes from Payload's tree, which only
|
||||
the project's lockfile can fix. With `payload` 3.90.x three packages are pinned exactly and need `pnpm.overrides`
|
||||
next to the `@payloadcms/*` ones:
|
||||
the project's lockfile can fix. With `payload` **3.94.x** two packages are still pinned below a fix and need
|
||||
`pnpm.overrides` next to the `@payloadcms/*` ones:
|
||||
```json
|
||||
"dompurify@<3.4.17": "^3.4.17",
|
||||
"graphql-scalars@<2.0.1": "^2.0.1",
|
||||
"happy-dom@<21.0.4": "^21.0.4"
|
||||
```
|
||||
`happy-dom` comes from `@payloadcms/richtext-lexical` → `@lexical/headless` 0.50 (`^20.9.0`, still so in 3.94.1);
|
||||
every 20.x has GHSA-c8p4-j97h-3vg8 (high, SSRF when parsing untrusted HTML, fixed in 21.0.0) and
|
||||
GHSA-834v-8h66-3h79 (high, host code execution, fixed in 21.0.4). 21 is a major, but only
|
||||
`@lexical/headless/dom` (`withDOM`) loads it — Payload never imports that entry, and Lexical 0.53 itself moved to
|
||||
`^21.0.4`. `dompurify` comes from the admin code editor (`@payloadcms/ui` → `monaco-editor`; low advisories).
|
||||
**On an older Payload** add these too, until you upgrade (upgrading to 3.94.1 is the better fix):
|
||||
```json
|
||||
"mongoose@>=8 <8.24.7": "~8.24.10",
|
||||
"undici@>=7 <7.30.1": "^7.30.1"
|
||||
```
|
||||
`undici` comes from `payload` (3.92.1 and later already ship 7.30.1), `dompurify` from the admin code editor
|
||||
(`@payloadcms/ui` → `monaco-editor`, which pins 3.2.7). `graphql-scalars` comes from `@payloadcms/graphql`, which
|
||||
pins 1.22.2 up to the latest Payload (3.92.1); every version up to 2.0.0 has a high ReDoS advisory in the
|
||||
`PhoneNumber` scalar (GHSA-x8rm-f576-gq67). 2.x is a major (graphql-js 16+, Node.js 22 recommended), but Payload
|
||||
only uses `DateTimeResolver` and `EmailAddressResolver`, which work unchanged — keep the override until Payload
|
||||
ships 2.0.1 or later. `deepmerge` (low, from `payload`) has no fixed version yet; it stays in the report. Everything else in the report (`fast-uri`, `js-yaml`,
|
||||
`browserslist`, `source-map-js`, `fast-copy`, `baseline-browser-mapping`) is a range: `pnpm update` or a fresh
|
||||
lockfile picks up the fix; add an override like the ones above only if it does not. These are recommendations —
|
||||
the plugin forces none of them. Never add a project dependency on `nodemailer` or `@types/nodemailer`.
|
||||
**Check:** `pnpm audit --prod` → no high or critical (only the `deepmerge` low may remain);
|
||||
`pnpm why undici dompurify graphql-scalars` → only the fixed versions; with GraphQL in use, a query that reads a
|
||||
`createdAt` (DateTime) and filters on `email` (EmailAddress) returns data.
|
||||
`mongoose` (MongoDB sites on Payload 3.90–3.93): `@payloadcms/db-mongodb` pins 8.24.1, which has five advisories —
|
||||
GHSA-pcrw-h46h-c93h (critical, `sanitizeFilter` not applied on `countDocuments`, fixed in 8.24.3),
|
||||
GHSA-gg4r-jv3p-qx3c and GHSA-8332-j7wj-wjw4 (high), GHSA-wr5m-5jph-8m96 and GHSA-6972-9mcm-vhwj (moderate), all
|
||||
fixed in 8.24.7; Payload 3.94.0 and later ship 8.24.7. `undici` (Payload 3.90–3.91): 3.92.0 and later ship 7.30.1.
|
||||
Both selectors match only the vulnerable versions, so they do nothing once Payload ships the fix — remove them then.
|
||||
**`graphql-scalars` needs no override any more:** GHSA-x8rm-f576-gq67 now covers 1.24.1–2.0.0 only, and
|
||||
`@payloadcms/graphql` pins 1.22.2. A `"graphql-scalars@<2.0.1": "^2.0.1"` line added earlier may be removed (it
|
||||
also works if kept: Payload's GraphQL runs unchanged on 2.x). The `deepmerge` low is gone from Payload 3.94.1.
|
||||
Everything else in the report (`fast-uri`, `js-yaml`, `browserslist`, `source-map-js`, `fast-copy`,
|
||||
`baseline-browser-mapping`) is a range: `pnpm update` or a fresh lockfile picks up the fix; add an override like
|
||||
the ones above only if it does not. These are recommendations — the plugin forces none of them. Never add a
|
||||
project dependency on `nodemailer` or `@types/nodemailer`.
|
||||
**Check:** `pnpm audit --prod` → no high or critical; `pnpm why dompurify happy-dom mongoose undici` → only the
|
||||
fixed versions (dompurify 3.4.17 or later, happy-dom 21.0.4 or later, mongoose 8.24.7 or later, undici 7.30.1 or
|
||||
later); `pnpm exec ipal-doctor` → no `transitive-min` finding; after a Payload or mongoose change run
|
||||
`pnpm build`, open the panel and save a document.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<!-- Generated by scripts/reference-index.mjs from reference/ — do not edit by hand (pnpm reference:index). -->
|
||||
|
||||
The reference site is one complete client site on ipal-kit 1.16.1 ("Example Studio", made up) that uses
|
||||
The reference site is one complete client site on ipal-kit 1.16.3 ("Example Studio", made up) that uses
|
||||
every convention in AGENT.md. It lives in the plugin repo (`reference/`, not in the npm package). Copy the
|
||||
PATTERN of the file you need; change only the project's content. Files up to
|
||||
40 lines are below in full; open the rest in the repo at the tag of your plugin version:
|
||||
|
||||
@@ -96,8 +96,13 @@ pnpm add @intecion/ipal-kit @payloadcms/plugin-seo @payloadcms/plugin-form-build
|
||||
**Next.js 16.4.5 or later** (minimum safe version: 16.0.0–16.4.0 have critical advisories, 16.3.0–16.4.4 have
|
||||
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.
|
||||
**Payload 3.94.1** (what the reference site and the starter use; the plugin accepts `^3.90.2`): every `payload` /
|
||||
`@payloadcms/*` on the same exact version, `react` and `react-dom` 19.3.1 (Payload 3.94 requires `^19.3.1`), and
|
||||
**Node.js 22.23.5 or later** on the 22 line (`"engines": { "node": ">=22.23.5 <23" }`, `.nvmrc` `22`) — Payload 3.94's
|
||||
minimum, also in Coolify (Nixpacks picks the patch: check `node -v` in the app's Terminal after the first deploy). After the install, `pnpm audit --prod` → no high or critical; add the `dompurify` and `happy-dom` overrides
|
||||
from AGENT.md §4 item 12 (`"happy-dom@<21.0.4": "^21.0.4"` fixes two high advisories Lexical still brings in). On an
|
||||
older Payload also the `mongoose` (MongoDB) and `undici` ones listed there. `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
|
||||
|
||||
@@ -87,9 +87,33 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
|
||||
(a new image ships the fixed next and sharp). **Check:** `pnpm exec ipal-doctor` → no `next-min` finding; `pnpm dev`
|
||||
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).
|
||||
**Every upgrade — Payload** (AGENT.md §4 items 11–12): the reference site and the starter run Payload **3.94.1**; the
|
||||
plugin still accepts `^3.90.2`, so moving is recommended, not forced. To move: every `payload` / `@payloadcms/*` (in
|
||||
`dependencies` and in `pnpm.overrides`) to the same exact version, `react` and `react-dom` to 19.3.1 (Payload 3.94
|
||||
requires `^19.3.1`), Node.js 22.23.5 or later (`"engines": { "node": ">=22.23.5 <23" }`, `.nvmrc` `22`) on every machine and
|
||||
in Coolify — Payload 3.94 refuses older Node. Nixpacks takes only the major from `engines` / `.nvmrc`; the patch comes
|
||||
from the Nixpacks release on the Coolify server, so check `node -v` in the app's Terminal (or the build log) and update
|
||||
Coolify first if it is below 22.23.5 (until then, stay on 3.90.x). Then `pnpm install`, `pnpm payload generate:types`, `pnpm payload generate:importmap`, `rm -rf .next`,
|
||||
build, redeploy. Payload 3.91–3.94 change no schema the plugin defines: no migration from the plugin; on
|
||||
Postgres/SQLite run `pnpm payload migrate:create` anyway and commit it if it is not empty.
|
||||
**Check:** `pnpm ls payload @payloadcms/ui @payloadcms/db-mongodb` → one version, 3.94.1; the panel opens and a document
|
||||
saves; `pnpm exec ipal-doctor` → no `versions` finding; Coolify app → Terminal → `node -v` → 22.23.5 or later.
|
||||
|
||||
**Every upgrade — dependency advisories** (AGENT.md §4 item 12): `pnpm audit --prod`; on Payload 3.94.x add the
|
||||
`dompurify` and `happy-dom` overrides to `pnpm.overrides`; on an older Payload also `mongoose` (MongoDB sites; 3.90–3.93
|
||||
pin 8.24.1, which has a critical advisory, GHSA-pcrw-h46h-c93h, and four more) and `undici` (3.90–3.91):
|
||||
```json
|
||||
"dompurify@<3.4.17": "^3.4.17",
|
||||
"happy-dom@<21.0.4": "^21.0.4",
|
||||
"mongoose@>=8 <8.24.7": "~8.24.10",
|
||||
"undici@>=7 <7.30.1": "^7.30.1"
|
||||
```
|
||||
The selectors match only vulnerable versions, so on 3.94.x the last two do nothing — remove them. A
|
||||
`"graphql-scalars@<2.0.1": "^2.0.1"` line is no longer needed (the advisory no longer covers Payload's 1.22.2); remove
|
||||
it or keep it. Then `pnpm install`, `pnpm build`, commit `package.json` and the lockfile, redeploy on Coolify (no data or
|
||||
schema change, no migration). **Check:** `pnpm audit --prod` → no high or critical; `pnpm why dompurify happy-dom
|
||||
mongoose undici` → 3.4.17, 21.0.4, 8.24.7, 7.30.1 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)
|
||||
@@ -277,6 +301,33 @@ every site below Next.js 16.4.5:**
|
||||
2. `pnpm ipal:skills` (updated `ipal-setup` / `ipal-upgrade`).
|
||||
**Check:** `pnpm ls next` → 16.4.6; `pnpm exec ipal-doctor` → no `next-min` finding; `pnpm dev` prints no security warning.
|
||||
|
||||
**→ 1.16.2 (PROGRAMISTA §6, item 63; Payload's mongoose and happy-dom advisories; AGENT.md §4 item 12) — required for
|
||||
every site:**
|
||||
1. Add to `pnpm.overrides` in `package.json`: `"mongoose@>=8 <8.24.7": "~8.24.10"` (MongoDB sites only) and
|
||||
`"happy-dom@<21.0.4": "^21.0.4"` (every site). Then `pnpm install`, `pnpm build`; commit `package.json` and the
|
||||
lockfile, redeploy on Coolify. No data change, no migration.
|
||||
2. `pnpm ipal:skills` (updated `ipal-setup` / `ipal-upgrade`).
|
||||
**Check:** `pnpm why mongoose happy-dom` → mongoose 8.24.10, happy-dom 21.0.4; `pnpm audit --prod` → no high or critical;
|
||||
`pnpm exec ipal-doctor` → no `transitive-min` finding; open the panel and save a document.
|
||||
|
||||
**→ 1.16.3 (PROGRAMISTA §6, item 64; Payload 3.94.1 in the reference site and the starter; AGENT.md §4 items 11–12) —
|
||||
recommended, not required (the plugin's peer range stays `^3.90.2`):**
|
||||
1. **Node.js 22.23.5 or later first — everywhere the site runs.** Payload 3.94 refuses older Node. Locally: `node -v`.
|
||||
Coolify: Nixpacks takes only the major from `engines` / `.nvmrc`; the patch comes from the Nixpacks release on the
|
||||
server, so open the app → Terminal → `node -v` (or read the build log). Below 22.23.5: update Coolify first, and
|
||||
stay on Payload 3.90.x until then. CI images must resolve to 22.23.5 or later as well.
|
||||
2. Every `payload` / `@payloadcms/*` to 3.94.1 (in `dependencies` and `pnpm.overrides`), `react` and `react-dom` 19.3.1,
|
||||
`"engines": { "node": ">=22.23.5 <23" }` (`.nvmrc` stays `22`). Overrides: keep `"dompurify@<3.4.17": "^3.4.17"`
|
||||
and `"happy-dom@<21.0.4": "^21.0.4"`; remove the `mongoose`, `undici` and `graphql-scalars` lines (they do nothing
|
||||
on 3.94.x). Then `pnpm install`, `pnpm payload generate:types`, `pnpm payload generate:importmap`, `rm -rf .next`,
|
||||
`pnpm build`; commit `package.json` and the lockfile, redeploy on Coolify.
|
||||
3. Postgres/SQLite: `pnpm payload migrate:create`, commit it if it is not empty (3.94.1 changes long index and foreign
|
||||
key names). MongoDB: no migration.
|
||||
4. `pnpm ipal:skills` (updated `ipal-setup` / `ipal-upgrade`).
|
||||
**Check:** `pnpm ls payload @payloadcms/ui @payloadcms/db-mongodb` → 3.94.1; `pnpm why dompurify happy-dom` → 3.4.17,
|
||||
21.0.4; `pnpm audit --prod` → no high or critical; `pnpm exec ipal-doctor` → no `versions` finding; Coolify Terminal
|
||||
`node -v` → 22.23.5 or later; the panel opens, a document saves, a form submission arrives.
|
||||
|
||||
## 2. Inventory (no code changes)
|
||||
**What changed for projects** between your old and new plugin version is exactly the reference site's diff —
|
||||
`git diff v<old> v<new> -- reference/` in the ipal-kit repo (or the two `docs/agent/reference-site/INDEX.md` files):
|
||||
|
||||
+10
-8
@@ -57,14 +57,14 @@ tab, a missing Forms collection or a crash. In `package.json`:
|
||||
```json
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"payload": "3.90.2",
|
||||
"@payloadcms/ui": "3.90.2",
|
||||
"@payloadcms/next": "3.90.2",
|
||||
"@payloadcms/db-postgres": "3.90.2",
|
||||
"@payloadcms/richtext-lexical": "3.90.2",
|
||||
"@payloadcms/plugin-seo": "3.90.2",
|
||||
"@payloadcms/plugin-form-builder": "3.90.2",
|
||||
"@payloadcms/storage-s3": "3.90.2"
|
||||
"payload": "3.94.1",
|
||||
"@payloadcms/ui": "3.94.1",
|
||||
"@payloadcms/next": "3.94.1",
|
||||
"@payloadcms/db-postgres": "3.94.1",
|
||||
"@payloadcms/richtext-lexical": "3.94.1",
|
||||
"@payloadcms/plugin-seo": "3.94.1",
|
||||
"@payloadcms/plugin-form-builder": "3.94.1",
|
||||
"@payloadcms/storage-s3": "3.94.1"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -670,6 +670,8 @@ Do one item at a time, build, check. Order by importance:
|
||||
| 60 | **1.15.5** — a seeded page with a required layout linking to a page or form fails validation ("… > Layout") | nothing to change in the seed; run it again (dry run first); a missing `$form` / `$page` is now an error in the dry run too; a required link cycle: make one link optional | CHANGELOG 1.15.5, seeding.md |
|
||||
| 61 | **1.16.0 — files on forms** — a CV / drawing field built by hand (own upload collection, bucket, `<input type="file">` posting to an own route), or "send the file by e-mail" asked for and refused | `forms: { attachments: true }` + a **File** field (panel or seed) + one e-mail with a fixed recipient; Postgres/SQLite `migrate:create`; `generate:types`; `formClasses` keys `file`, `help`, `fileList`, `fileItem`, `fileRemove`; proxy body limit (nginx `client_max_body_size 12m`); Graph: `Mail.ReadWrite` limited to the forms mailbox, or SMTP settings, or ~2.8 MB; test e-mail with the 10 MB file; delete the hand-built upload path; `pnpm ipal:skills` | CHANGELOG 1.16.0, forms.md "Files", email.md "Attachments", deployment.md "Form files" |
|
||||
| 62 | **1.16.1** — `pnpm dev` warns "Next.js 16.4.3 is affected by a known security vulnerability"; ipal-doctor `next-min` error below 16.4.5 (GHSA-mfr8-8qww-v76h) | `pnpm add [email protected] [email protected]`, `rm -rf .next`, build, commit the lockfile, redeploy on Coolify; `pnpm ipal:skills`; no option, migration or import map change | CHANGELOG 1.16.1, AGENT.md §4 item 11 |
|
||||
| 63 | **1.16.2** — `pnpm audit --prod` shows `mongoose` (critical, via `@payloadcms/db-mongodb`) or `happy-dom` (high, via `@payloadcms/richtext-lexical`); ipal-doctor `transitive-min` | `pnpm.overrides`: `"mongoose@>=8 <8.24.7": "~8.24.10"` (MongoDB sites) and `"happy-dom@<21.0.4": "^21.0.4"`; `pnpm install`, build, commit the lockfile, redeploy on Coolify; `pnpm ipal:skills`; no migration | CHANGELOG 1.16.2, AGENT.md §4 item 12 |
|
||||
| 64 | **1.16.3** — the reference site and the starter run Payload 3.94.1; the site is still on 3.90–3.93, or `node -v` (locally or in the Coolify app's Terminal) is below 22.23.5 | Recommended, not required (the plugin still accepts `^3.90.2`). First make sure Node is 22.23.5 or later everywhere, Coolify included (Nixpacks picks the patch: check `node -v`, update Coolify if lower). Then every `payload` / `@payloadcms/*` 3.94.1 (in `dependencies` and `pnpm.overrides`), `react` / `react-dom` 19.3.1, `"engines": { "node": ">=22.23.5 <23" }`; overrides: keep `dompurify` and `happy-dom`, drop `mongoose`, `undici` and `graphql-scalars`; `pnpm install`, `generate:types`, `generate:importmap`, `rm -rf .next`, build, redeploy; Postgres/SQLite: `migrate:create`; `pnpm ipal:skills` | CHANGELOG 1.16.3, AGENT.md §4 items 11–12, ipal-upgrade "Every upgrade — Payload" |
|
||||
|
||||
After updating the package: `pnpm ipal:skills` (new skill versions), `pnpm payload generate:importmap`, `rm -rf .next`, restart dev, grep for the new symbol in
|
||||
`node_modules/@intecion/ipal-kit/dist`.
|
||||
|
||||
@@ -81,6 +81,7 @@ Turn off: `ipalKit({ doctor: false })`. Adapt: `ipalKit({ doctor: { tokenVar: 'M
|
||||
| | `plugin-latest` | warning; error two or more minors behind | the installed plugin is the newest on the team registry (registry) |
|
||||
| | `next-min` | error | `next` ≥ 16.4.5 (below 16.4.1: RCE/DoS advisories; 16.3.0–16.4.4: GHSA-mfr8-8qww-v76h); `eslint-config-next` on the same minor (warning) |
|
||||
| | `sharp-min` | error | `sharp` ≥ 0.35.5 |
|
||||
| | `transitive-min` | error (`mongoose`), warning (`happy-dom`) | packages Payload pins below a security fix, in any depth of the tree (read from `pnpm-lock.yaml`, else `node_modules/.pnpm`): `mongoose` 8.x ≥ 8.24.7 (GHSA-pcrw-h46h-c93h and four more; Payload 3.90–3.93 pin 8.24.1, 3.94.0+ ship 8.24.7 — the fix it prints names the Payload upgrade first), `happy-dom` ≥ 21.0.4 (GHSA-c8p4-j97h-3vg8, GHSA-834v-8h66-3h79). The fix it prints is the `pnpm.overrides` line from AGENT.md §4 item 12 |
|
||||
| | `node-22` | warning | `engines.node` only 22 (`">=22 <23"`), `.nvmrc` / `.node-version` = 22; with `--deep`, the running Node |
|
||||
| | `pnpm-pinned` | info | `packageManager` is set |
|
||||
| | `deps-audit` | error on critical/high, info on moderate/low | `pnpm audit --prod` (registry) |
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ configuration (see below) or extend the plugin. Do NOT hard-code your own form.
|
||||
## Dependency
|
||||
|
||||
```json
|
||||
"dependencies": { "@payloadcms/plugin-form-builder": "3.90.2" } // same version as payload
|
||||
"dependencies": { "@payloadcms/plugin-form-builder": "3.94.1" } // same version as payload
|
||||
```
|
||||
(the plugin's peer dependency: `^3.90.2`)
|
||||
|
||||
|
||||
+30
-29
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@intecion/ipal-kit",
|
||||
"version": "1.16.1",
|
||||
"version": "1.16.3",
|
||||
"description": "Intecion Payload Advanced Library — a Payload CMS 3 plugin: i18n, SEO, forms, consent, analytics, blog/archives.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -108,7 +108,7 @@
|
||||
"build:starter": "node scripts/build-starter.mjs",
|
||||
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
||||
"build:types": "tsc --outDir dist --rootDir ./src",
|
||||
"clean": "rimraf {dist,*.tsbuildinfo}",
|
||||
"clean": "rimraf --glob dist \"*.tsbuildinfo\"",
|
||||
"cookie-db:refresh": "node scripts/refresh-cookie-database.mjs",
|
||||
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
|
||||
"dev": "next dev dev --turbo",
|
||||
@@ -132,7 +132,7 @@
|
||||
"dependencies": {
|
||||
"busboy": "1.6.0",
|
||||
"lucide-react": "0.400.0",
|
||||
"nodemailer": "10.3.1",
|
||||
"nodemailer": "10.6.1",
|
||||
"server-only": "0.0.1",
|
||||
"slugify": "1.6.9"
|
||||
},
|
||||
@@ -149,40 +149,41 @@
|
||||
"react": "^19.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.2.0",
|
||||
"@payloadcms/db-postgres": "3.90.2",
|
||||
"@payloadcms/db-sqlite": "3.90.2",
|
||||
"@eslint/eslintrc": "^3.3.7",
|
||||
"@payloadcms/db-postgres": "3.94.1",
|
||||
"@payloadcms/db-sqlite": "3.94.1",
|
||||
"@payloadcms/eslint-config": "3.28.0",
|
||||
"@payloadcms/next": "3.90.2",
|
||||
"@payloadcms/plugin-form-builder": "3.90.2",
|
||||
"@payloadcms/plugin-seo": "3.90.2",
|
||||
"@payloadcms/richtext-lexical": "3.90.2",
|
||||
"@payloadcms/ui": "3.90.2",
|
||||
"@playwright/test": "1.64.0",
|
||||
"@swc-node/register": "1.10.9",
|
||||
"@swc/cli": "0.6.0",
|
||||
"@types/busboy": "1.5.4",
|
||||
"@payloadcms/next": "3.94.1",
|
||||
"@payloadcms/plugin-form-builder": "3.94.1",
|
||||
"@payloadcms/plugin-seo": "3.94.1",
|
||||
"@payloadcms/richtext-lexical": "3.94.1",
|
||||
"@payloadcms/ui": "3.94.1",
|
||||
"@playwright/test": "1.65.1",
|
||||
"@swc-node/register": "1.12.1",
|
||||
"@swc/cli": "0.8.2",
|
||||
"@types/busboy": "1.5.5",
|
||||
"@types/node": "22.20.5",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"copyfiles": "2.4.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"cross-env": "^10.1.0",
|
||||
"eslint": "^9.23.0",
|
||||
"eslint-config-next": "16.4.6",
|
||||
"graphql": "^16.8.1",
|
||||
"next": "16.4.6",
|
||||
"open": "^10.1.0",
|
||||
"payload": "3.90.2",
|
||||
"prettier": "^3.4.2",
|
||||
"qs-esm": "8.0.1",
|
||||
"react": "19.3.0",
|
||||
"react-dom": "19.3.0",
|
||||
"rimraf": "3.0.2",
|
||||
"open": "^11.0.4",
|
||||
"payload": "3.94.1",
|
||||
"prettier": "^3.10.1",
|
||||
"qs-esm": "8.0.2",
|
||||
"react": "19.3.1",
|
||||
"react-dom": "19.3.1",
|
||||
"rimraf": "6.1.4",
|
||||
"sharp": "0.35.5",
|
||||
"sort-package-json": "^2.10.0",
|
||||
"sort-package-json": "^4.1.0",
|
||||
"typescript": "5.9.3",
|
||||
"vite-tsconfig-paths": "6.0.5",
|
||||
"vitest": "5.0.4"
|
||||
"vite": "7.3.8",
|
||||
"vite-tsconfig-paths": "6.1.1",
|
||||
"vitest": "5.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.9.0",
|
||||
@@ -203,7 +204,7 @@
|
||||
"dompurify@<3.4.17": "^3.4.17",
|
||||
"fast-copy@<3.1.0": "^3.1.0",
|
||||
"fast-uri@<3.1.9": "^3.1.9",
|
||||
"graphql-scalars@<2.0.1": "^2.0.1",
|
||||
"happy-dom@<21.0.4": "^21.0.4",
|
||||
"js-yaml@>=4 <4.3.2": "^4.3.2",
|
||||
"source-map-js@<1.2.2": "^1.2.2",
|
||||
"undici@>=7 <7.30.1": "^7.30.1"
|
||||
|
||||
Generated
+1555
-957
File diff suppressed because it is too large
Load Diff
@@ -96,8 +96,13 @@ pnpm add @intecion/ipal-kit @payloadcms/plugin-seo @payloadcms/plugin-form-build
|
||||
**Next.js 16.4.5 or later** (minimum safe version: 16.0.0–16.4.0 have critical advisories, 16.3.0–16.4.4 have
|
||||
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.
|
||||
**Payload 3.94.1** (what the reference site and the starter use; the plugin accepts `^3.90.2`): every `payload` /
|
||||
`@payloadcms/*` on the same exact version, `react` and `react-dom` 19.3.1 (Payload 3.94 requires `^19.3.1`), and
|
||||
**Node.js 22.23.5 or later** on the 22 line (`"engines": { "node": ">=22.23.5 <23" }`, `.nvmrc` `22`) — Payload 3.94's
|
||||
minimum, also in Coolify (Nixpacks picks the patch: check `node -v` in the app's Terminal after the first deploy). After the install, `pnpm audit --prod` → no high or critical; add the `dompurify` and `happy-dom` overrides
|
||||
from AGENT.md §4 item 12 (`"happy-dom@<21.0.4": "^21.0.4"` fixes two high advisories Lexical still brings in). On an
|
||||
older Payload also the `mongoose` (MongoDB) and `undici` ones listed there. `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
|
||||
|
||||
@@ -87,9 +87,33 @@ the banner → `<CookieBanner settings="detailed">` and remove the copy. With `d
|
||||
(a new image ships the fixed next and sharp). **Check:** `pnpm exec ipal-doctor` → no `next-min` finding; `pnpm dev`
|
||||
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).
|
||||
**Every upgrade — Payload** (AGENT.md §4 items 11–12): the reference site and the starter run Payload **3.94.1**; the
|
||||
plugin still accepts `^3.90.2`, so moving is recommended, not forced. To move: every `payload` / `@payloadcms/*` (in
|
||||
`dependencies` and in `pnpm.overrides`) to the same exact version, `react` and `react-dom` to 19.3.1 (Payload 3.94
|
||||
requires `^19.3.1`), Node.js 22.23.5 or later (`"engines": { "node": ">=22.23.5 <23" }`, `.nvmrc` `22`) on every machine and
|
||||
in Coolify — Payload 3.94 refuses older Node. Nixpacks takes only the major from `engines` / `.nvmrc`; the patch comes
|
||||
from the Nixpacks release on the Coolify server, so check `node -v` in the app's Terminal (or the build log) and update
|
||||
Coolify first if it is below 22.23.5 (until then, stay on 3.90.x). Then `pnpm install`, `pnpm payload generate:types`, `pnpm payload generate:importmap`, `rm -rf .next`,
|
||||
build, redeploy. Payload 3.91–3.94 change no schema the plugin defines: no migration from the plugin; on
|
||||
Postgres/SQLite run `pnpm payload migrate:create` anyway and commit it if it is not empty.
|
||||
**Check:** `pnpm ls payload @payloadcms/ui @payloadcms/db-mongodb` → one version, 3.94.1; the panel opens and a document
|
||||
saves; `pnpm exec ipal-doctor` → no `versions` finding; Coolify app → Terminal → `node -v` → 22.23.5 or later.
|
||||
|
||||
**Every upgrade — dependency advisories** (AGENT.md §4 item 12): `pnpm audit --prod`; on Payload 3.94.x add the
|
||||
`dompurify` and `happy-dom` overrides to `pnpm.overrides`; on an older Payload also `mongoose` (MongoDB sites; 3.90–3.93
|
||||
pin 8.24.1, which has a critical advisory, GHSA-pcrw-h46h-c93h, and four more) and `undici` (3.90–3.91):
|
||||
```json
|
||||
"dompurify@<3.4.17": "^3.4.17",
|
||||
"happy-dom@<21.0.4": "^21.0.4",
|
||||
"mongoose@>=8 <8.24.7": "~8.24.10",
|
||||
"undici@>=7 <7.30.1": "^7.30.1"
|
||||
```
|
||||
The selectors match only vulnerable versions, so on 3.94.x the last two do nothing — remove them. A
|
||||
`"graphql-scalars@<2.0.1": "^2.0.1"` line is no longer needed (the advisory no longer covers Payload's 1.22.2); remove
|
||||
it or keep it. Then `pnpm install`, `pnpm build`, commit `package.json` and the lockfile, redeploy on Coolify (no data or
|
||||
schema change, no migration). **Check:** `pnpm audit --prod` → no high or critical; `pnpm why dompurify happy-dom
|
||||
mongoose undici` → 3.4.17, 21.0.4, 8.24.7, 7.30.1 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)
|
||||
@@ -277,6 +301,33 @@ every site below Next.js 16.4.5:**
|
||||
2. `pnpm ipal:skills` (updated `ipal-setup` / `ipal-upgrade`).
|
||||
**Check:** `pnpm ls next` → 16.4.6; `pnpm exec ipal-doctor` → no `next-min` finding; `pnpm dev` prints no security warning.
|
||||
|
||||
**→ 1.16.2 (PROGRAMISTA §6, item 63; Payload's mongoose and happy-dom advisories; AGENT.md §4 item 12) — required for
|
||||
every site:**
|
||||
1. Add to `pnpm.overrides` in `package.json`: `"mongoose@>=8 <8.24.7": "~8.24.10"` (MongoDB sites only) and
|
||||
`"happy-dom@<21.0.4": "^21.0.4"` (every site). Then `pnpm install`, `pnpm build`; commit `package.json` and the
|
||||
lockfile, redeploy on Coolify. No data change, no migration.
|
||||
2. `pnpm ipal:skills` (updated `ipal-setup` / `ipal-upgrade`).
|
||||
**Check:** `pnpm why mongoose happy-dom` → mongoose 8.24.10, happy-dom 21.0.4; `pnpm audit --prod` → no high or critical;
|
||||
`pnpm exec ipal-doctor` → no `transitive-min` finding; open the panel and save a document.
|
||||
|
||||
**→ 1.16.3 (PROGRAMISTA §6, item 64; Payload 3.94.1 in the reference site and the starter; AGENT.md §4 items 11–12) —
|
||||
recommended, not required (the plugin's peer range stays `^3.90.2`):**
|
||||
1. **Node.js 22.23.5 or later first — everywhere the site runs.** Payload 3.94 refuses older Node. Locally: `node -v`.
|
||||
Coolify: Nixpacks takes only the major from `engines` / `.nvmrc`; the patch comes from the Nixpacks release on the
|
||||
server, so open the app → Terminal → `node -v` (or read the build log). Below 22.23.5: update Coolify first, and
|
||||
stay on Payload 3.90.x until then. CI images must resolve to 22.23.5 or later as well.
|
||||
2. Every `payload` / `@payloadcms/*` to 3.94.1 (in `dependencies` and `pnpm.overrides`), `react` and `react-dom` 19.3.1,
|
||||
`"engines": { "node": ">=22.23.5 <23" }` (`.nvmrc` stays `22`). Overrides: keep `"dompurify@<3.4.17": "^3.4.17"`
|
||||
and `"happy-dom@<21.0.4": "^21.0.4"`; remove the `mongoose`, `undici` and `graphql-scalars` lines (they do nothing
|
||||
on 3.94.x). Then `pnpm install`, `pnpm payload generate:types`, `pnpm payload generate:importmap`, `rm -rf .next`,
|
||||
`pnpm build`; commit `package.json` and the lockfile, redeploy on Coolify.
|
||||
3. Postgres/SQLite: `pnpm payload migrate:create`, commit it if it is not empty (3.94.1 changes long index and foreign
|
||||
key names). MongoDB: no migration.
|
||||
4. `pnpm ipal:skills` (updated `ipal-setup` / `ipal-upgrade`).
|
||||
**Check:** `pnpm ls payload @payloadcms/ui @payloadcms/db-mongodb` → 3.94.1; `pnpm why dompurify happy-dom` → 3.4.17,
|
||||
21.0.4; `pnpm audit --prod` → no high or critical; `pnpm exec ipal-doctor` → no `versions` finding; Coolify Terminal
|
||||
`node -v` → 22.23.5 or later; the panel opens, a document saves, a form submission arrives.
|
||||
|
||||
## 2. Inventory (no code changes)
|
||||
**What changed for projects** between your old and new plugin version is exactly the reference site's diff —
|
||||
`git diff v<old> v<new> -- reference/` in the ipal-kit repo (or the two `docs/agent/reference-site/INDEX.md` files):
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ Write everything in this file in English.
|
||||
<!-- /starter:decisions -->
|
||||
|
||||
<!-- ipal-kit:start -->
|
||||
## ipal-kit 1.16.1 — agent guide
|
||||
## ipal-kit 1.16.3 — agent guide
|
||||
|
||||
<!-- Managed by `pnpm exec ipal-skills` — edits between the markers are overwritten. -->
|
||||
This project is built on `@intecion/ipal-kit` (a Payload CMS 3 plugin). Before you write code:
|
||||
|
||||
+27
-28
@@ -5,7 +5,7 @@
|
||||
"description": "Reference site for @intecion/ipal-kit: Example Studio (made-up architecture studio), Payload CMS 3 + Next 16",
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": ">=22 <23"
|
||||
"node": ">=22.23.5 <23"
|
||||
},
|
||||
"packageManager": "[email protected]",
|
||||
"scripts": {
|
||||
@@ -25,29 +25,29 @@
|
||||
"dependencies": {
|
||||
"@clocklimited/payload-2fa": "3.0.0-beta.7",
|
||||
"@intecion/ipal-kit": "file:..",
|
||||
"@payloadcms/db-mongodb": "3.90.2",
|
||||
"@payloadcms/next": "3.90.2",
|
||||
"@payloadcms/plugin-form-builder": "3.90.2",
|
||||
"@payloadcms/plugin-seo": "3.90.2",
|
||||
"@payloadcms/richtext-lexical": "3.90.2",
|
||||
"@payloadcms/storage-s3": "3.90.2",
|
||||
"@payloadcms/ui": "3.90.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"@payloadcms/db-mongodb": "3.94.1",
|
||||
"@payloadcms/next": "3.94.1",
|
||||
"@payloadcms/plugin-form-builder": "3.94.1",
|
||||
"@payloadcms/plugin-seo": "3.94.1",
|
||||
"@payloadcms/richtext-lexical": "3.94.1",
|
||||
"@payloadcms/storage-s3": "3.94.1",
|
||||
"@payloadcms/ui": "3.94.1",
|
||||
"cross-env": "^10.1.0",
|
||||
"graphql": "^16.8.1",
|
||||
"next": "16.4.6",
|
||||
"payload": "3.90.2",
|
||||
"react": "19.3.0",
|
||||
"react-dom": "19.3.0",
|
||||
"payload": "3.94.1",
|
||||
"react": "19.3.1",
|
||||
"react-dom": "19.3.1",
|
||||
"sharp": "0.35.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "1.64.0",
|
||||
"@tailwindcss/postcss": "^4.1.0",
|
||||
"@playwright/test": "1.65.1",
|
||||
"@tailwindcss/postcss": "^4.3.5",
|
||||
"@types/node": "22.20.5",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"postcss": "^8.5.0",
|
||||
"tailwindcss": "^4.1.0",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"postcss": "^8.5.33",
|
||||
"tailwindcss": "^4.3.5",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"pnpm": {
|
||||
@@ -57,17 +57,16 @@
|
||||
"unrs-resolver"
|
||||
],
|
||||
"overrides": {
|
||||
"payload": "3.90.2",
|
||||
"@payloadcms/db-mongodb": "3.90.2",
|
||||
"@payloadcms/next": "3.90.2",
|
||||
"@payloadcms/plugin-form-builder": "3.90.2",
|
||||
"@payloadcms/plugin-seo": "3.90.2",
|
||||
"@payloadcms/richtext-lexical": "3.90.2",
|
||||
"@payloadcms/storage-s3": "3.90.2",
|
||||
"@payloadcms/ui": "3.90.2",
|
||||
"payload": "3.94.1",
|
||||
"@payloadcms/db-mongodb": "3.94.1",
|
||||
"@payloadcms/next": "3.94.1",
|
||||
"@payloadcms/plugin-form-builder": "3.94.1",
|
||||
"@payloadcms/plugin-seo": "3.94.1",
|
||||
"@payloadcms/richtext-lexical": "3.94.1",
|
||||
"@payloadcms/storage-s3": "3.94.1",
|
||||
"@payloadcms/ui": "3.94.1",
|
||||
"dompurify@<3.4.17": "^3.4.17",
|
||||
"graphql-scalars@<2.0.1": "^2.0.1",
|
||||
"undici@>=7 <7.30.1": "^7.30.1"
|
||||
"happy-dom@<21.0.4": "^21.0.4"
|
||||
}
|
||||
},
|
||||
"dependenciesMeta": {
|
||||
|
||||
Generated
+452
-452
File diff suppressed because it is too large
Load Diff
@@ -23,6 +23,11 @@ export type DoctorContext = {
|
||||
importMap: null | string
|
||||
/** Installed version of a package in the project's node_modules, or null. */
|
||||
installed: (name: string) => null | string
|
||||
/**
|
||||
* Every version of a package in the project's dependency tree, direct or transitive: from `pnpm-lock.yaml`
|
||||
* (what a deploy installs), else from `node_modules/.pnpm`, plus the top-level install. Empty when not found.
|
||||
*/
|
||||
installedAll: (name: string) => string[]
|
||||
launched: boolean
|
||||
list: (rel: string) => string[]
|
||||
live: DoctorLive | null
|
||||
@@ -121,6 +126,25 @@ export function createDoctorContext(options: ProjectOptions): DoctorContext {
|
||||
}
|
||||
}
|
||||
|
||||
const installedAll = (name: string) => {
|
||||
const escaped = name.replace(/[.*+?^${}()|[\]\\/]/g, '\\$&')
|
||||
const found = new Set<string>()
|
||||
// pnpm-lock.yaml v6+: ` [email protected]:` keys under packages: / snapshots: (the overrides: block comes before them)
|
||||
const lock = read('pnpm-lock.yaml')
|
||||
const packages = lock.slice(Math.max(0, lock.search(/^packages:\s*$/m)))
|
||||
for (const m of packages.matchAll(new RegExp(`^ {2}'?${escaped}@(\\d+\\.\\d+\\.\\d+[\\w.+-]*)`, 'gm'))) {found.add(m[1])}
|
||||
if (!found.size) {
|
||||
const dir = new RegExp(`^${escaped.replace('\\/', '\\+')}@(\\d+\\.\\d+\\.\\d+[^_(]*)`)
|
||||
for (const entry of list('node_modules/.pnpm')) {
|
||||
const m = entry.match(dir)
|
||||
if (m) {found.add(m[1])}
|
||||
}
|
||||
}
|
||||
const top = installed(name)
|
||||
if (top) {found.add(top)}
|
||||
return [...found]
|
||||
}
|
||||
|
||||
let pkg: DoctorContext['pkg'] = {}
|
||||
try {
|
||||
pkg = JSON.parse(read('package.json') || '{}') as DoctorContext['pkg']
|
||||
@@ -166,6 +190,7 @@ export function createDoctorContext(options: ProjectOptions): DoctorContext {
|
||||
exists,
|
||||
importMap: adminDir ? `${src}app/(payload)/${adminDir}/importMap.js` : null,
|
||||
installed,
|
||||
installedAll,
|
||||
launched: config.launched ?? launchedInAgents,
|
||||
list,
|
||||
live: options.live ?? null,
|
||||
|
||||
@@ -8,6 +8,29 @@ export const NEXT_MIN_SAFE = '16.4.5'
|
||||
/** The version the plugin, the reference site and the starter use. */
|
||||
export const NEXT_RECOMMENDED = '16.4.6'
|
||||
|
||||
/**
|
||||
* Packages from Payload's own dependency tree that Payload pins below a security fix (AGENT.md §4 item 12). Only the
|
||||
* project's lockfile can lift them, with a `pnpm.overrides` entry. `major` limits the check to the line Payload uses.
|
||||
*/
|
||||
export const TRANSITIVE_MIN_SAFE: { major?: number; min: string; name: string; override: string; severity: 'error' | 'warning'; upgrade?: string; why: string }[] = [
|
||||
{
|
||||
name: 'mongoose',
|
||||
major: 8,
|
||||
min: '8.24.7',
|
||||
override: '"mongoose@>=8 <8.24.7": "~8.24.10"',
|
||||
severity: 'error',
|
||||
upgrade: 'upgrade payload and every @payloadcms/* to 3.94.1 (@payloadcms/db-mongodb 3.94.0+ ships 8.24.7), or ',
|
||||
why: 'GHSA-pcrw-h46h-c93h (critical, sanitizeFilter not applied on countDocuments) and four more; @payloadcms/db-mongodb 3.90–3.93 pins 8.24.1',
|
||||
},
|
||||
{
|
||||
name: 'happy-dom',
|
||||
min: '21.0.4',
|
||||
override: '"happy-dom@<21.0.4": "^21.0.4"',
|
||||
severity: 'warning',
|
||||
why: 'GHSA-c8p4-j97h-3vg8 and GHSA-834v-8h66-3h79 (high); comes with @payloadcms/richtext-lexical → @lexical/headless',
|
||||
},
|
||||
]
|
||||
|
||||
export const versionRules: DoctorRule[] = [
|
||||
{
|
||||
id: 'plugin-installed',
|
||||
@@ -58,6 +81,27 @@ export const versionRules: DoctorRule[] = [
|
||||
group: 'versions',
|
||||
source: 'static',
|
||||
},
|
||||
{
|
||||
id: 'transitive-min',
|
||||
check: (ctx) => {
|
||||
const out: RuleFinding[] = []
|
||||
for (const dep of TRANSITIVE_MIN_SAFE) {
|
||||
const old = ctx.installedAll(dep.name).filter((v) => (dep.major === undefined || parseVersion(v)?.[0] === dep.major) && lt(v, dep.min))
|
||||
if (old.length) {
|
||||
out.push({
|
||||
file: 'package.json',
|
||||
fix: `${dep.upgrade ?? ''}add ${dep.override} to pnpm.overrides in package.json, then pnpm install (AGENT.md §4 item 12)`,
|
||||
message: `${dep.name} ${old.join(', ')} < ${dep.min} — ${dep.why}`,
|
||||
severity: dep.severity,
|
||||
})
|
||||
}
|
||||
}
|
||||
return out
|
||||
},
|
||||
docs: 'docs/agent/AGENT.md#4-next-16--rendering-seo-build',
|
||||
group: 'versions',
|
||||
source: 'static',
|
||||
},
|
||||
{
|
||||
id: 'node-22',
|
||||
check: (ctx) => {
|
||||
|
||||
@@ -133,6 +133,34 @@ describe('versions', () => {
|
||||
const silenced = await doctor(at('16.4.3'), ['next-min'], { config: { rules: { 'next-min': { off: true, reason: 'upgrade booked' } } } })
|
||||
expect(silenced.summary).toMatchObject({ error: 0, silenced: 1 })
|
||||
})
|
||||
test('transitive-min: mongoose 8 below 8.24.7 (error) and happy-dom below 21.0.4 (warning), read from the lockfile', async () => {
|
||||
const lock = (mongoose: string, happyDom: string) =>
|
||||
`lockfileVersion: '9.0'\n\noverrides:\n [email protected]: 8.24.1\n\npackages:\n\n happy-dom@${happyDom}:\n resolution: {integrity: x}\n\n [email protected]:\n resolution: {integrity: x}\n\n mongoose@${mongoose}:\n resolution: {integrity: x}\n\nsnapshots:\n\n mongoose@${mongoose}:\n dependencies:\n mongodb: 6.20.0\n`
|
||||
const at = (mongoose: string, happyDom: string) => project({ ...base(), 'pnpm-lock.yaml': lock(mongoose, happyDom) })
|
||||
const old = await doctor(at('8.24.1', '20.14.6'), ['transitive-min'])
|
||||
expect(rules(old)).toEqual(['transitive-min:error', 'transitive-min:warning'])
|
||||
expect(old.findings[0].message).toContain('mongoose 8.24.1 < 8.24.7')
|
||||
expect(old.findings[0].message).toContain('GHSA-pcrw-h46h-c93h')
|
||||
expect(old.findings[0].fix).toContain('"mongoose@>=8 <8.24.7": "~8.24.10"')
|
||||
expect(old.findings[0].fix).toMatch(/^upgrade payload and every @payloadcms\/\* to 3\.94\.1/)
|
||||
expect(old.findings[1].fix).toMatch(/^add "happy-dom/)
|
||||
expect(old.findings[1].message).toContain('happy-dom 20.14.6 < 21.0.4')
|
||||
expect(old.findings[1].fix).toContain('"happy-dom@<21.0.4": "^21.0.4"')
|
||||
// 8.24.3 fixes only the critical one
|
||||
expect(rules(await doctor(at('8.24.6', '21.0.3'), ['transitive-min']))).toEqual(['transitive-min:error', 'transitive-min:warning'])
|
||||
expect(rules(await doctor(at('8.24.7', '21.0.4'), ['transitive-min']))).toEqual([])
|
||||
expect(rules(await doctor(at('8.24.10', '21.1.0'), ['transitive-min']))).toEqual([])
|
||||
// another major line (Payload 4 uses mongoose 9) is not compared with the 8.x minimum
|
||||
expect(rules(await doctor(at('9.11.4', '21.0.4'), ['transitive-min']))).toEqual([])
|
||||
// no MongoDB adapter, no lexical: nothing to report
|
||||
expect(rules(await doctor(project(base()), ['transitive-min']))).toEqual([])
|
||||
const silenced = await doctor(at('8.24.1', '20.14.6'), ['transitive-min'], { config: { rules: { 'transitive-min': { off: true, reason: 'Payload upgrade booked' } } } })
|
||||
expect(silenced.summary).toMatchObject({ error: 0, silenced: 2, warning: 0 })
|
||||
})
|
||||
test('transitive-min: without a pnpm lockfile it reads node_modules/.pnpm', async () => {
|
||||
const root = project({ ...base(), 'node_modules/.pnpm/[email protected][email protected]/node_modules/mongoose/package.json': { name: 'mongoose', version: '8.24.1' } })
|
||||
expect(rules(await doctor(root, ['transitive-min']))).toEqual(['transitive-min:error'])
|
||||
})
|
||||
test('file: / link: specs are not compared', async () => {
|
||||
expect(rules(await doctor(project({ ...base(), 'package.json': pkgJson({ dependencies: { '@intecion/ipal-kit': 'file:..' } }) }), ['plugin-installed']))).toEqual([])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user