From 16f783f35259014d210c7f45a54b130384e570c3 Mon Sep 17 00:00:00 2001 From: dennemark Date: Fri, 9 Aug 2024 09:13:01 +0200 Subject: [PATCH] fix: :bug: use prisma version 5.14.0 --- package.json | 8 ++++---- pnpm-lock.yaml | 6 +++--- src/index.ts | 16 +--------------- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 4befdd9..0a68321 100644 --- a/package.json +++ b/package.json @@ -22,19 +22,19 @@ "author": "dennemark", "license": "MIT", "peerDependencies": { - "@prisma/client": "^5.17.0" + "@prisma/client": "^5.14.0" }, "devDependencies": { "@casl/ability": "^6.7.1", "@casl/prisma": "^1.4.1", - "@prisma/client": "^5.17.0", - "@prisma/generator-helper": "^5.17.0", + "@prisma/client": "^5.14.0", + "@prisma/generator-helper": "^5.14.0", "@release-it/conventional-changelog": "^8.0.1", "@types/jest": "^29.5.12", "@types/node": "^22.0.0", "esbuild": "^0.23.0", "jest": "^29.7.0", - "prisma": "^5.17.0", + "prisma": "^5.14.0", "release-it": "^17.6.0", "ts-jest": "^29.2.3", "ts-node": "^10.9.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4ae8ee4..a6be300 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,10 +15,10 @@ importers: specifier: ^1.4.1 version: 1.4.1(@casl/ability@6.7.1)(@prisma/client@5.17.0(prisma@5.17.0)) '@prisma/client': - specifier: ^5.17.0 + specifier: ^5.14.0 version: 5.17.0(prisma@5.17.0) '@prisma/generator-helper': - specifier: ^5.17.0 + specifier: ^5.14.0 version: 5.17.0 '@release-it/conventional-changelog': specifier: ^8.0.1 @@ -36,7 +36,7 @@ importers: specifier: ^29.7.0 version: 29.7.0(@types/node@22.1.0)(ts-node@10.9.2(@types/node@22.1.0)(typescript@5.5.4)) prisma: - specifier: ^5.17.0 + specifier: ^5.14.0 version: 5.17.0 release-it: specifier: ^17.6.0 diff --git a/src/index.ts b/src/index.ts index 2f8802a..3bfd395 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,20 +8,6 @@ import { caslOperationDict, getFluentModel } from './helpers' export { applyCaslToQuery } -type CaslExtensionType = DynamicClientExtensionThis< - Prisma.TypeMap, - Prisma.TypeMapCb, - { - result: {}, - model: {}, - query: {}, - client: {} - }, {}> /** * enrich a prisma client to check for CASL abilities even in nested queries @@ -47,7 +33,7 @@ export function useCaslAbilities(getAbilityFactory: () => AbilityBuilder extendFactory(getAbilityFactory()) - return ctx as CaslExtensionType + return ctx as typeof client } }, query: {