Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release fix/save-prisma-dts #1091

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/release/.release-manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
".": "2.0.0-alpha.1",
"packages/ide/jetbrains": "2.0.0-alpha.2",
"packages/language": "2.0.0-alpha.2",
"packages/misc/redwood": "2.0.0-alpha.2",
"packages/plugins/openapi": "2.0.0-alpha.2",
"packages/plugins/swr": "2.0.0-alpha.2",
"packages/plugins/tanstack-query": "2.0.0-alpha.2",
"packages/plugins/trpc": "2.0.0-alpha.2",
"packages/runtime": "2.0.0-alpha.2",
"packages/sdk": "2.0.0-alpha.2",
"packages/server": "2.0.0-alpha.2",
"packages/testtools": "2.0.0-alpha.2"
".": "2.0.0-alpha.2",
"packages/ide/jetbrains": "2.0.0-alpha.3",
"packages/language": "2.0.0-alpha.3",
"packages/misc/redwood": "2.0.0-alpha.3",
"packages/plugins/openapi": "2.0.0-alpha.3",
"packages/plugins/swr": "2.0.0-alpha.3",
"packages/plugins/tanstack-query": "2.0.0-alpha.3",
"packages/plugins/trpc": "2.0.0-alpha.3",
"packages/runtime": "2.0.0-alpha.3",
"packages/sdk": "2.0.0-alpha.3",
"packages/server": "2.0.0-alpha.3",
"packages/testtools": "2.0.0-alpha.3"
}
27 changes: 23 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
# 0.5.0 (2022-12-15)
# Changelog

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-03-07)


### Bug Fixes

