v0.1.3
Fixes
- Collection data types are no longer widened to
anyin downstream code. The generatedsprinkles:contentmodule referenced@standard-schema/specdirectly, but that package is only a transitive dependency — consumers don't list it, so the import silently resolved toanyand cascaded intoDataEntry<any>. The generated module now referencesStandardSchemaV1through@withsprinkles/content-layer(which every consumer already has) and inlines its own_InferSchemaOutputhelper to read a schema's~standard.types.outputwithout a third-party import. reference()now preserves the collection string literal. Previouslyreference("authors")returned a schema producing{ collection: string; id: string }, which meantgetEntry(post.data.author)widened to the union of all collections instead of resolving to the target collection's entry type.reference<C extends string>(collection: C)now returnsReferenceSchema<C>, sopost.data.author.collectionis"authors"andgetEntry(post.data.author)returnsCollectionEntry<"authors">.
Exports
StandardSchemaV1is now re-exported as a type from the package root so generated types and advanced consumers can reference it without importing@standard-schema/specdirectly.
Compatibility
No breaking runtime changes. Consumers who were relying on the old any-widened types may see new type errors surface — these were always real bugs being masked.