Skip to content

Releases: kafkas/typesync

v0.18.0

23 May 20:03
6235f38

Choose a tag to compare

Minor Changes

  • 96a90bb: Add Firestore document-reference schema support, including optional target-model narrowing in generated TypeScript and Zod types, schema validation for referenced models, and integration coverage across TypeScript, Zod, Python, and Swift.

v0.17.0

11 May 21:10
cdda9d7

Choose a tag to compare

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 with generate-ts, optional z.infer type emission, and integration coverage for runtime validation.

v0.16.0

09 May 14:33
2e6f039

Choose a tag to compare

Minor Changes

  • b59e809: Add full Firestore bytes support across Typesync.

    • support bytes in 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

v0.15.0

03 May 20:14
c19cade

Choose a tag to compare

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 @DocumentID properties from the document path (and excludes them from the encoded body), so generated structs are now drop-in usable with getDocument(as:) / setData(from:) without manual edits.
    • New per-document-model option swift.documentIdProperty.name lets you rename the auto-generated @DocumentID property (default: id). Set this when your document body already has a field whose Firestore key is id, since the Firebase iOS SDK refuses to decode a document where the @DocumentID property name matches a body wire key.
    • New per-field option swift.name lets 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 generated CodingKeys enum.
    • The Swift generator now throws when (a) a document model has a body field whose Firestore key matches the @DocumentID property 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 an import FirebaseFirestore statement. Schemas with a body-side id field on a document model must opt in to a non-id @DocumentID property name via swift: { 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.

v0.14.0

26 Apr 18:55
d780194

Choose a tag to compare

Minor Changes

  • 4df7daa: Add runtime Firestore data validation with typesync validate-data.

    This introduces a new validate-data CLI command and typesync.validateData() API for validating live Firestore documents against Zod validators generated from Typesync schema definitions. The command supports targeted validation with repeatable --model flags, 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

30 Dec 20:05

Choose a tag to compare

  • Implemented firebase@11, react-native-firebase@20 and react-native-firebase@19 TS targets.

v0.12.0

30 Dec 19:29

Choose a tag to compare

  • Implemented firebase-admin@10 and firebase-admin@13 targets

v0.11.0

30 Dec 17:34

Choose a tag to compare

  • Implemented the react-native-firebase@21 target

v0.10.0

24 Jun 15:54

Choose a tag to compare

Breaking Changes

  • double types now compile to number in Security Rules type validators
  • Renamed the validatorNamePattern option for the generate-rules command to typeValidatorNamePattern.
  • Renamed the validatorParamName option for the generate-rules command to typeValidatorParamName.

v0.9.0

23 May 09:32

Choose a tag to compare

New Features

  • Implemented the Mermaid graph generator. The generate-graph command will now generate a Mermaid graph for a given schema and inject it into the specified Markdown file.

Breaking Changes

  • Document models are now required to have a path field.