Repository navigation
feat!: remove heuristic role cascades (R1b) - #23
Conversation
🦋 Changeset detectedLatest commit: e710a5a The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
TanStack is on CodeRabbit Free, which includes PR summaries. Ask your admin to upgrade for code reviews.
Walkthrough
|
93a9a48 to
a3acc49
Compare
a3acc49 to
8553f16
Compare
c409c56 to
1a864e0
Compare
1a864e0 to
7dcb118
Compare
7dcb118 to
33e0766
Compare
Chain step 3 of the linear merge chain onto main 3b4a112: this PR's own changes, resolved against the PRs before it in the merge order. Co-authored-by: jherr <jherr@pobox.com>
33e0766 to
e710a5a
Compare
Implements cms-refactor-plan.md § 8 / Track R1b.
Merge chain: step 3 of 24. Base:
main. Merge it right after #44. The branch ismain3b4a112, then one commit for each PR before this one in the merge order, then this PR's own commit33e0766(treeda67296).What
cmsHeadandcmsJsonLdno longer guess the description, image, date or author from field names, and no longer take them from the first block.titleField.getSummaryFieldandgetBylineFieldreturn only the declared role.title, and post cards read only declared roles.renderBlockToHtmlin ui-dom now uses the same field names as the React renderer and the docs:image.image(wassrc) andcallout.markdown(wasbody).collections-and-fields.md:imagefield is the image;markdownorrichtextfield that isn't the summary is the body;blocksfield holds the blocks;slugis the slug.seoCascadeFieldscount drops from 9 to 0.remove-role-cascades.mdnames the silent behaviour change and points to the codemod.Breaking changes (silent)
Undeclared roles go blank, with no error. A collection that doesn't declare
summaryField,bylineFieldordateField, or has noimagefield, loses:datePublishedand the JSON-LD author;To fix, run
pnpm codemod explicit-roles <app>before upgrading.ui-dom block field renames. Blocks that store
image.srcorcallout.bodymust rename those fields.Divergence from plan
pagecollections in the blog, blog-voting, payload, astro-starlight, emdash and wordpress examples and the themed-smb-site starter. Their description and image came from the first block, which is a banned cross-role fallback, and they have no document field to declare as the role. Those snapshot entries are updated, and the changeset tells users to add anseoField()or a declared summary or image field.dateFieldrole (added in R1a). It replaces thepublishedDate/publishAt/datename cascade.cms-connect-atproto, and the editor sizing forexcerpt/descriptionin ui-react. Both are name heuristics outside role resolution.Assumptions (tasks 8–12 defaults): none.
How verified
nx affectedwith the CItest:prtargets, plustest:dts,test:dialectsandtest:scripts.cms-apioxlint error thatmainalready has.Merge chain (local verification, CI down)
This PR's commits are squashed into one commit on the linear merge chain. That commit holds this PR's own changes, resolved against every PR before it, with the integration rehearsal's fixes for this PR applied. No conflicts.
The chain tip's tree is exactly the integration rehearsal plus #46 (
c4e6d7c), and the tip passes the full local suite. I simulated merging every PR in order, with a merge commit or a fast-forward at each step, and every step is clean. A plain squash of the next PR would conflict, because the squash commit isn't an ancestor of the next branch. To squash instead, first rebase the branch's one commit onto the newmain; that rebase is always clean.Summary by CodeRabbit