chore(deps): bump next to 16 and payload to 3.86.0#448
Conversation
|
|
|
View your CI Pipeline Execution ↗ for commit ccb69bf
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Pull request overview
Upgrades the CMS app’s Next.js and Payload stack to satisfy @payloadcms/next@3.86.0’s Next 16 peer requirement, while applying required/related Next 16 + ESLint v16 migration adjustments in the CMS app.
Changes:
- Bump
next/eslint-config-nextto^16.2.10and align all@payloadcms/*+payloadto3.86.0. - Migrate Next 16 routing interception from
middlewaretoproxyconventions in the CMS app. - Update CMS ESLint flat config consumption for
eslint-config-nextv16 and address React Hooks/Compiler rule violations in the palette UI.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updates Next.js, eslint-config-next, Payload, and related @payloadcms/* versions in lockstep. |
| apps/cms/src/proxy.ts | Renames exported entrypoint from middleware to proxy for Next 16 convention while preserving behavior/matcher. |
| apps/cms/src/components/TenantsArrayField.tsx | Avoids mutating clientField by deriving a new field object when capping maxRows. |
| apps/cms/src/components/admin/palette/use-palette-search.ts | Refactors debounced search hook to avoid short-query state updates and align with updated hooks rules. |
| apps/cms/src/components/admin/palette/PaletteDialog.client.tsx | Moves “reset query on close” into an onOpenChange wrapper instead of an effect. |
| apps/cms/next.config.mjs | Moves reactCompiler config to the new top-level location (out of experimental). |
| apps/cms/next-env.d.ts | Regenerates Next env typings to the newer import-based format. |
| apps/cms/eslint.config.mjs | Switches to Next v16’s native flat config import and avoids duplicate import plugin registration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #448 +/- ##
==========================================
+ Coverage 85.58% 85.77% +0.18%
==========================================
Files 62 63 +1
Lines 1124 1139 +15
Branches 240 247 +7
==========================================
+ Hits 962 977 +15
Misses 162 162 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 10 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
apps/cms/src/proxy.ts:8
- Next.js only picks up middleware by convention from
middleware.{ts,js}(e.g.apps/cms/src/middleware.ts) and expects an export namedmiddleware. In this PR the file is nowsrc/proxy.tsand the function isproxy, and there is no remainingmiddleware.tsinapps/cms, so this logic (maintenance mode + draft cookie clearing) will not run at all.
|
✨ Your pull request projects are ready for preview
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
packages/nx-payload/README.md:378
- The compatibility note is ambiguous: “Next.js v15 is also supported from
^2.3.0” reads like a Next.js semver range. It’s clearer to state that Next 15 remains supported (or that support starts with plugin v2.3.0).
> The Next.js column lists the version installed by default. See [Next.js Version](#nextjs-version) for the full supported range (Next.js v15 is also supported from `^2.3.0`).
packages/nx-payload/README.md:382
- The table says the default Next.js version for plugin
^2.3.0is^16.0.0, but the generator constant isnext16Version = '^16.2.10'(packages/nx-payload/src/utils/versions.ts). Align the table with the actual default that gets installed.
| `^2.3.0` | `22.x` | `3.86.0` | `^19.0.0` | `^16.0.0` |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 17 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
packages/nx-payload/README.md:382
- The compatibility table claims the default Next.js version for plugin
^2.3.0is^16.0.0, but the generator default innext16Versionis^16.2.10and the README above also discusses>=16.2.6. This should match the actual installed default to avoid confusion.
| `^2.3.0` | `22.x` | `3.86.0` | `^19.0.0` | `^16.0.0` |
f0844de to
ccb69bf
Compare
Summary
Bumps Next.js 15 → 16 (COD-401). Because
@payloadcms/next@3.86.0requiresnext >=16.2.6 <17and pins the matchingpayloadversion, the whole Payload stack is bumped in lockstep.Dependency changes (root
package.json)next^15.5.15→^16.2.10eslint-config-next^15.5.15→^16.2.10@payloadcms/*+payload3.84.1→3.86.0@nx/next(peernext >=14 <17) and@sentry/nextjs(peer already allows^16) unchanged — already compatibleNext 16 migration
middleware.ts→proxy.ts(middlewarefile convention deprecated in 16; function renamedmiddleware→proxy, matcher/behavior unchanged)experimental.reactCompiler→ top-levelreactCompilerinnext.config.mjs(moved out ofexperimental)withPayload+withSentryConfig(SentryuseRunAfterProductionCompileHookruns)next-env.d.tsregenerated to the Next 16 formatpackage.jsoninto the standalone output (it emits.next/package.json={"type":"commonjs"}instead), so the CommonJSserver.jsalready runs as CJS. Removed the now-obsoletesed 's/"type": "module"/"type": "commonjs"/' package.jsonstep, which broke the image build (sed: can't read package.json). Verifieddocker compose build cmssucceeds and the container boots (▲ Next.js 16.2.10 ✓ Ready).ESLint (eslint-config-next 16)
apps/cms/eslint.config.mjsnow importseslint-config-next/core-web-vitalsdirectly instead of viaFlatCompat/fixupConfigRuleseslint-plugin-react-hooksv6 (React Compiler rules) flagged 4 existing spots; fixed each:use-palette-search.ts— derive the too-short → idle/empty state instead ofsetStatein the effect; move thequeryRefwrite andloadingupdate out of the synchronous effect bodyPaletteDialog.client.tsx— reset query in a wrappedonOpenChangehandler instead of a close effectTenantsArrayField.tsx— build a new field object instead of mutating theclientFieldpropVerification
nx build cms✅ (Turbopack, Sentry hook runs)nx lint cms/nx test cms✅ (remaining 3 warnings are pre-existing)nx affected -t lint test build✅ across all affected projectsdocker compose build cms✅ + container bootsnx verify cmsstill to be run locally🤖 Generated with Claude Code
Fly memory (OOM fix)
The Next 16
next-serverhas a higher memory baseline than 15 and OOM'd on the 512MB Fly VM during admin RSC rendering (FATAL ERROR: ... JavaScript heap out of memory→ SIGABRT → machine reboot → intermittent 502s that recover on refresh). Raised the CMS VM to 1GB infly.toml+fly.production.toml. Verified on the PR-448 preview: re-scaled the live machines to 1GB and replayed the exact load that reliably OOM'd at 512MB — all 200s, no heap error.fly deploydeploys the new image onto existing machines without resizing their guest — so thefly.production.tomlmemory bump in this PR does not resize the running production machines. Productioncdwr-cmsis currently 512MB, and on merge it would run the Next 16 image on 512MB → OOM (same crash as the preview).Before/with merging, resize production to 1GB — apply the
standard-memorypatch viacdwr patch-configtocdwr-cms, or equivalently:(The PR-448 preview was already resized to 1GB this way and verified OOM-free under load.) New/recreated machines pick up 1GB from
fly.production.tomlautomatically; only the in-place resize of existing machines needs this manual step.