Repository navigation
cli(feat): Payload v4 (canary) compatibility spike - #601
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (94)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Payload 4 is in canary (4.0.0-canary.37) and every install into a v4 project was refused. Allow major 4 in both support-matrix targets and in every manifest (payloadMajors [3, 4], payload peer "^3.0.0 || ^4.0.0-0"), the component template, and the `new` scaffold. Widening the ranges alone was not enough: semver.intersects without includePrerelease tests each comparator on its own, so "<5.0.0-0" rejects 4.0.0-canary.37 and a pinned prerelease never intersects "^4.0.0-0". The "-0" bounds on every required range keep prereleases inside their major. detectProject now names an unsupported Payload or Next.js major instead of reporting "Unsupported project shape", which is what a v4 project got. The base Pages collection gains an explicit readVersions (signed-in only). Payload 4 inherits read access for versions (payloadcms/payload#17634), so visitors could list every previously published version. Payload 3 already requires a user here, so this is a no-op on v3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…resh smoke create-payload-app 4 renamed --version to --payload-version. Its argument parser is permissive, so the old flag was silently dropped and a smoke pinned to 4.0.0-canary.37 scaffolded whatever the `canary` dist-tag resolved to. Pass the flag each major reads, and both for a dist-tag. create-payload-app 4 also downloads its template from the payloadcms/payload main branch instead of the release it installs. Main had already renamed createLocalReq (payloadcms/payload#18287, after canary.37 shipped), so the pinned scaffold failed tsc in the template's own seed route. Pin a v4 template to the release tag with --branch when that tag exists; v3 keeps its CLI's 3.x branch and needs no network check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The nightly fresh smoke follows Payload `latest`, so nothing exercised the next major before it ships. Run the same bare and website scenarios against `npm view payload@canary version` on Node.js 24 (Payload 4 requires 24.15+), schedule-only and with continue-on-error, outside pr-gate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…support matrix related-posts (#600) landed declaring Payload 3 only, so once Payload 4 is allowed it would be the one component refusing v4 projects. Give it the same supports and peer range as every other manifest; manifest-only, so the versioned-source contract needs no version bump. payload-components-support-matrix.int.spec.ts makes this class of drift fail: every manifest, the component template and the `new` scaffold must declare exactly the Payload and Next.js majors their targets allow, with peer ranges that cover each major's stable line and the newest Payload major's prereleases. A v3-only fixture keeps the guard from passing vacuously. buildManifest is exported so the scaffold's output can be checked directly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ducksss
force-pushed
the
claude/payload-v4-canary-spike
branch
from
October 4, 2026 10:02
41ec387 to
4c94489
Compare
Ducksss
marked this pull request as ready for review
October 4, 2026 14:16
Merged
Ducksss
added a commit
that referenced
this pull request
Oct 10, 2026
New minor. The related-posts article component (#600) and experimental Payload 4 support (#601) have landed on main since v1.6.1, while npm still serves 1.6.1. The site already documents `npx payload-components add related-posts`, but the 1.6.1 CLI doesn't know the component, so the command fails for npm users until this ships. Runtime dependencies are unchanged (ajv, semver). Co-authored-by: Claude Opus 5.5 <[email protected]>
Ducksss
added a commit
that referenced
this pull request
Oct 10, 2026
hero-aurora, hero-kinetic, hero-video, integration-marquee and logo-cloud-marquee pinned `motion: ^12.0.0`, so `payload-components add` installed motion 12 even though direct shadcn installs, whose registry lists plain `motion`, already get 13. Widen the range to `^12.0.0 || ^13.0.0`. Motion 13's only breaking change drops the optional @emotion/is-prop-valid prop filter, which these components never relied on. The APIs they use from motion/react (motion, animate, useInView, useMotionValue, useReducedMotion, useSpring, useTransform, useScroll) are unchanged. 13.5 only moves useScroll offsets onto the main thread. Dependabot's #611, which moves the site to motion 13.5, already rendered all five green, including the visual specs. Manifest-only change, so no version bump, as with the #601 range sweep. Existing installs keep working and need no update. Co-authored-by: Claude Opus 5.5 <[email protected]>
Ducksss
added a commit
that referenced
this pull request
Oct 11, 2026
#611 merged as motion 14.0.0. Dependabot updated the PR from 13.5 after #617 was written, so the site now runs motion 14 while the five motion components still declared `^12.0.0 || ^13.0.0`. Widen them to `^12.0.0 || ^13.0.0 || ^14.0.0` so `payload-components add` installs what the site renders and tests. Motion 14.0.0's only breaking change removes internal APIs that 13.5.1 had restored for framer-motion compatibility. The public motion/react APIs these components use are unchanged in 14.0 and 14.1. #611's CI passed on 14.0.0, and the full int suite here compiles the shipped source against it. Manifest-only, so no version bump, as with #601 and #617. Co-authored-by: Claude Opus 5.5 <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft spike: what Payload 4 breaks, and the smallest changes that make the catalog install into it. Payload 4 is in canary (
4.0.0-canary.37). Without this branch,payload-components addrefuses every v4 project, and on v4 GA day the nightly smoke (which followslatest) would go red.What broke, and the fix
4.0.0-canary.37add(detect)Unsupported project shapeallowedPayloadMajors: [3]in both targets; the major mismatch fell through to the file-shape error[3, 4];detectProjectnow names an unsupported Payload or Next.js majoradd(manifest)does not support Payload major version 4payloadMajors: [3][3, 4]in all 82 manifests, the component template and thenewscaffoldadd(peer check)4.0.0-canary.37never satisfies^3.0.0 || ^4.0.0-0semver.intersectswithoutincludePrereleasechecks<5.0.0-0on its own and rejects every prerelease^3.0.0 || ^4.0.0-0plusincludePrerelease(the-0bounds keep prereleases inside their major)--versionto--payload-version; its arg parser is permissivenext/seed/route.ts: 'payload' does not exist in type 'Args'(template code)main, which renamedcreateLocalReq(#18287) after canary.37 shipped--branchwhen the tag existsGET /api/pages/versions(confirmed on canary.37)readfor versions (#17634)readVersionson the basePages; a no-op on v3, where versions already need a userNo component source changed. All 82 shipped components compile, build and render on v4 unmodified.
Verification (local, Node 22.22 with engine warnings; Payload 4 asks for 24.15+)
SMOKE_PAYLOAD_VERSION=4.0.0-canary.37 pnpm test:fresh -- --scenario bare: passes (blank template,init --scaffold, two blocks,tscon TypeScript 6.0.3).payload run,payload build,next start, 20/20 rendered).tscclean,payload buildclean, 79/79 page blocks rendered in Chromium with no page or console errors,doctorall ok,diff82 clean,removeand re-addclean.pnpm run test:int(810 passed),pnpm lint,pnpm format:check,pnpm exec tsc --noEmit. v3 behaviour is unchanged; the PR smoke still pins 3.88.0.Optional CI commit
payload-canary-smokeruns the bare and four website scenarios nightly againstnpm view payload@canary version. It runs on Node 24 with Postgres like the gating smoke, is schedule-only withcontinue-on-error, and sits outsidepr-gate. Drop the last commit if you would rather not carry it.Not in this PR
createdBy/updatedBy, #17247) and the request-API rename, so expect churn on the next canary. That is what the nightly job is for.next/link,next/imageandnext/headers, so it would need its own target.localizerefuses the single-localelocalizationblock every v4 blank project now ships unless--forceis passed.🤖 Generated with Claude Code