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: upgrade to Prisma 5.14.0 #1477

Merged
merged 3 commits into from
Jun 2, 2024
Merged
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
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"zod-validation-error": "^1.5.0"
},
"peerDependencies": {
"@prisma/client": "5.0.0 - 5.13.x"
"@prisma/client": "5.0.0 - 5.14.x"
},
"author": {
"name": "ZenStack Team"
Expand Down
6 changes: 3 additions & 3 deletions packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@
"zod-validation-error": "^1.5.0"
},
"peerDependencies": {
"prisma": "5.0.0 - 5.13.x"
"prisma": "5.0.0 - 5.14.x"
},
"devDependencies": {
"@prisma/client": "^5.13.0",
"@prisma/client": "^5.14.0",
"@types/async-exit-hook": "^2.0.0",
"@types/pluralize": "^0.0.29",
"@types/semver": "^7.3.13",
Expand All @@ -137,7 +137,7 @@
"@zenstackhq/runtime": "workspace:*",
"dotenv": "^16.0.3",
"esbuild": "^0.15.12",
"prisma": "^5.13.0",
"prisma": "^5.14.0",
"renamer": "^4.0.0",
"tmp": "^0.2.1",
"tsc-alias": "^1.7.0",
Expand Down
8 changes: 3 additions & 5 deletions packages/schema/tests/generator/prisma-generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ describe('Prisma generator test', () => {
provider = 'postgresql'
url = env("DATABASE_URL")
directUrl = env("DATABASE_URL")
shadowDatabaseUrl = env("DATABASE_URL")
extensions = [pg_trgm, postgis(version: "3.3.2"), uuid_ossp(map: "uuid-ossp", schema: "extensions")]
schemas = ["auth", "public"]
}
Expand Down Expand Up @@ -67,7 +66,6 @@ describe('Prisma generator test', () => {
expect(content).toContain('provider = "postgresql"');
expect(content).toContain('url = env("DATABASE_URL")');
expect(content).toContain('directUrl = env("DATABASE_URL")');
expect(content).toContain('shadowDatabaseUrl = env("DATABASE_URL")');
expect(content).toContain(
'extensions = [pg_trgm, postgis(version: "3.3.2"), uuid_ossp(map: "uuid-ossp", schema: "extensions")]'
);
Expand Down Expand Up @@ -253,9 +251,9 @@ describe('Prisma generator test', () => {
expect(content).toContain(`@@map("_Role")`);
expect(content).toContain(`@map("admin")`);
expect(content).toContain(`@map("customer")`);
expect(content).toContain('/// Admin role documentation line 1\n' +
' /// Admin role documentation line 2\n' +
' ADMIN');
expect(content).toContain(
'/// Admin role documentation line 1\n' + ' /// Admin role documentation line 2\n' + ' ADMIN'
);
});

it('attribute passthrough', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ describe('Datasource Validation Tests', () => {
cause: [
{ message: 'datasource must include a "provider" field' },
{ message: 'datasource must include a "url" field' },
]
}
})
],
},
});
});

it('dup fields', async () => {
Expand Down Expand Up @@ -63,14 +63,6 @@ describe('Datasource Validation Tests', () => {
}
`)
).toContain('"url" must be set to a string literal or an invocation of "env" function');

expect(
await loadModelWithError(`
datasource db {
shadowDatabaseUrl = 123
}
`)
).toContain('"shadowDatabaseUrl" must be set to a string literal or an invocation of "env" function');
});

it('invalid relationMode value', async () => {
Expand All @@ -96,7 +88,6 @@ describe('Datasource Validation Tests', () => {
datasource db {
provider = "postgresql"
url = "url"
shadowDatabaseUrl = "shadow"
relationMode = "prisma"
}
`);
Expand All @@ -105,7 +96,6 @@ describe('Datasource Validation Tests', () => {
datasource db {
provider = "postgresql"
url = env("url")
shadowDatabaseUrl = env("shadowUrl")
relationMode = "foreignKeys"
}
`);
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"author": "",
"license": "MIT",
"dependencies": {
"@prisma/generator-helper": "^5.13.0",
"@prisma/internals": "^5.13.0",
"@prisma/generator-helper": "^5.14.0",
"@prisma/internals": "^5.14.0",
"@zenstackhq/language": "workspace:*",
"@zenstackhq/runtime": "workspace:*",
"langium": "1.3.1",
Expand Down
118 changes: 55 additions & 63 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/integration/test-run/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"@prisma/client": "^5.13.0",
"@prisma/client": "^5.14.0",
"@zenstackhq/runtime": "file:../../../packages/runtime/dist",
"prisma": "^5.13.0",
"prisma": "^5.14.0",
"react": "^18.2.0",
"swr": "^1.3.0",
"typescript": "^4.9.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@prisma/client": "^5.13.0",
"@prisma/client": "^5.14.0",
"@types/node": "18.11.18",
"@types/react": "18.0.27",
"@types/react-dom": "18.0.10",
Expand All @@ -22,6 +22,6 @@
"zod": "^3.22.4"
},
"devDependencies": {
"prisma": "^5.13.0"
"prisma": "^5.14.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@prisma/client": "^5.13.0",
"@prisma/client": "^5.14.0",
"@tanstack/react-query": "^4.22.4",
"@trpc/client": "^10.34.0",
"@trpc/next": "^10.34.0",
Expand All @@ -26,6 +26,6 @@
"zod": "^3.22.4"
},
"devDependencies": {
"prisma": "^5.13.0"
"prisma": "^5.14.0"
}
}
Loading