Skip to content

Releases: zenstackhq/zenstack

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

ZenStack Release v1.0.0-alpha.53

03 Mar 06:51
8675170
Compare
Choose a tag to compare

What's Changed

  • Fixed regression in @zenstackhq/react hooks generator: now when a mutation succeeds but the result can't be read back, hook returns undefined instead of throwing an error
  • Similarly, @zenstackhq/trpc generated routers return undefined when result can't be read back
  • Cleaned up unnecessary peer dependencies in @zenstackhq/runtime
  • When running zenstack init, install Prisma if not found #219
  • VSCode: don't show validation errors when there're syntax errors #221
  • Allow both "PUT" and "PATCH" HTTP verbs for "update" and "updateMany"
  • Fixed support for using empty array as default field value
  • Carry over @@map and @map attributes from zmodel to prisma schema

Please upgrade your VSCode extension too (v1.0.7).

ZenStack Release v1.0.0-alpha.45

19 Feb 05:01
d8afc2e
Compare
Choose a tag to compare

What's Changed

  • fixed incorrect HTTP method for react hooks generated for "upsert" action
  • relation filters, both for *-to-many filter (some/none/every) and *-to-one filter (is/isNot), now recognize access policies
  • fixed bugs around policy evaluation for nested update/delete for to-one relations
  • next.js integration now supports setting a custom logger

ZenStack Release v1.0.0-alpha.40

17 Feb 03:16
311303f
Compare
Choose a tag to compare

What's Changed

  • Pinned "langium" dependency version due to an issue in its latest release

ZenStack Release v1.0.0-alpha.33

11 Feb 10:01
9d2cfc7
Compare
Choose a tag to compare

What's Changed

  • @zenstackhq/react, hooks are generated regardless if a model has access control rules
  • Fixed the issue that triple slash comments cannot be used on some ZModel declarations #194
  • Added support for @@unique constraint with multiple fields #196
  • @zenstackhq/react, fixed error handling in generated hooks code
  • improved VSCode extension's auto-formatting, added code action for adding the opposite side of relations
  • Support using enums as field's default value #204

ZenStack Release v1.0.0-alpha.28

28 Jan 04:03
256815b
Compare
Choose a tag to compare

Road to V1

After listening to the feedback from our enthusiastic early adopters, we've decided to repackage ZenStack's features to meet the following goals:

Enhancing Prisma instead of hiding it

We started to build ZenStack because we really liked Prisma and thought it had more potential than an ORM. In pre-v1 versions, ZenStack tried to inherit the schema language from Prisma but hide it from a tooling point of view.

Feedback showed that fully replicating Prisma CLI didn't add much value. We've decided to focus on extending Prisma's schema where necessary and act like a transpiler that generates Prisma schema file into its standard location and leaves the ORM tasks - sync database schema, seeding database, generating migrations, etc., to the Prisma CLI.

Framework agnostic

Previous versions have a strong binding to Next.js at the surface, although the toolkit's core is independent. For the V1 release, ZenStack will be framework-agnostic, and there'll be integration packages and plugins for interfacing with various popular full-stack frameworks.

Flexible and extensible

The V1 release delivers its main features by wrapping standard PrismaClient instances. You can create an enhanced PrismaClient with features like access control, field validation, and field omission and use it with exactly the same API as regular Prisma.

This level of encapsulation allows more flexibility because you can use ZenStack entirely as a backend toolkit to save time writing explicit authorization code. On the other hand, you can also use it full-stack by leveraging its capability of creating RESTful services and generating client libraries to reduce your entire backend development work to a minimum (if any).

We've also exposed extensibility at the schema language level by introducing the new plugin construct. Users can implement their own plugins for custom code generation with full access to the schema's AST.

Changes

  • Simplified zenstack CLI to do only project initialization and code generation.

  • Added Prisma enhancement APIs - withPolicy, withOmit, withPassword and withPresets.

  • Added plugin construct to ZModel language for implementing custom code generation.

  • Added future() attribute function for accessing an entity's "post-update" state.

  • Extracted Next.js integration to the @zenstackhq/next package.

  • Extracted "react hooks generation" as the @zenstackhq/react plugin that can be enabled on-demand.

  • Added @zenstackhq/trpc plugin for generating tRPC CRUD routers.

  • Triple-slash comments are preserved when generating Prisma schema. Custom attributes are also output as triple-slash comments. It allows interoperability with existing Prisma generators that use the comment hack.

  • VS Code extension now supports auto-formatting.

  • Website is rebuilt with Docusaurus - better readability and better SEO.


We know it's a pretty big change, and would love to hear what you think about it. Please join our discord server and let's chat!

ZenStack Release v0.5.0

16 Dec 09:06
0a2a9b4
Compare
Choose a tag to compare

Features

  • Serialization between client (hooks) and server now uses superjson, [#139]

Fixes and improvements

  • Fixed goto definition issue in VSCode extension, [#69]

Breaking changes

  • Next-auth adapter and helper are moved to a separate package @zenstackhq/next-auth.

ZenStack Release v0.4.0

01 Dec 06:08
158c6de
Compare
Choose a tag to compare

Features

  • zenstack init command for initializing a project, #109, doc.

  • Field constraint suport, #94, doc.

  • Support for server-side CRUD with access policy check (SSR), #126, doc.

  • Options for disabling fetching in hooks (useful when arguments are not ready), #57, doc.

  • Telemetry in CLI, #102, doc.

  • Iron-session based starter, #95, link.

  • Barebone starter (without authentication), link.

  • Website is live!

Fixes and improvements

  • Merge @zenstackhq/internal into @zenstackhq/runtime so as to have a single runtime dependency, #70.

  • More accurate log for access policy violation, #71.

  • auth() function's return type is now resolved to User model in ZModel, instead of Any, #65.

  • Improved ZModel type checking, #67, #46, #99.

  • Upgraded to Prisma 4.7.

Breaking changes

  • @zenstackhq/runtime doesn't export anything now.

    Use @zenstackhq/runtime/types for type definitions shared between client and server, @zenstackhq/runtime/client for client-specific libaries (like React hooks), and @zenstackhq/runtime/server for server-specific libraries.

ZenStack Release v0.3.0

08 Nov 03:29
bb1640b
Compare
Choose a tag to compare

Closes #48 #54 #45 #53 #51 #58

  • More robust policy checks
  • Configurable logging (to stdout and emitting as events)
  • Properly handles complex types like BigInt, Date, Decimal, etc.
  • Makes sure Prisma schema is regenerated for related CLI commands
  • @password and @omit attribute support
  • Lower VSCode engine version requirement for the extension
  • Better overall documentation

ZenStack Release v0.2.4

03 Nov 15:10
5c813e3
Compare
Choose a tag to compare
Pre-release
  • Refactored policy checking and added more integration tests
  • Added new @password and @omit field attributes
  • Cleaned up todo sample's redundant models