Skip to content

Releases: zenstackhq/zenstack

ZenStack Release v1.0.0-alpha.102

14 Apr 18:44
cd0cab3
Compare
Choose a tag to compare

What's Changed

  • Fixed wrongly generated types for the groupBy and count hooks from the @zenstackhq/react plugin
  • Fixed CLI checking for plugin setting fields when object syntax is used (reported by @Azzerty23)

Full Changelog: v1.0.0-alpha.99...v1.0.0-alpha.102

ZenStack Release v1.0.0-alpha.99

11 Apr 07:15
4d35a0f
Compare
Choose a tag to compare

What's Changed

  • Fixed VSCode extension error triggered by highlighting content when ZModel contains parse errors
  • Fixed test environment compatibility with Win32 (by @potion-cellar )
  • Added CLI config file support (see here for details)
  • Added security scheme support and a few other configurations for @zenstackhq/openapi plugin
  • Fixed the issue that VSCode extension reports errors for @@openapi.meta attribute
  • Improved @zenstackhq/trpc plugin to wrap Prisma errors into proper trpc errors

Special thanks to @potion-cellar, @Azzerty23, and @jawadst for filing several issues.

Full Changelog: v1.0.0-alpha.98...v1.0.0-alpha.99

ZenStack Release v1.0.0-alpha.98

31 Mar 13:35
e3993c5
Compare
Choose a tag to compare

What's Changed

  • More robust url and payload handling in OpenAPI services (by @potion-cellar)
  • Allow to customize OpenAPI specification version (with the "specVersion" option in plugin, defaults to "3.1.0")
  • Added support to use @tanstack/react-query as data fetcher for "react" plugin (by @jonathangerbaud)
  • zenstack init command now installs ZenStack dependencies with pinned version
  • Added zenstack info command to show package versions and available upgrade
  • Added the missing count hooks for react hooks generation

New Contributors

Full Changelog: v1.0.0-alpha.87...v1.0.0-alpha.98

ZenStack Release v1.0.0-alpha.87

28 Mar 11:43
1008b0e
Compare
Choose a tag to compare

What's Changed

  • Support for implicit many-to-many relations
  • Added attribute functions for filtering on fields in policy expressions: contains, search, startsWith, endsWith, has, hasSome, isEmpty. You can use these functions to write more flexible policy rules, e.g.:
    model Post {
      id String @id
      title String
      @@allow('update', startsWith(title, '[DRAFT]'))
    }
    See detailed documentation here: https://zenstack.dev/docs/reference/zmodel-language#predefined-attribute-functions.
  • Improved consistency in handling undefined and null values in auth() object

Full Changelog: v1.0.0-alpha.85...v1.0.0-alpha.87

v1.0.0-alpha.85

27 Mar 00:20
23180ce
Compare
Choose a tag to compare

What's Changed

  • Upgraded langium dependency (old version results in a StackOverflow error)
  • Added support for Prisma's @@ignore and @ignore attributes
  • VSCode: improved support for @relation field generation

ZenStack Release v1.0.0-alpha.79

19 Mar 15:45
dd3ae27
Compare
Choose a tag to compare

What's Changed

Potential Breaking Changes

  • Prisma relation-related mutations: connect, connectOrCreate, and update now trigger the validation of "update" policy on the relation owner side (since such operations update foreign keys). It wasn't enforced in the previous releases. You may need to adjust access policies accordingly.

E.g.:

model User {
  ...
  posts Post[]
}

model Post {
  ...
  author User? @relation(fields: [authorId], references: [id])
  authorId String?
db.user.create({
  data: {
    posts: { connect: { id: 'post1' } }
  }
});

The above code may fail if Post model is not updatable by the current user.

ZenStack Release v1.0.0-alpha.73

14 Mar 11:38
19253ca
Compare
Choose a tag to compare

What's Changed

  • New OpenAPI plugin for generating OpenAPI V3 specification from zmodel! You can use it to generate a YAML/JSON spec and load it up into tools like swagger-ui. Check here for an example.
  • Adapter for integrating with Fastify: automatic OpenAPI services for CRUD.
  • Fix: make sure zod schemas are lazily loaded to avoid circular dependency issues.

Under the hood, this release includes a unified OpenAPI layer for handling CRUD operations, which is used by the new fastify adapter and will also be the foundation for other upcoming new server-side adapters.

ZenStack Release v1.0.0-alpha.62

09 Mar 07:32
bf9f4cb
Compare
Choose a tag to compare

What's Changed

  • Added @@schema attribute for supporting "multi-schema setup"
  • Fixed code generation issue in monorepo environment
  • Fixed package manager detection issue in monorepro environment

Thanks to @digoburigo for reporting the multi-schema issue.
Thanks to @keanugrieves for reporting mono-repro problems.

ZenStack Release v1.0.0-alpha.60

07 Mar 07:05
d0bb796
Compare
Choose a tag to compare

What's Changed

  • Added support for Prisma type modifier attributes, like @db.Text, @db.Date etc. #236
  • Added support for multi-field @@id #238
  • Added support for self-relations #237
  • Added two attributes that passthrough text to Prisma schema as attributes: @prisma.passthrough, @@prisma.passthrough

ZenStack Release v1.0.0-alpha.55

04 Mar 15:11
fa75f59
Compare
Choose a tag to compare

What's Changed

  • Fixed missing string quote for functional calls inside of attribute #234
  • Fixed the problem that enum field can't be used as relation foreign key #233
  • Allow DateTime field to use ISO datetime string as @default #232