This release includes 1 breaking change for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
+8 more
ReleasePort's take
Light signal`CdnDocumentQuery.all()` now returns index entries without the `body` field.
Why it matters: Affects code that relies on `document().all()` returning full documents; update queries to handle missing `body`. Severity 70 indicates significant impact.
Summary
AI summaryBreaking change: CdnDocumentQuery.all() no longer returns documents with a body field.
Changes in this release
| Type | Severity | Summary | CVE |
|---|---|---|---|
| Breaking | High |
`CdnDocumentQuery.all()` now returns index entries without `body` field, breaking previous usage. `CdnDocumentQuery.all()` now returns index entries without `body` field, breaking previous usage. Source: llm_adapter@2026-07-15 Confidence: low |
— |
| Breaking | High |
`CdnDocumentQuery.all()` now returns `DocumentIndexEntry<T>[]`, omitting the `body` field. `CdnDocumentQuery.all()` now returns `DocumentIndexEntry<T>[]`, omitting the `body` field. Source: granite4.1:30b@2026-07-15-audit Confidence: low |
— |
| Breaking | High |
`CdnDocumentQuery.first()` now returns `DocumentIndexEntry<T> | undefined`, no longer including `body`. `CdnDocumentQuery.first()` now returns `DocumentIndexEntry<T> | undefined`, no longer including `body`. Source: granite4.1:30b@2026-07-15-audit Confidence: low |
— |
| Refactor | Medium |
Type-level contracts for document queries are enforced via `*.test-d.ts` using `vitest --typecheck`. Type-level contracts for document queries are enforced via `*.test-d.ts` using `vitest --typecheck`. Source: granite4.1:30b@2026-07-15-audit Confidence: low |
— |
Full changelog
Major Changes
-
d617dab: feat(sdk)!: CDN
document().all()returns index entries, so reading.bodyno longer compilesOn the CDN,
document(model).all()reads the model's_index, which carries
frontmatter only — the body lives in the per-slug document and is reachable via
bySlug(). Butall()was typedPromise<T[]>, and the generated document type
declaresbody: string. Soentry.bodytype-checked, returnedundefinedat
runtime, and pages rendered their headings and dropped their prose — with no
error, no warning, and a passing typecheck.The trap is that the bundled runtime's
all()does carry bodies. Code written
and tested against bundled delivery compiled and passed, then quietly rendered
empty on CDN. The two modes genuinely differ in shape, so they no longer share
one return type.BREAKING:
CdnDocumentQuery.all()now returnsDocumentIndexEntry<T>[]
(Omit<T, 'body'>), andfirst()returnsDocumentIndexEntry<T> | undefined.
Reading.bodyoff either is now a compile error. Fetch the body with
bySlug(slug), which returns{ frontmatter, body, html }. Runtime behaviour is
unchanged — this only makes the types tell the truth about what was already
being returned.// before — compiled, rendered nothing const sections = await client.document<GuideSections>("guide-sections").all(); sections.map((s) => renderMarkdown(s.body)); // undefined at runtime // after — the first line is a compile error; fetch bodies explicitly const index = await client.document<GuideSections>("guide-sections").all(); const full = await Promise.all(index.map((s) => q.bySlug(s.slug))); full.map((d) => renderMarkdown(d!.body));Type-level contracts are now asserted in
*.test-d.tsviavitest --typecheck,
sincetsconfig.jsononly coverssrcand never type-checked the tests.
Breaking Changes
- `CdnDocumentQuery.all()` now returns `DocumentIndexEntry[]` (omitting `body`) and `first()` returns `DocumentIndexEntry | undefined`; reading `.body` is a compile error. Use `bySlug(slug)` to fetch the full document including `body`.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About Contentrain/ai
Local-first MCP server for AI content governance — 13 tools for model/content CRUD, validation, normalization, and i18n across any framework.
Related context
Earlier breaking changes
- v@contentrain/[email protected] `validateModelDefinition` now returns `{ errors, warnings }` instead of a string array.
- v@contentrain/[email protected] `model_save` rejects models with unknown keys, `min > max`, invalid constraints, and `unique` on singletons.
- v@contentrain/[email protected] `content_save` now validates before committing and rejects invalid content.
- v@contentrain/[email protected] `validateModelDefinition` now returns `{ errors, warnings }` instead of a string array.
- v@contentrain/[email protected] `model_save` rejects models with unknown keys, `min > max`, invalid constraints, and `unique` on singletons.
Beta — feedback welcome: [email protected]