Releases: kafkas/typesync
v0.18.0
v0.17.0
Minor Changes
- 61089a9: Add
generate-zod, a new generator that emits Zod schemas from Typesync definitions with support for Zod v3 and v4 output.
Generated schemas include.describe(...)metadata, Firestore SDK target handling shared withgenerate-ts, optionalz.infertype emission, and integration coverage for runtime validation.
v0.16.0
Minor Changes
-
b59e809: Add full Firestore
bytessupport across Typesync.- support
bytesin schema definitions, schema conversion, validation, and Zod generation - generate the correct platform-specific bytes types for TypeScript, Python, Swift, and Firestore Rules
- add emulator-backed integration coverage for TypeScript, Python, and Swift bytes round-trips
- support
v0.15.0
Minor Changes
-
af90af1: Switch to the MIT license
-
d0c4a18: Swift: auto-emit
@DocumentID var id: String?on every generated document-model struct, plus two new schema-level overrides for the Swift generator.- The Firebase iOS SDK populates
@DocumentIDproperties from the document path (and excludes them from the encoded body), so generated structs are now drop-in usable withgetDocument(as:)/setData(from:)without manual edits. - New per-document-model option
swift.documentIdProperty.namelets you rename the auto-generated@DocumentIDproperty (default:id). Set this when your document body already has a field whose Firestore key isid, since the Firebase iOS SDK refuses to decode a document where the@DocumentIDproperty name matches a body wire key. - New per-field option
swift.namelets you rename a body property in the generated Swift output without changing its Firestore wire key. Useful for dodging Swift keywords or for ergonomics. The renderer routes the original Firestore key through a generatedCodingKeysenum. - The Swift generator now throws when (a) a document model has a body field whose Firestore key matches the
@DocumentIDproperty name (rename one or the other via the options above), or (b) two body fields resolve to the same Swift property name. Both errors include the offending field names and a concrete remediation.
This is a behavior change for Swift consumers: every generated document struct gains an
id: String?property and animport FirebaseFirestorestatement. Schemas with a body-sideidfield on a document model must opt in to a non-id@DocumentIDproperty name viaswift: { documentIdProperty: { name: 'documentId' } }(or similar) on the document model to keep generating successfully.The new options are structured as per-platform blocks (
swift: { ... }) so future generators (Python, TypeScript, etc.) can layer in their own field-level and model-level overrides without further breaking changes. - The Firebase iOS SDK populates
v0.14.0
Minor Changes
-
4df7daa: Add runtime Firestore data validation with
typesync validate-data.This introduces a new
validate-dataCLI command andtypesync.validateData()API for validating live Firestore documents against Zod validators generated from Typesync schema definitions. The command supports targeted validation with repeatable--modelflags, explicit full-schema validation with--all-models, Firebase Admin credentials, emulator/project overrides, scan limits, JSON output, progress reporting, and full report files.Also adds a shared schema-to-Zod runtime builder that will support future Zod code generation.
v0.13.0
v0.12.0
v0.11.0
v0.10.0
Breaking Changes
doubletypes now compile tonumberin Security Rules type validators- Renamed the
validatorNamePatternoption for thegenerate-rulescommand totypeValidatorNamePattern. - Renamed the
validatorParamNameoption for thegenerate-rulescommand totypeValidatorParamName.