From 30c8664c67a93689bee5ef8d9ed69a7b605c5157 Mon Sep 17 00:00:00 2001 From: Benjamin Tran Dinh Date: Tue, 25 Jun 2024 15:48:58 +0200 Subject: [PATCH 1/6] Remove unused dependency `promisify` This removes the `promisify` dependency which is unused. This dependency itself depends on `"when": ""`, which, not declaring a version, breaks certain package managers like Bun. --- packages/schema/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schema/package.json b/packages/schema/package.json index f958ec03f..52f551d4a 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -104,7 +104,6 @@ "ora": "^5.4.1", "pluralize": "^8.0.0", "pretty-repl": "^4.0.0", - "promisify": "^0.0.3", "semver": "^7.5.2", "sleep-promise": "^9.1.0", "strip-color": "^0.1.0", From cdba3ac8129250d8148e0d31412e59a06efbc333 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Thu, 27 Jun 2024 11:19:00 +0200 Subject: [PATCH 2/6] chore: update package lock file --- pnpm-lock.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dfeda8f4e..fda72b597 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -525,9 +525,6 @@ importers: pretty-repl: specifier: ^4.0.0 version: 4.0.0 - promisify: - specifier: ^0.0.3 - version: 0.0.3 semver: specifier: ^7.5.2 version: 7.5.4 @@ -12513,12 +12510,6 @@ packages: resolution: {integrity: sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==} dev: true - /promisify@0.0.3: - resolution: {integrity: sha512-CcBGsRhhq466fsZVyHfptuKqon6eih0CqMsJE0kWIIjbpVNEyDoaKLELm2WVs//W/WXRBHip+6xhTExTkHUwtA==} - dependencies: - when: 3.7.8 - dev: false - /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -15174,10 +15165,6 @@ packages: webidl-conversions: 4.0.2 dev: true - /when@3.7.8: - resolution: {integrity: sha512-5cZ7mecD3eYcMiCH4wtRPA5iFJZ50BJYDfckI5RRpQiktMiYTcn0ccLTZOvcbBume+1304fQztxeNzNS9Gvrnw==} - dev: false - /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: From 9c6453b271d35ed131e65a761dd080744e782982 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:36:15 +0200 Subject: [PATCH 3/6] chore: pin Prisma's minor version --- packages/schema/package.json | 2 +- tests/integration/test-run/package.json | 2 +- .../tests/frameworks/nextjs/test-project/package.json | 2 +- .../integration/tests/frameworks/trpc/test-project/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/schema/package.json b/packages/schema/package.json index 52f551d4a..9f5625341 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -136,7 +136,7 @@ "@zenstackhq/runtime": "workspace:*", "dotenv": "^16.0.3", "esbuild": "^0.15.12", - "prisma": "^5.15.0", + "prisma": "5.15.x", "renamer": "^4.0.0", "tmp": "^0.2.1", "tsc-alias": "^1.7.0", diff --git a/tests/integration/test-run/package.json b/tests/integration/test-run/package.json index 5788cf6d5..acdf9fd7b 100644 --- a/tests/integration/test-run/package.json +++ b/tests/integration/test-run/package.json @@ -12,7 +12,7 @@ "dependencies": { "@prisma/client": "^5.15.0", "@zenstackhq/runtime": "file:../../../packages/runtime/dist", - "prisma": "^5.15.0", + "prisma": "5.15.x", "react": "^18.2.0", "swr": "^1.3.0", "typescript": "^4.9.3", diff --git a/tests/integration/tests/frameworks/nextjs/test-project/package.json b/tests/integration/tests/frameworks/nextjs/test-project/package.json index 1840a40ee..644c5b660 100644 --- a/tests/integration/tests/frameworks/nextjs/test-project/package.json +++ b/tests/integration/tests/frameworks/nextjs/test-project/package.json @@ -22,6 +22,6 @@ "zod": "^3.22.4" }, "devDependencies": { - "prisma": "^5.15.0" + "prisma": "5.15.x" } } diff --git a/tests/integration/tests/frameworks/trpc/test-project/package.json b/tests/integration/tests/frameworks/trpc/test-project/package.json index 550f5d0eb..be2df2a10 100644 --- a/tests/integration/tests/frameworks/trpc/test-project/package.json +++ b/tests/integration/tests/frameworks/trpc/test-project/package.json @@ -26,6 +26,6 @@ "zod": "^3.22.4" }, "devDependencies": { - "prisma": "^5.15.0" + "prisma": "5.15.x" } } From 102ffdbd012417869367a2841f8b39f0a2f94753 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:38:12 +0200 Subject: [PATCH 4/6] chore: update lockfile again --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fda72b597..eee544eff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -608,7 +608,7 @@ importers: specifier: ^0.15.12 version: 0.15.12 prisma: - specifier: ^5.15.0 + specifier: 5.15.x version: 5.15.0 renamer: specifier: ^4.0.0 From 68b2f95f1a98c70ffbfcc300126f803af150d412 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:27:31 +0200 Subject: [PATCH 5/6] chore: pin minor version of all prisma packages --- packages/schema/package.json | 2 +- packages/sdk/package.json | 4 ++-- pnpm-lock.yaml | 6 +++--- tests/integration/test-run/package.json | 2 +- .../tests/frameworks/nextjs/test-project/package.json | 2 +- .../tests/frameworks/trpc/test-project/package.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/schema/package.json b/packages/schema/package.json index 9f5625341..a6d5851c5 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -124,7 +124,7 @@ "prisma": "5.0.0 - 5.15.x" }, "devDependencies": { - "@prisma/client": "^5.15.0", + "@prisma/client": "5.15.x", "@types/async-exit-hook": "^2.0.0", "@types/pluralize": "^0.0.29", "@types/semver": "^7.3.13", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 547cefbb6..bf9d1005e 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -18,8 +18,8 @@ "author": "", "license": "MIT", "dependencies": { - "@prisma/generator-helper": "^5.15.0", - "@prisma/internals": "^5.15.0", + "@prisma/generator-helper": "5.15.x", + "@prisma/internals": "5.15.x", "@zenstackhq/language": "workspace:*", "@zenstackhq/runtime": "workspace:*", "langium": "1.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eee544eff..f21b359bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -572,7 +572,7 @@ importers: version: 1.5.0(zod@3.22.4) devDependencies: '@prisma/client': - specifier: ^5.15.0 + specifier: 5.15.x version: 5.15.0(prisma@5.15.0) '@types/async-exit-hook': specifier: ^2.0.0 @@ -627,10 +627,10 @@ importers: packages/sdk: dependencies: '@prisma/generator-helper': - specifier: ^5.15.0 + specifier: 5.15.x version: 5.15.0 '@prisma/internals': - specifier: ^5.15.0 + specifier: 5.15.x version: 5.15.0 '@zenstackhq/language': specifier: workspace:* diff --git a/tests/integration/test-run/package.json b/tests/integration/test-run/package.json index acdf9fd7b..12af545d3 100644 --- a/tests/integration/test-run/package.json +++ b/tests/integration/test-run/package.json @@ -10,7 +10,7 @@ "author": "", "license": "ISC", "dependencies": { - "@prisma/client": "^5.15.0", + "@prisma/client": "5.15.x", "@zenstackhq/runtime": "file:../../../packages/runtime/dist", "prisma": "5.15.x", "react": "^18.2.0", diff --git a/tests/integration/tests/frameworks/nextjs/test-project/package.json b/tests/integration/tests/frameworks/nextjs/test-project/package.json index 644c5b660..a0c2d4aa1 100644 --- a/tests/integration/tests/frameworks/nextjs/test-project/package.json +++ b/tests/integration/tests/frameworks/nextjs/test-project/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@prisma/client": "^5.15.0", + "@prisma/client": "5.15.x", "@types/node": "18.11.18", "@types/react": "18.0.27", "@types/react-dom": "18.0.10", diff --git a/tests/integration/tests/frameworks/trpc/test-project/package.json b/tests/integration/tests/frameworks/trpc/test-project/package.json index be2df2a10..f0fbffbc3 100644 --- a/tests/integration/tests/frameworks/trpc/test-project/package.json +++ b/tests/integration/tests/frameworks/trpc/test-project/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@prisma/client": "^5.15.0", + "@prisma/client": "5.15.x", "@tanstack/react-query": "^4.22.4", "@trpc/client": "^10.34.0", "@trpc/next": "^10.34.0", From c896b676f5cf3c24e70bf3e1aa470a0278a5ec79 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:11:53 +0200 Subject: [PATCH 6/6] chore: update test scaffold dependency --- script/test-scaffold.ts | 2 +- tests/integration/tests/cli/plugins.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script/test-scaffold.ts b/script/test-scaffold.ts index 4c7a81b51..3d2941ae3 100644 --- a/script/test-scaffold.ts +++ b/script/test-scaffold.ts @@ -19,6 +19,6 @@ function run(cmd: string) { } run('npm init -y'); -run('npm i --no-audit --no-fund typescript prisma @prisma/client zod decimal.js @types/node'); +run('npm i --no-audit --no-fund typescript prisma@5.15.x @prisma/client@5.15.x zod decimal.js @types/node'); console.log('Test scaffold setup complete.'); diff --git a/tests/integration/tests/cli/plugins.test.ts b/tests/integration/tests/cli/plugins.test.ts index 9ef16a31d..462d966c0 100644 --- a/tests/integration/tests/cli/plugins.test.ts +++ b/tests/integration/tests/cli/plugins.test.ts @@ -75,7 +75,7 @@ describe('CLI Plugins Tests', () => { 'swr', '@tanstack/react-query@^5.0.0', '@trpc/server', - '@prisma/client@^5.0.0', + '@prisma/client@5.15.x', `${path.join(__dirname, '../../../../.build/zenstackhq-language-' + ver + '.tgz')}`, `${path.join(__dirname, '../../../../.build/zenstackhq-sdk-' + ver + '.tgz')}`, `${path.join(__dirname, '../../../../.build/zenstackhq-runtime-' + ver + '.tgz')}`, @@ -85,7 +85,7 @@ describe('CLI Plugins Tests', () => { const devDepPkgs = [ 'typescript', '@types/react', - 'prisma@^5.0.0', + 'prisma@5.15.x', `${path.join(__dirname, '../../../../.build/zenstack-' + ver + '.tgz')}`, `${path.join(__dirname, '../../../../.build/zenstackhq-tanstack-query-' + ver + '.tgz')}`, `${path.join(__dirname, '../../../../.build/zenstackhq-swr-' + ver + '.tgz')}`,