Releases: zenstackhq/zenstack
ZenStack Release v1.0.0-alpha.33
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
@@uniqueconstraint 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
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
zenstackCLI to do only project initialization and code generation. -
Added Prisma enhancement APIs -
withPolicy,withOmit,withPasswordandwithPresets. -
Added
pluginconstruct 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/nextpackage. -
Extracted "react hooks generation" as the
@zenstackhq/reactplugin that can be enabled on-demand. -
Added
@zenstackhq/trpcplugin 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
ZenStack Release v0.4.0
Features
-
zenstack initcommand for initializing a project, #109, 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.
-
Barebone starter (without authentication), link.
-
Website is live!
Fixes and improvements
-
Merge
@zenstackhq/internalinto@zenstackhq/runtimeso as to have a single runtime dependency, #70. -
More accurate log for access policy violation, #71.
-
auth()function's return type is now resolved toUsermodel in ZModel, instead ofAny, #65. -
Upgraded to Prisma 4.7.
Breaking changes
-
@zenstackhq/runtimedoesn't export anything now.Use
@zenstackhq/runtime/typesfor type definitions shared between client and server,@zenstackhq/runtime/clientfor client-specific libaries (like React hooks), and@zenstackhq/runtime/serverfor server-specific libraries.
ZenStack Release v0.3.0
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
@passwordand@omitattribute support- Lower VSCode engine version requirement for the extension
- Better overall documentation
ZenStack Release v0.2.4
- Refactored policy checking and added more integration tests
- Added new
@passwordand@omitfield attributes - Cleaned up todo sample's redundant models
ZenStack Release v0.2.1
ZenStack Release v0.2.1 (2022-10-29)
Initial public release for ZenStack cli and runtime packages
New Features
ZModeldata modeling schema (an extension to Prisma Schema)zenstackcli for generating RESTful services, auth adapters and React hooks fromZModel- Policy engine that transforms policy rules into Prisma query conditions
- Runtime packages
- An initial set of tests