Skip to content

Commit 2a6033f

Browse files
authored
Fix transaction passthrough types, and add linting for examples (#9301)
1 parent 7dda360 commit 2a6033f

File tree

8 files changed

+13
-7
lines changed

8 files changed

+13
-7
lines changed

.github/workflows/tests_ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ jobs:
3131
- name: Prisma Filters
3232
run: pnpm test:filters
3333

34+
linting-examples:
35+
name: Linting
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@main
39+
- uses: ./.github/actions/ci-setup-examples
40+
41+
- name: TypeScript
42+
run: pnpm test:types
43+
3444
unit_tests:
3545
name: Package Unit Tests
3646
runs-on: ubuntu-latest

examples/custom-output-paths/my-types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ export type TypeInfo<Session = any> = {
167167
readonly Post: Lists.Post.TypeInfo<Session>
168168
}
169169
prisma: import('./node_modules/myprisma').PrismaClient
170-
prismaTypes: import('./node_modules/myprisma').Prisma
171170
session: Session
172171
}
173172

examples/extend-graphql-schema-nexus/keystone-types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ export type TypeInfo<Session = any> = {
284284
readonly Author: Lists.Author.TypeInfo<Session>
285285
}
286286
prisma: import('./node_modules/myprisma').PrismaClient
287-
prismaTypes: import('./node_modules/myprisma').Prisma
288287
session: Session
289288
}
290289

packages/core/src/lib/typescript-schema-printer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ export function printGeneratedTypes (
201201
})(),
202202
` }`,
203203
` prisma: import('${prismaClientPath}').PrismaClient`,
204-
` prismaTypes: import('${prismaClientPath}').Prisma`,
205204
` session: Session`,
206205
`}`,
207206
``,

packages/core/src/types/context.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export type KeystoneContext<TypeInfo extends BaseKeystoneTypeInfo = BaseKeystone
3232
options?: {
3333
maxWait?: number
3434
timeout?: number
35-
isolationLevel?: TypeInfo['prismaTypes']['TransactionIsolationLevel']
35+
isolationLevel?: {
36+
Serializable: 'Serializable'
37+
}
3638
}
3739
) => Promise<T>
3840

packages/core/src/types/type-info.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,5 @@ export type KeystoneContextFromListTypeInfo<ListTypeInfo extends BaseListTypeInf
3232
export type BaseKeystoneTypeInfo<Session = any> = {
3333
lists: Record<string, BaseListTypeInfo<Session>>
3434
prisma: any
35-
prismaTypes: any
3635
session: any
3736
}

packages/core/src/types/type-tests.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const someContext: KeystoneContext<{
88
ListOrSingleton: BaseListTypeInfo
99
}
1010
prisma: any
11-
prismaTypes: any
1211
session: any
1312
}> = undefined!
1413

tests/cli-tests/__snapshots__/artifacts.test.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export type TypeInfo<Session = any> = {
148148
readonly Todo: Lists.Todo.TypeInfo<Session>
149149
}
150150
prisma: import('@prisma/client').PrismaClient
151-
prismaTypes: import('@prisma/client').Prisma
152151
session: Session
153152
}
154153

0 commit comments

Comments
 (0)