* clean up generation of logical prisma client ([#1082](https://github.com/zenstackhq/zenstack/issues/1082)) ([6e7993a](https://github.com/zenstackhq/zenstack/commit/6e7993afa8dde03ae12c44f198bcca04724dbc92))
* default auth without user context ([#1015](https://github.com/zenstackhq/zenstack/issues/1015)) ([e5b5a0f](https://github.com/zenstackhq/zenstack/commit/e5b5a0fee34e46bee5557229f6f5894629c6ad96))
* foreign key constraint ambiguity in generated delegate prisma schema ([#1060](https://github.com/zenstackhq/zenstack/issues/1060)) ([ca2a314](https://github.com/zenstackhq/zenstack/commit/ca2a314a927053703e4dbc76542499159b8bf6a8))
* **polymorphism:** support `orderBy` with base fields ([#1086](https://github.com/zenstackhq/zenstack/issues/1086)) ([2e81a08](https://github.com/zenstackhq/zenstack/commit/2e81a089a1b57ebf61d25fc49300fa22f0cda06b))
* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))
* several issues with using `auth()` in `[@default](https://github.com/default)` ([#1088](https://github.com/zenstackhq/zenstack/issues/1088)) ([36e515e](https://github.com/zenstackhq/zenstack/commit/36e515e485c580657b9edbfc52014f3542abfb96))


### Performance Improvements

* improve polymorphism code generation speed ([#1073](https://github.com/zenstackhq/zenstack/issues/1073)) ([5b103ba](https://github.com/zenstackhq/zenstack/commit/5b103badea7876b7dfc1da91c26eca3213ddd413))

## 0.5.0 (2022-12-15)

### Features

Expand All @@ -12,7 +31,7 @@

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

# 0.4.0 (2022-12-01)
## 0.4.0 (2022-12-01)

### Features

Expand Down Expand Up @@ -50,7 +69,7 @@

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.

# 0.3.0 (2022-11-08)
## 0.3.0 (2022-11-08)

### Features

Expand All @@ -70,7 +89,7 @@

- Better overall documentation

# 0.2.0 (2022-10-29)
## 0.2.0 (2022-10-29)

### Features

Expand Down
7 changes: 7 additions & 0 deletions packages/ide/jetbrains/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/ide/jetbrains/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "dev.zenstack"
version = "2.0.0-alpha.1"
version = "2.0.0-alpha.3"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion packages/ide/jetbrains/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jetbrains",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"displayName": "ZenStack JetBrains IDE Plugin",
"description": "ZenStack JetBrains IDE plugin",
"homepage": "https://zenstack.dev",
Expand Down
7 changes: 7 additions & 0 deletions packages/language/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
4 changes: 2 additions & 2 deletions packages/language/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/language",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"displayName": "ZenStack modeling language compiler",
"description": "ZenStack modeling language compiler",
"homepage": "https://zenstack.dev",
Expand All @@ -23,7 +23,7 @@
"plist2": "^1.1.3"
},
"dependencies": {
"langium": "1.3.1"
"langium": "1.3.1"
},
"contributes": {
"languages": [
Expand Down
7 changes: 7 additions & 0 deletions packages/misc/redwood/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/misc/redwood/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/redwood",
"displayName": "ZenStack RedwoodJS Integration",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "CLI and runtime for integrating ZenStack with RedwoodJS projects.",
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions packages/plugins/openapi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* clean up generation of logical prisma client ([#1082](https://github.com/zenstackhq/zenstack/issues/1082)) ([6e7993a](https://github.com/zenstackhq/zenstack/commit/6e7993afa8dde03ae12c44f198bcca04724dbc92))
* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/openapi",
"displayName": "ZenStack Plugin and Runtime for OpenAPI",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "ZenStack plugin and runtime supporting OpenAPI",
"main": "index.js",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/plugins/swr/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* clean up generation of logical prisma client ([#1082](https://github.com/zenstackhq/zenstack/issues/1082)) ([6e7993a](https://github.com/zenstackhq/zenstack/commit/6e7993afa8dde03ae12c44f198bcca04724dbc92))
* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/swr/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/swr",
"displayName": "ZenStack plugin for generating SWR hooks",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "ZenStack plugin for generating SWR hooks",
"main": "index.js",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions packages/plugins/tanstack-query/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* clean up generation of logical prisma client ([#1082](https://github.com/zenstackhq/zenstack/issues/1082)) ([6e7993a](https://github.com/zenstackhq/zenstack/commit/6e7993afa8dde03ae12c44f198bcca04724dbc92))
* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/tanstack-query/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/tanstack-query",
"displayName": "ZenStack plugin for generating tanstack-query hooks",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "ZenStack plugin for generating tanstack-query hooks",
"main": "index.js",
"exports": {
Expand Down
8 changes: 8 additions & 0 deletions packages/plugins/trpc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* clean up generation of logical prisma client ([#1082](https://github.com/zenstackhq/zenstack/issues/1082)) ([6e7993a](https://github.com/zenstackhq/zenstack/commit/6e7993afa8dde03ae12c44f198bcca04724dbc92))
* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/trpc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/trpc",
"displayName": "ZenStack plugin for tRPC",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "ZenStack plugin for tRPC",
"main": "index.js",
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions packages/plugins/trpc/tests/projects/t3-trpc-v10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@
"@trpc/next": "^10.43.6",
"@trpc/react-query": "^10.43.6",
"@trpc/server": "^10.43.6",
"@zenstackhq/language": "file:../../../../../../.build/zenstackhq-language-2.0.0-alpha.2.tgz",
"@zenstackhq/runtime": "file:../../../../../../.build/zenstackhq-runtime-2.0.0-alpha.2.tgz",
"@zenstackhq/sdk": "file:../../../../../../.build/zenstackhq-sdk-2.0.0-alpha.2.tgz",
"next": "^14.0.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"superjson": "^2.2.1",
"zenstack": "file:../../../../../../.build/zenstack-2.0.0-alpha.2.tgz",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
11 changes: 11 additions & 0 deletions packages/runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* clean up generation of logical prisma client ([#1082](https://github.com/zenstackhq/zenstack/issues/1082)) ([6e7993a](https://github.com/zenstackhq/zenstack/commit/6e7993afa8dde03ae12c44f198bcca04724dbc92))
* default auth without user context ([#1015](https://github.com/zenstackhq/zenstack/issues/1015)) ([e5b5a0f](https://github.com/zenstackhq/zenstack/commit/e5b5a0fee34e46bee5557229f6f5894629c6ad96))
* **polymorphism:** support `orderBy` with base fields ([#1086](https://github.com/zenstackhq/zenstack/issues/1086)) ([2e81a08](https://github.com/zenstackhq/zenstack/commit/2e81a089a1b57ebf61d25fc49300fa22f0cda06b))
* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))
* several issues with using `auth()` in `[@default](https://github.com/default)` ([#1088](https://github.com/zenstackhq/zenstack/issues/1088)) ([36e515e](https://github.com/zenstackhq/zenstack/commit/36e515e485c580657b9edbfc52014f3542abfb96))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/runtime",
"displayName": "ZenStack Runtime Library",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "Runtime of ZenStack for both client-side and server-side environments.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publisher": "zenstack",
"displayName": "ZenStack Language Tools",
"description": "Build scalable web apps with minimum code by defining authorization and validation rules inside the data schema that closer to the database",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"author": {
"name": "ZenStack Team"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/schema/src/plugins/enhancer/enhance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ export async function generate(model: Model, options: PluginOptions, project: Pr
`export type * from '${logicalPrismaClientDir}/index-fixed';`,
{ overwrite: true }
);
await saveSourceFile(prismaDts, options);
await prismaDts.save();
} else {
// just reexport the prisma client
const prismaDts = project.createSourceFile(
path.join(outDir, 'prisma.d.ts'),
`export type * from '${getPrismaClientImportSpec(outDir, options)}';`,
{ overwrite: true }
);
await saveSourceFile(prismaDts, options);
await prismaDts.save();
}

const enhanceTs = project.createSourceFile(
Expand Down
9 changes: 9 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* clean up generation of logical prisma client ([#1082](https://github.com/zenstackhq/zenstack/issues/1082)) ([6e7993a](https://github.com/zenstackhq/zenstack/commit/6e7993afa8dde03ae12c44f198bcca04724dbc92))
* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))
* several issues with using `auth()` in `[@default](https://github.com/default)` ([#1088](https://github.com/zenstackhq/zenstack/issues/1088)) ([36e515e](https://github.com/zenstackhq/zenstack/commit/36e515e485c580657b9edbfc52014f3542abfb96))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/sdk",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "ZenStack plugin development SDK",
"main": "index.js",
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions packages/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/server",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"displayName": "ZenStack Server-side Adapters",
"description": "ZenStack server-side adapters",
"homepage": "https://zenstack.dev",
Expand Down
9 changes: 9 additions & 0 deletions packages/testtools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [2.0.0-alpha.3](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-03-07)


### Bug Fixes

* clean up generation of logical prisma client ([#1082](https://github.com/zenstackhq/zenstack/issues/1082)) ([6e7993a](https://github.com/zenstackhq/zenstack/commit/6e7993afa8dde03ae12c44f198bcca04724dbc92))
* prisma.d.ts is not properly saved ([c5b9d59](https://github.com/zenstackhq/zenstack/commit/c5b9d59462bc47b6db4cf0139de3663b08700f67))
* several issues with using `auth()` in `[@default](https://github.com/default)` ([#1088](https://github.com/zenstackhq/zenstack/issues/1088)) ([36e515e](https://github.com/zenstackhq/zenstack/commit/36e515e485c580657b9edbfc52014f3542abfb96))

## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/testtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/testtools",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "ZenStack Test Tools",
"main": "index.js",
"private": true,
Expand Down