Skip to content

Releases: zenstackhq/zenstack

ZenStack Release v3.6.2

23 Apr 00:51
09ca875

Choose a tag to compare

What's Changed

  • [server] Fixed Nuxt typing issue by adding h3 as a peer dependency by @genu #2601.
  • [policy] Fixed invalid SQL when evaluating post-update policies involving fields defined in delegate base models #2595.
  • [orm] Fixed wrong postgres schema usage when querying many-to-many join tables #2603.

Full Changelog: v3.6.1...v3.6.2

ZenStack Release v3.6.1

22 Apr 02:44
14e1d55

Choose a tag to compare

What's Changed

  • [cli] Added a "--random-prisma-schema-name" option to "zen db push" and "zen migrate *" commands to allow running these commands in parallel without conflict by @jesus-gomez-aetonix #2491
  • [orm] Accept plain date strings for mutation input and filter by @lsmith77

New Contributors

Full Changelog: v3.6.0...v3.6.1

ZenStack Release v3.6.0

21 Apr 01:52
31f4c49

Choose a tag to compare

New Features

  • OpenAPI specification generation for RPC-style API doc.
  • Zod schema creation now allows you to control what fields to include/exclude and fields' optionality via options by @marcsigmund doc.
  • Custom types (type declarations) now allow relation fields. You can now declare relations on mixins and share them among models doc.

Breaking Changes

The makeModelSchema API from @zenstackhq/zod package now by default excludes all relation fields.

Improvements and Fixes

  • [orm] Fixed incorrect SQL generation when computed fields are defined on mixins #2540 by @lsmith77.
  • [orm] Improve query performance by using EXISTS instead of COUNT when including to-one relations by @evgenovalov #2578.
  • [orm] Fixed a SQL generation issue when cursor is used with fields inherited from delegate models by @genu #2588.
  • [orm] Fixed the issue that fields annotated with @db.Time are returned as string instead of Date object by @erwan-joly #2589.
  • MySQL support is now graduated from preview to GA.
  • Updated Kysely to its latest version.
  • Migrated bundler from tsup to tsdown.
  • Updated pnpm to its latest version.

New Contributors

Welcome @evgenovalov, @17, and @erwan-joly as our new contributors ❤️ !

Full Changelog: v3.5.6...v3.6.0

ZenStack Release v3.5.6

07 Apr 16:47
39a0a28

Choose a tag to compare

What's Changed

  • [orm] Fixed postgres issue that "distinct" and "orderBy" used together can cause errors #2529
  • [orm] Improved input validation to reject "orderBy" object with multiple keys
  • [tanstack] Fixed typing issue with useInfiniteFindMany query by @motopods #2426

Full Changelog: v3.5.5...v3.5.6

ZenStack Release v3.5.5

04 Apr 23:28
da234ea

Choose a tag to compare

What's Changed

  • [orm] Fixed the type handling of DbNull/JsonNull/AnyNull for typed JSON fields #2411
  • [orm] Fixed Postgres error when making nested queries with relations that have many fields #2524
  • [orm] Fixed "_count" incorrect results when querying self-relations with delegate models #2452

Full Changelog: v3.5.4...v3.5.5

ZenStack Release v3.5.4

03 Apr 17:42
c6c8ad1

Choose a tag to compare

What's Changed

  • [orm] Fixed the handling of And/Or/Not filter clauses with empty objects to be consistent with Prisma behavior by @eredzik
  • [orm] Improved type inference of polymorphic models to provide union type consisting of all sub models by @motopods

New Contributors

  • Welcome @motopods as our new contributor ❤️ !

Full Changelog: v3.5.3...v3.5.4

ZenStack Release v3.5.3

01 Apr 16:34
28ae08d

Choose a tag to compare

What's Changed

  • [orm] Fixed PostgreSQL type mismatch issue when @db.Uuid fields are used in policy expressions #2394
  • [policy] Fixed the issue that currentModel() and currentOperation() functions cannot be resolved in nested context by @wolflu05 #2536

New Contributors

  • Welcome @wolflu05 as our new contributor ❤️ !

Full Changelog: v3.5.2...v3.5.3

ZenStack Release v3.5.2

30 Mar 17:55
9346fe9

Choose a tag to compare

What's Changed

  • [openapi] RESTful OAPI spec generator now generates additional nested query routes by @lsmith77
  • [orm] Fixed the issue that orderBy in nested query is not effective for postgres by @eredzik #2464

New Contributors

Welcome @eredzik as our new contributor ❤️ !

Full Changelog: v3.5.1...v3.5.2

ZenStack Release v3.5.1

25 Mar 04:14
826cc4e

Choose a tag to compare

What's Changed

  • Fixed regression of CLI plugin resolution

Full Changelog: v3.5.0...v3.5.1

ZenStack Release v3.5.0

25 Mar 01:44
49e1fe6

Choose a tag to compare

New Features

  • Client-side computed fields extension by @genu doc
  • OpenAPI specification generator (for RESTful style API only) doc
  • RESTful-style API now supports additional endpoints for nested read and write for related resources by @lsmith77 doc
  • Zod schema generation now supports selecting fields and relations by @marcsigmund doc
  • VSCode extension (v3) now supports generating human-readable documentation for ZModels
    image

Performance

  • ZenStackClient now provides a $diagnostics property containing performance-related metrics doc.
  • Optimized the generated TypeScript schema's typing to improve tsc performance.
  • Eliminated several unnecessary pre-mutation reads to improve mutation performance.
  • Reduced the overhead of post-query data rows processing.
  • Improved many-to-many relation manipulation by batching foreign key updates.

Breaking Changes

  • We've unified field names' casing in ZenStackClient options to "lower-case-first".

    // old
    const db = new ZenStackClient(schema, {
      omit: { User: { ... } },
      computed: { User: { ... } }
    });
    
    // new
    const db = new ZenStackClient(schema, {
      omit: { user: { ... } },
      computed: { user: { ... } }
    });

Fixes and Improvements

  • Unsupported typed fields are now excluded from ORM client since they cannot be represented on the ORM side.
  • Access policy plugin now has an option to allow executing raw SQL (without policy enforcement) by @pkudinov doc
  • Fixed incorrect zod typing for scalar list fields by @haltcase #2499
  • Preserve transaction state when calling $use, $unuse, and $unuseAll by @pkudinov #2494
  • Disallow include on models without relation fields #2488

New Contributors

Welcome @haltcase @elliots @marcsigmund as our new contributors ❤️ !

Full Changelog: v3.4.6...v3.5.0