Skip to content

ZenStack Release v2.1.0

Compare
Choose a tag to compare
@ymc9 ymc9 released this 13 May 12:15
· 8 commits to main since this release
3588a36

New Features

  • Permission Checker #242

    A check API is extended to each model in the enhanced PrismaClient for checking permissions without querying the database. See more details here.

  • auth() is resolved from all loaded schema files #1388

    In the previous release, to use auth() in a ZModel file, you'll need to import the schema file that contains the User model definition (or the model definition marked with @@auth). This release relaxed that requirement: auth() is now resolvable as long as the schema file containing the auth model is reachable through any import. You don't have to explicitly import it from every model now.

  • TanStack-Query and SWR plugins now generate createMany hooks for SQLite when Prisma >= 5.12

  • TRPC plugin now generates createMany procedure for SQLite when Prisma >= 5.12

Fixes and Improvements

  • Fixed several code generation errors for delegate models #1415 #1416
  • Fixed the problem that filters using fields from delegate base models don't work properly when nested inside a logical group #1410
  • ZModel type names (e.g., DateTime) can now be used as field names #1424
  • Fixed the typing inconsistency for Zod schemas generated for fields using auth() in @default() #1378
  • TRPC code gen improvements: make sure type-only imports are only type-imported #1405
  • Fixed the problem that relation fields are included even if select is set to false #1427
  • Fixed incorrect validation error when @@unique attribute is defined in a base model #1430
  • Fixed compatibility with Prisma 5.13's omit feature
  • Fixed query issue with using enums inside access policies #1435
  • The generated TRPC code is now more robust with importing Zod schemas #1406

Full Changelog: v2.0.3...v2.1.0