From 40e85b75615e5dd6837e3265d99c3b228387b5f1 Mon Sep 17 00:00:00 2001 From: Daniel Cousens <413395+dcousens@users.noreply.github.com> Date: Tue, 20 Aug 2024 17:09:10 +1000 Subject: [PATCH] Update CodeSandbox versions, and fix prisma client paths for `examples/` (continuation of #9300) (#9302) --- examples/assets-local/sandbox.config.json | 2 +- examples/auth/sandbox.config.json | 2 +- .../custom-admin-ui-logo/sandbox.config.json | 2 +- .../sandbox.config.json | 2 +- .../custom-admin-ui-pages/sandbox.config.json | 2 +- examples/custom-esbuild/sandbox.config.json | 2 +- .../custom-field-view/sandbox.config.json | 2 +- examples/custom-field/sandbox.config.json | 2 +- examples/custom-id/sandbox.config.json | 2 +- .../custom-id/{seed-data.tsx => seed-data.ts} | 2 +- .../custom-output-paths/sandbox.config.json | 2 +- examples/custom-output-paths/schema.graphql | 232 ------------------ examples/custom-output-paths/schema.prisma | 20 -- .../sandbox.config.json | 2 +- .../custom-session-jwt/sandbox.config.json | 2 +- .../sandbox.config.json | 2 +- examples/custom-session-next-auth/session.ts | 6 +- examples/custom-session/sandbox.config.json | 2 +- examples/default-values/sandbox.config.json | 2 +- examples/document-field/sandbox.config.json | 2 +- examples/empty-lists/sandbox.config.json | 2 +- .../extend-express-app/sandbox.config.json | 2 +- .../sandbox.config.json | 2 +- .../sandbox.config.json | 2 +- .../sandbox.config.json | 2 +- .../sandbox.config.json | 2 +- .../extend-prisma-schema/sandbox.config.json | 2 +- examples/field-groups/sandbox.config.json | 2 +- examples/framework-astro/keystone.ts | 1 - examples/framework-astro/sandbox.config.json | 2 +- examples/framework-remix/keystone.ts | 1 - examples/graphql-ts-gql/sandbox.config.json | 2 +- examples/hooks/sandbox.config.json | 2 +- examples/limits/sandbox.config.json | 2 +- examples/omit/sandbox.config.json | 2 +- examples/reuse/sandbox.config.json | 2 +- examples/script/sandbox.config.json | 2 +- examples/singleton/sandbox.config.json | 2 +- .../singleton/{seed-data.tsx => seed-data.ts} | 2 +- examples/testing/sandbox.config.json | 2 +- examples/transactions/sandbox.config.json | 2 +- .../sandbox.config.json | 2 +- examples/usecase-blog/sandbox.config.json | 2 +- .../sandbox.config.json | 2 +- examples/usecase-roles/sandbox.config.json | 2 +- examples/usecase-todo/sandbox.config.json | 2 +- .../usecase-versioning/sandbox.config.json | 2 +- examples/virtual-field/sandbox.config.json | 2 +- tests/examples-smoke-tests/utils.ts | 2 +- 49 files changed, 47 insertions(+), 301 deletions(-) rename examples/custom-id/{seed-data.tsx => seed-data.ts} (95%) delete mode 100644 examples/custom-output-paths/schema.graphql delete mode 100644 examples/custom-output-paths/schema.prisma rename examples/singleton/{seed-data.tsx => seed-data.ts} (93%) diff --git a/examples/assets-local/sandbox.config.json b/examples/assets-local/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/assets-local/sandbox.config.json +++ b/examples/assets-local/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/auth/sandbox.config.json b/examples/auth/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/auth/sandbox.config.json +++ b/examples/auth/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-admin-ui-logo/sandbox.config.json b/examples/custom-admin-ui-logo/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-admin-ui-logo/sandbox.config.json +++ b/examples/custom-admin-ui-logo/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-admin-ui-navigation/sandbox.config.json b/examples/custom-admin-ui-navigation/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-admin-ui-navigation/sandbox.config.json +++ b/examples/custom-admin-ui-navigation/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-admin-ui-pages/sandbox.config.json b/examples/custom-admin-ui-pages/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-admin-ui-pages/sandbox.config.json +++ b/examples/custom-admin-ui-pages/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-esbuild/sandbox.config.json b/examples/custom-esbuild/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-esbuild/sandbox.config.json +++ b/examples/custom-esbuild/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-field-view/sandbox.config.json b/examples/custom-field-view/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-field-view/sandbox.config.json +++ b/examples/custom-field-view/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-field/sandbox.config.json b/examples/custom-field/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-field/sandbox.config.json +++ b/examples/custom-field/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-id/sandbox.config.json b/examples/custom-id/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-id/sandbox.config.json +++ b/examples/custom-id/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-id/seed-data.tsx b/examples/custom-id/seed-data.ts similarity index 95% rename from examples/custom-id/seed-data.tsx rename to examples/custom-id/seed-data.ts index 890bb439e28..3559adb24b4 100644 --- a/examples/custom-id/seed-data.tsx +++ b/examples/custom-id/seed-data.ts @@ -1,7 +1,7 @@ import { getContext } from '@keystone-6/core/context' import { persons, tasks } from '../example-data' import config from './keystone' -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' export async function main () { const context = getContext(config, PrismaModule) diff --git a/examples/custom-output-paths/sandbox.config.json b/examples/custom-output-paths/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-output-paths/sandbox.config.json +++ b/examples/custom-output-paths/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-output-paths/schema.graphql b/examples/custom-output-paths/schema.graphql deleted file mode 100644 index fc3788e549e..00000000000 --- a/examples/custom-output-paths/schema.graphql +++ /dev/null @@ -1,232 +0,0 @@ -# This file is automatically generated by Keystone, do not modify it manually. -# Modify your Keystone config when you want to change this. - -type Post { - id: ID! - title: String - content: String - publishDate: DateTime -} - -scalar DateTime @specifiedBy(url: "https://datatracker.ietf.org/doc/html/rfc3339#section-5.6") - -input PostWhereUniqueInput { - id: ID -} - -input PostWhereInput { - AND: [PostWhereInput!] - OR: [PostWhereInput!] - NOT: [PostWhereInput!] - id: IDFilter - title: StringFilter - content: StringFilter - publishDate: DateTimeNullableFilter -} - -input IDFilter { - equals: ID - in: [ID!] - notIn: [ID!] - lt: ID - lte: ID - gt: ID - gte: ID - not: IDFilter -} - -input StringFilter { - equals: String - in: [String!] - notIn: [String!] - lt: String - lte: String - gt: String - gte: String - contains: String - startsWith: String - endsWith: String - not: NestedStringFilter -} - -input NestedStringFilter { - equals: String - in: [String!] - notIn: [String!] - lt: String - lte: String - gt: String - gte: String - contains: String - startsWith: String - endsWith: String - not: NestedStringFilter -} - -input DateTimeNullableFilter { - equals: DateTime - in: [DateTime!] - notIn: [DateTime!] - lt: DateTime - lte: DateTime - gt: DateTime - gte: DateTime - not: DateTimeNullableFilter -} - -input PostOrderByInput { - id: OrderDirection - title: OrderDirection - content: OrderDirection - publishDate: OrderDirection -} - -enum OrderDirection { - asc - desc -} - -input PostUpdateInput { - title: String - content: String - publishDate: DateTime -} - -input PostUpdateArgs { - where: PostWhereUniqueInput! - data: PostUpdateInput! -} - -input PostCreateInput { - title: String - content: String - publishDate: DateTime -} - -""" -The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). -""" -scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf") - -type Mutation { - createPost(data: PostCreateInput!): Post - createPosts(data: [PostCreateInput!]!): [Post] - updatePost(where: PostWhereUniqueInput!, data: PostUpdateInput!): Post - updatePosts(data: [PostUpdateArgs!]!): [Post] - deletePost(where: PostWhereUniqueInput!): Post - deletePosts(where: [PostWhereUniqueInput!]!): [Post] -} - -type Query { - posts(where: PostWhereInput! = {}, orderBy: [PostOrderByInput!]! = [], take: Int, skip: Int! = 0, cursor: PostWhereUniqueInput): [Post!] - post(where: PostWhereUniqueInput!): Post - postsCount(where: PostWhereInput! = {}): Int - keystone: KeystoneMeta! -} - -type KeystoneMeta { - adminMeta: KeystoneAdminMeta! -} - -type KeystoneAdminMeta { - lists: [KeystoneAdminUIListMeta!]! - list(key: String!): KeystoneAdminUIListMeta -} - -type KeystoneAdminUIListMeta { - key: String! - itemQueryName: String! - listQueryName: String! - hideCreate: Boolean! - hideDelete: Boolean! - path: String! - label: String! - singular: String! - plural: String! - description: String - initialColumns: [String!]! - pageSize: Int! - labelField: String! - fields: [KeystoneAdminUIFieldMeta!]! - groups: [KeystoneAdminUIFieldGroupMeta!]! - initialSort: KeystoneAdminUISort - isHidden: Boolean! - isSingleton: Boolean! -} - -type KeystoneAdminUIFieldMeta { - path: String! - label: String! - description: String - isOrderable: Boolean! - isFilterable: Boolean! - isNonNull: [KeystoneAdminUIFieldMetaIsNonNull!] - fieldMeta: JSON - viewsIndex: Int! - customViewsIndex: Int - createView: KeystoneAdminUIFieldMetaCreateView! - listView: KeystoneAdminUIFieldMetaListView! - itemView(id: ID): KeystoneAdminUIFieldMetaItemView - search: QueryMode -} - -enum KeystoneAdminUIFieldMetaIsNonNull { - read - create - update -} - -type KeystoneAdminUIFieldMetaCreateView { - fieldMode: KeystoneAdminUIFieldMetaCreateViewFieldMode! -} - -enum KeystoneAdminUIFieldMetaCreateViewFieldMode { - edit - hidden -} - -type KeystoneAdminUIFieldMetaListView { - fieldMode: KeystoneAdminUIFieldMetaListViewFieldMode! -} - -enum KeystoneAdminUIFieldMetaListViewFieldMode { - read - hidden -} - -type KeystoneAdminUIFieldMetaItemView { - fieldMode: KeystoneAdminUIFieldMetaItemViewFieldMode - fieldPosition: KeystoneAdminUIFieldMetaItemViewFieldPosition -} - -enum KeystoneAdminUIFieldMetaItemViewFieldMode { - edit - read - hidden -} - -enum KeystoneAdminUIFieldMetaItemViewFieldPosition { - form - sidebar -} - -enum QueryMode { - default - insensitive -} - -type KeystoneAdminUIFieldGroupMeta { - label: String! - description: String - fields: [KeystoneAdminUIFieldMeta!]! -} - -type KeystoneAdminUISort { - field: String! - direction: KeystoneAdminUISortDirection! -} - -enum KeystoneAdminUISortDirection { - ASC - DESC -} diff --git a/examples/custom-output-paths/schema.prisma b/examples/custom-output-paths/schema.prisma deleted file mode 100644 index 29f51889e92..00000000000 --- a/examples/custom-output-paths/schema.prisma +++ /dev/null @@ -1,20 +0,0 @@ -// This file is automatically generated by Keystone, do not modify it manually. -// Modify your Keystone config when you want to change this. - -datasource sqlite { - url = env("DATABASE_URL") - shadowDatabaseUrl = env("SHADOW_DATABASE_URL") - provider = "sqlite" -} - -generator client { - provider = "prisma-client-js" - output = "node_modules/.myprisma/client" -} - -model Post { - id String @id @default(cuid()) - title String @default("") - content String @default("") - publishDate DateTime? -} diff --git a/examples/custom-session-invalidation/sandbox.config.json b/examples/custom-session-invalidation/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-session-invalidation/sandbox.config.json +++ b/examples/custom-session-invalidation/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-session-jwt/sandbox.config.json b/examples/custom-session-jwt/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-session-jwt/sandbox.config.json +++ b/examples/custom-session-jwt/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-session-next-auth/sandbox.config.json b/examples/custom-session-next-auth/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-session-next-auth/sandbox.config.json +++ b/examples/custom-session-next-auth/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/custom-session-next-auth/session.ts b/examples/custom-session-next-auth/session.ts index 88f60c24205..7554d714072 100644 --- a/examples/custom-session-next-auth/session.ts +++ b/examples/custom-session-next-auth/session.ts @@ -20,10 +20,10 @@ async function getKeystoneContext () { // TODO: this could probably be better _keystoneContext = getContext( (await import('./keystone')).default, - // We use the prisma client from the .myprisma folder in order to support multiple Prisma Clients in our examples - // your project will only have one Prisma Client, so you can use the following instead: - // await import('@prisma/client') + + // WARNING: this is only needed for our monorepo examples, dont do this await import('myprisma') + // await import('@prisma/client') // <-- do this ) if (process.env.NODE_ENV !== 'production') { (globalThis as any)._keystoneContext = _keystoneContext diff --git a/examples/custom-session/sandbox.config.json b/examples/custom-session/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/custom-session/sandbox.config.json +++ b/examples/custom-session/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/default-values/sandbox.config.json b/examples/default-values/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/default-values/sandbox.config.json +++ b/examples/default-values/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/document-field/sandbox.config.json b/examples/document-field/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/document-field/sandbox.config.json +++ b/examples/document-field/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/empty-lists/sandbox.config.json b/examples/empty-lists/sandbox.config.json index ecd53f91829..c5d3215212f 100644 --- a/examples/empty-lists/sandbox.config.json +++ b/examples/empty-lists/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "18" + "node": "20" } } diff --git a/examples/extend-express-app/sandbox.config.json b/examples/extend-express-app/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/extend-express-app/sandbox.config.json +++ b/examples/extend-express-app/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/extend-graphql-schema-graphql-tools/sandbox.config.json b/examples/extend-graphql-schema-graphql-tools/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/extend-graphql-schema-graphql-tools/sandbox.config.json +++ b/examples/extend-graphql-schema-graphql-tools/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/extend-graphql-schema-graphql-ts/sandbox.config.json b/examples/extend-graphql-schema-graphql-ts/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/extend-graphql-schema-graphql-ts/sandbox.config.json +++ b/examples/extend-graphql-schema-graphql-ts/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/extend-graphql-schema-nexus/sandbox.config.json b/examples/extend-graphql-schema-nexus/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/extend-graphql-schema-nexus/sandbox.config.json +++ b/examples/extend-graphql-schema-nexus/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/extend-graphql-subscriptions/sandbox.config.json b/examples/extend-graphql-subscriptions/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/extend-graphql-subscriptions/sandbox.config.json +++ b/examples/extend-graphql-subscriptions/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/extend-prisma-schema/sandbox.config.json b/examples/extend-prisma-schema/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/extend-prisma-schema/sandbox.config.json +++ b/examples/extend-prisma-schema/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/field-groups/sandbox.config.json b/examples/field-groups/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/field-groups/sandbox.config.json +++ b/examples/field-groups/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/framework-astro/keystone.ts b/examples/framework-astro/keystone.ts index ed6a805ac64..d034eac859f 100644 --- a/examples/framework-astro/keystone.ts +++ b/examples/framework-astro/keystone.ts @@ -18,7 +18,6 @@ export default config({ url: 'file:./keystone.db', // WARNING: this is only needed for our monorepo examples, dont do this - // we use using myprisma, not .myprisma, because vite prismaClientPath: 'node_modules/myprisma', }, server: { diff --git a/examples/framework-astro/sandbox.config.json b/examples/framework-astro/sandbox.config.json index e9f31bfe998..4176c9f3853 100644 --- a/examples/framework-astro/sandbox.config.json +++ b/examples/framework-astro/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev && npm run dev", - "node": "16" + "node": "20" } } diff --git a/examples/framework-remix/keystone.ts b/examples/framework-remix/keystone.ts index ddd2c40feb8..bfd9d8ddfae 100644 --- a/examples/framework-remix/keystone.ts +++ b/examples/framework-remix/keystone.ts @@ -12,7 +12,6 @@ export default config({ url: `file:${process.cwd()}/keystone.db`, // WARNING: this is only needed for our monorepo examples, dont do this - // we use using myprisma, not .myprisma, because vite prismaClientPath: 'node_modules/myprisma', }, server: { diff --git a/examples/graphql-ts-gql/sandbox.config.json b/examples/graphql-ts-gql/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/graphql-ts-gql/sandbox.config.json +++ b/examples/graphql-ts-gql/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/hooks/sandbox.config.json b/examples/hooks/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/hooks/sandbox.config.json +++ b/examples/hooks/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/limits/sandbox.config.json b/examples/limits/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/limits/sandbox.config.json +++ b/examples/limits/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/omit/sandbox.config.json b/examples/omit/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/omit/sandbox.config.json +++ b/examples/omit/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/reuse/sandbox.config.json b/examples/reuse/sandbox.config.json index ecd53f91829..c5d3215212f 100644 --- a/examples/reuse/sandbox.config.json +++ b/examples/reuse/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "18" + "node": "20" } } diff --git a/examples/script/sandbox.config.json b/examples/script/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/script/sandbox.config.json +++ b/examples/script/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/singleton/sandbox.config.json b/examples/singleton/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/singleton/sandbox.config.json +++ b/examples/singleton/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/singleton/seed-data.tsx b/examples/singleton/seed-data.ts similarity index 93% rename from examples/singleton/seed-data.tsx rename to examples/singleton/seed-data.ts index 9d37dd5bbd0..2149a91083d 100644 --- a/examples/singleton/seed-data.tsx +++ b/examples/singleton/seed-data.ts @@ -1,7 +1,7 @@ import { getContext } from '@keystone-6/core/context' import { posts } from '../example-data' import config from './keystone' -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' type PostProps = { title: string diff --git a/examples/testing/sandbox.config.json b/examples/testing/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/testing/sandbox.config.json +++ b/examples/testing/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/transactions/sandbox.config.json b/examples/transactions/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/transactions/sandbox.config.json +++ b/examples/transactions/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/usecase-blog-moderated/sandbox.config.json b/examples/usecase-blog-moderated/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/usecase-blog-moderated/sandbox.config.json +++ b/examples/usecase-blog-moderated/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/usecase-blog/sandbox.config.json b/examples/usecase-blog/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/usecase-blog/sandbox.config.json +++ b/examples/usecase-blog/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/usecase-relationship-union/sandbox.config.json b/examples/usecase-relationship-union/sandbox.config.json index ecd53f91829..c5d3215212f 100644 --- a/examples/usecase-relationship-union/sandbox.config.json +++ b/examples/usecase-relationship-union/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "18" + "node": "20" } } diff --git a/examples/usecase-roles/sandbox.config.json b/examples/usecase-roles/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/usecase-roles/sandbox.config.json +++ b/examples/usecase-roles/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/usecase-todo/sandbox.config.json b/examples/usecase-todo/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/usecase-todo/sandbox.config.json +++ b/examples/usecase-todo/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/examples/usecase-versioning/sandbox.config.json b/examples/usecase-versioning/sandbox.config.json index ecd53f91829..c5d3215212f 100644 --- a/examples/usecase-versioning/sandbox.config.json +++ b/examples/usecase-versioning/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "18" + "node": "20" } } diff --git a/examples/virtual-field/sandbox.config.json b/examples/virtual-field/sandbox.config.json index 7a34682ee45..c5d3215212f 100644 --- a/examples/virtual-field/sandbox.config.json +++ b/examples/virtual-field/sandbox.config.json @@ -2,6 +2,6 @@ "template": "node", "container": { "startScript": "keystone dev", - "node": "16" + "node": "20" } } diff --git a/tests/examples-smoke-tests/utils.ts b/tests/examples-smoke-tests/utils.ts index f06cc7ff25f..58da6b0fd40 100644 --- a/tests/examples-smoke-tests/utils.ts +++ b/tests/examples-smoke-tests/utils.ts @@ -18,7 +18,7 @@ export async function loadIndex (page: playwright.Page) { } async function deleteAllData (projectDir: string) { - const { PrismaClient } = require(path.join(projectDir, 'node_modules/.myprisma/client')) + const { PrismaClient } = require(path.join(projectDir, 'node_modules/myprisma')) const prisma = new PrismaClient() await prisma.$transaction(