v0.1.4
Fixes
findImporternow resolves entries by their collection, not by scanning stores by ID. PreviouslyfindCollectionForEntrywalked every store and returned the first one whose keys containedentry.id, so two collections sharing an entry ID would silently routerender(entry)to the wrong MDX importer (or throwNo content found for entry "..."if the wrongly-picked collection had no matching slot). The collection is already attached to every entry during store serialization, sofindImporternow readsentry.collectiondirectly. Fixes cl-b2h.
Additions
- New type exports:
InferSchemaOutput<S>andResolveSchema<T>. These were previously inlined inside the generatedsprinkles:contentmodule; lifting them into the package's public types deduplicates the codegen template and lets consumers (and our own type tests) reference the helpers directly. - Type-level tests for schema propagation through
getCollection/getEntry/getEntries/render/reference, wired via Vitest's typecheck mode. These guard against the class of regressions fixed in v0.1.2 and v0.1.3.
Compatibility
No breaking changes. Consumers whose collection IDs already don't collide see no runtime behavior change. The emitted sprinkles:content type declaration now imports InferSchemaOutput and ResolveSchema from @withsprinkles/content-layer — this regenerates automatically on the next vp dev / vp build, no manual action needed.