Repository navigation
feat(blocks): entries() reads only the index; list() throws - #781
Merged
Merged
Conversation
This was referenced Nov 8, 2026
client.list(type) fetched the body of every block of a type: on a hosted
release one CDN request per block (730 on umbro's sitemap). Sites only
ever needed what the release index already holds, so the client now
answers that from the index alone and never enumerates bodies.
- client.entries(type?): { name, type, path?, refs, noIndex? } for every
typed entry (of type, through its aliases, when given), in code-unit
order of name, with zero block fetches; the same frozen array per index
and type. Answers from the pin once the client pinned, like routes().
- client.list() and ListOptions are gone from the Client type, the root
exports and the client; the list-routing warning and namesOfType go
with them. Entry is exported instead.
- blockMeta computes noIndex (META_VERSION 2): true for a page (a body with
a top-level path) whose seo says noIndexing, inline or through the saved
SEO block it references, resolved by an optional bodyOf. pageNoIndex,
seoNoIndex, BodyOf and META_VERSION are exported from
@decocms/blocks/protocol for Studio's publish; the shared vectors gain
three noIndex cases.
- remoteLoader reads the index's metaVersion (absent or unreadable: 1) and
keeps meta.noIndex; entries() reports noIndex as a boolean only on an
index at meta version 2 or later, and leaves it out on an older one.
- Local content (a snapshot, .deco/blocks, tests, dev) is indexed at
META_VERSION with saved SEO blocks resolved from its own bodies; a
draft's overlay recomputes noIndex for the blocks it sets.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Next.js examples route posts from entries("post") and read the one
post that matched; the blog index lists names and paths from the index.
README and CLAUDE.md describe entries(), noIndex and metaVersion.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The migration never writes client.list(); its imports step now reports
every list() call on a CMS client and every build-time scan of
.deco/blocks as work left, with the fix (entries() from the index, or one
resolve(name)). scripts/checkContentReads.ts exits 1 while a site still
calls list(), and the verify step runs it. The references explain
sitemaps from entries("page") and one saved block per path for big
path-keyed maps.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The two script headers called the removal "the next major"; it ships in the 8.12 minor. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ries() and resolve() Code written against an older @decocms/blocks still calls client.list(); with the member gone it failed only on the typecheck, and a site built without one (or calling it through a wrapper typed loosely) got an opaque "list is not a function". The member is back on Client, @deprecated, with its old signature (ListOptions stays internal to the types), so old code compiles and fails loudly at runtime instead: - CMSClient.list throws LIST_REMOVED at once, before reading the index or fetching anything: it says list() was removed in this version and names the replacements, routes() and redirects() for routing (index only), entries(type) for a type's names, paths, refs and noIndex (index only), and resolve(name) for one body. - list.test.ts: it throws for every type, with or without options, on local content and on a hosted release, fetches nothing and pins no index; an awaited call rejects with the same error; nothing is warned. - The conformance tests assert the deprecated member and its signature instead of its absence; README and CLAUDE.md say 8.12 removed it and that it throws. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…() throws
- deco-make-editable: a collection is read with client.entries(type) and
one client.resolve(name) per document shown, not client.list(type).
- deco-nextjs-site and deco-site-authoring: blog posts are routed from the
{ name, path } of entries("post"); list() was removed and throws.
- deco-v7-to-v8-migration: checkContentReads reports "client.list()
throws" and names routes(), redirects(), entries(type) and
resolve(name); verify, nextjs and hosted-releases say it was removed in
8.12 and still typechecks, so only the check finds a call.
- The skills index is regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ase is read Co-Authored-By: Claude Opus 5.5 <[email protected]>
tlgimenes
force-pushed
the
cdn-cms/entries
branch
from
November 9, 2026 21:23
799419a to
dc1cb5a
Compare
|
🎉 This PR is included in version 8.12.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
What changed
client.entries(type?)answers{ name, type, path?, refs, noIndex? }for every saved block (or one type) from the release index alone: no block body is fetched, and the same frozen array comes back per index and type.client.list()was removed in 8.12. It fetched the body of every block of a type, one CDN request per block on a hosted release (730 requests for one site's sitemap). The member stays onClient, marked@deprecatedwith the same guidance, so old code still compiles. At runtime it throws at once, before any index read, draft read or fetch, on release and draft clients alike.warnRoutedList,LIST_WARNED,resetListWarnings) is gone.The error
Exported as
LIST_REMOVEDfrom the client module.Migration
list("page")to routeroutes()→matchRoute→resolve(name)(index only)list("redirects")redirects()(index only)list("page")for a sitemapentries("page"): paths without:param/*and withoutnoIndexlist<Post>("post", { sort, limit })entries("post"), then oneresolve(name)per post shownentries()What was migrated
packages/blocks:CMSClient.listthrowsLIST_REMOVED;types.tskeeps the deprecated signature; newlist.test.ts(throws for every type, with and without options, on local content, a hosted release and a draft client; fetches nothing, loads nothing and pins no index; an awaited call rejects; the message names the replacements; nothing is warned); conformance tests assert the throw.nextjs-smoke,nextjs-binding-smoke) and guides readentries().entries()and the removal.deco-make-editable,deco-nextjs-site,deco-site-authoringuseentries()+resolve(name);deco-v7-to-v8-migration'scheckContentReads.tsreports eachclient.list()call as "client.list() throws" and namesroutes(),redirects(),entries(type)andresolve(name); its references saylist()was removed in 8.12, throws and still typechecks..agents/skills/README.mdregenerated.🤖 Generated with Claude Code