Skip to content

Commit 09ffee1

Browse files
fix(deps): update prisma monorepo to v5.16.0 (#9188)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Cousens <[email protected]>
1 parent 4262e50 commit 09ffee1

File tree

6 files changed

+82
-83
lines changed

6 files changed

+82
-83
lines changed

examples/testing/example-test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ test('Check that trying to create user with no name (required field) fails', asy
3333
})
3434
},
3535
{
36-
message:
37-
'You provided invalid data for this operation.\n - User.name: Name must not be empty',
36+
message: 'You provided invalid data for this operation.\n - User.name: Name must not be empty',
3837
}
3938
)
4039
})

packages/core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@
204204
"@keystone-ui/toast": "workspace:^",
205205
"@keystone-ui/tooltip": "workspace:^",
206206
"@nodelib/fs.walk": "^2.0.0",
207-
"@prisma/client": "5.15.1",
208-
"@prisma/internals": "5.15.1",
209-
"@prisma/migrate": "5.15.1",
207+
"@prisma/client": "5.16.0",
208+
"@prisma/internals": "5.16.0",
209+
"@prisma/migrate": "5.16.0",
210210
"@sindresorhus/slugify": "^1.1.2",
211211
"apollo-upload-client": "^17.0.0",
212212
"bcryptjs": "^2.4.3",
@@ -235,7 +235,7 @@
235235
"meow": "^9.0.0",
236236
"next": "^14.2.0",
237237
"pluralize": "^8.0.0",
238-
"prisma": "5.15.1",
238+
"prisma": "5.16.0",
239239
"prompts": "^2.4.2",
240240
"react": "^18.2.0",
241241
"react-dom": "^18.2.0",

packages/core/src/lib/migrations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function withMigrate<T> (
3030
}) => Promise<T>
3131
) {
3232
const migrate = new Migrate(prismaSchemaPath)
33-
function run <T> (f: () => T): T {
33+
async function run <T> (f: () => T) {
3434
// only required once - on child process start - but easiest to do this always
3535
const prevDBURLFromEnv = process.env.DATABASE_URL
3636
const prevShadowDBURLFromEnv = process.env.SHADOW_DATABASE_URL
@@ -39,7 +39,7 @@ export async function withMigrate<T> (
3939
process.env.DATABASE_URL = system.config.db.url
4040
setOrRemoveEnvVariable('SHADOW_DATABASE_URL', system.config.db.shadowDatabaseUrl)
4141
process.env.PRISMA_HIDE_UPDATE_MESSAGE = '1' // temporarily silence
42-
return f()
42+
return await f()
4343
} finally {
4444
setOrRemoveEnvVariable('DATABASE_URL', prevDBURLFromEnv)
4545
setOrRemoveEnvVariable('SHADOW_DATABASE_URL', prevShadowDBURLFromEnv)

packages/core/src/testing.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { createDatabase, } from '@prisma/internals'
33

44
import { withMigrate } from './lib/migrations'
55

6-
export async function resetDatabase (dbUrl: string, prismaSchemaPath: string) {
7-
await createDatabase(dbUrl, path.dirname(prismaSchemaPath))
6+
export async function resetDatabase (url: string, prismaSchemaPath: string) {
7+
await createDatabase(url, path.dirname(prismaSchemaPath))
88
await withMigrate(prismaSchemaPath, {
99
config: {
1010
db: {
11-
url: dbUrl,
11+
url,
1212
shadowDatabaseUrl: ''
1313
}
1414
},

pnpm-lock.yaml

Lines changed: 71 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/cli-tests/build.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test("start errors when a build hasn't happened", async () => {
2222
await expect(cliMock(cwd, 'start')).rejects.toEqual(new ExitError(1))
2323
expect(recording()).toMatchInlineSnapshot(`
2424
"? Starting Keystone
25-
? keystone build must be run before running keystone start"
25+
? keystone build has not been run"
2626
`)
2727
})
2828

0 commit comments

Comments
 (0)