Skip to content

Commit

Permalink
add tsc linting for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Aug 20, 2024
1 parent 7dda360 commit 1138523
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/tests_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ jobs:
- name: Prisma Filters
run: pnpm test:filters

linting-examples:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/ci-setup-examples

- name: TypeScript
run: pnpm test:types

unit_tests:
name: Package Unit Tests
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion examples/custom-output-paths/my-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ export type TypeInfo<Session = any> = {
readonly Post: Lists.Post.TypeInfo<Session>
}
prisma: import('./node_modules/myprisma').PrismaClient
prismaTypes: import('./node_modules/myprisma').Prisma
session: Session
}

Expand Down
1 change: 0 additions & 1 deletion examples/extend-graphql-schema-nexus/keystone-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ export type TypeInfo<Session = any> = {
readonly Author: Lists.Author.TypeInfo<Session>
}
prisma: import('./node_modules/myprisma').PrismaClient
prismaTypes: import('./node_modules/myprisma').Prisma
session: Session
}

Expand Down
1 change: 0 additions & 1 deletion packages/core/src/lib/typescript-schema-printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ export function printGeneratedTypes (
})(),
` }`,
` prisma: import('${prismaClientPath}').PrismaClient`,
` prismaTypes: import('${prismaClientPath}').Prisma`,
` session: Session`,
`}`,
``,
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/types/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export type KeystoneContext<TypeInfo extends BaseKeystoneTypeInfo = BaseKeystone
options?: {
maxWait?: number
timeout?: number
isolationLevel?: TypeInfo['prismaTypes']['TransactionIsolationLevel']
isolationLevel?: {
Serializable: 'Serializable'
}
}
) => Promise<T>

Expand Down
1 change: 0 additions & 1 deletion tests/cli-tests/__snapshots__/artifacts.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export type TypeInfo<Session = any> = {
readonly Todo: Lists.Todo.TypeInfo<Session>
}
prisma: import('@prisma/client').PrismaClient
prismaTypes: import('@prisma/client').Prisma
session: Session
}
Expand Down

0 comments on commit 1138523

Please sign in to comment.