Skip to content

Commit

Permalink
Update prisma monorepo to v3.1.1 (minor) (keystonejs#6625)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored Sep 23, 2021
1 parent 71ca5f7 commit 5e62702
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 89 deletions.
6 changes: 6 additions & 0 deletions .changeset/stale-fireants-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystone-next/keystone': patch
'@keystone-next/prisma-utils': patch
---

Update Prisma dependency to `3.1.1`.
8 changes: 4 additions & 4 deletions packages/keystone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
"@keystone-ui/toast": "^4.0.3",
"@keystone-ui/tooltip": "^4.0.2",
"@preconstruct/next": "^3.0.0",
"@prisma/client": "3.0.2",
"@prisma/migrate": "3.0.2",
"@prisma/sdk": "3.0.2",
"@prisma/client": "3.1.1",
"@prisma/migrate": "3.1.1",
"@prisma/sdk": "3.1.1",
"@sindresorhus/slugify": "^1.1.2",
"@types/apollo-upload-client": "14.1.0",
"@types/babel__core": "^7.1.16",
Expand Down Expand Up @@ -111,7 +111,7 @@
"pirates": "^4.0.1",
"pluralize": "^8.0.0",
"prettier": "^2.4.1",
"prisma": "3.0.2",
"prisma": "3.1.1",
"prompts": "^2.4.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
4 changes: 2 additions & 2 deletions prisma-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"main": "dist/prisma-utils.cjs.js",
"dependencies": {
"@prisma/generator-helper": "3.0.2",
"@prisma/sdk": "3.0.2",
"@prisma/generator-helper": "3.1.1",
"@prisma/sdk": "3.1.1",
"fs-extra": "^10.0.0",
"prettier": "^2.4.1"
},
Expand Down
24 changes: 14 additions & 10 deletions tests/admin-ui-tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import fetch from 'node-fetch';
import execa from 'execa';
import _treeKill from 'tree-kill';
import * as playwright from 'playwright';
import { findRootSync } from '@manypkg/find-root';
import dotenv from 'dotenv';

const treeKill = promisify(_treeKill);
Expand All @@ -20,7 +19,7 @@ const promiseSignal = (): Promise<void> & { resolve: () => void } => {
});
return Object.assign(promise, { resolve: resolve as any });
};
const projectRoot = findRootSync(process.cwd());
const projectRoot = path.resolve(__dirname, '..', '..');

// Light wrapper around node-fetch for making graphql requests to the graphql api of the test instance.
export const makeGqlRequest = async (query: string, variables?: Record<string, any>) => {
Expand Down Expand Up @@ -48,17 +47,22 @@ export function generateDataArray(map: (key: number) => any, range: number) {
}

export const deleteAllData: (projectDir: string) => Promise<void> = async (projectDir: string) => {
const { PrismaClient } = require(path.resolve(
projectRoot,
projectDir,
'node_modules/.prisma/client'
));
const resolvedProjectDir = path.resolve(projectRoot, projectDir);
const prevCwd = process.cwd;
try {
process.cwd = () => {
return resolvedProjectDir;
};
const { PrismaClient } = require(path.join(resolvedProjectDir, 'node_modules/.prisma/client'));

let prisma = new PrismaClient();
let prisma = new PrismaClient();

await Promise.all(Object.values(prisma).map((x: any) => x?.deleteMany?.()));
await Promise.all(Object.values(prisma).map((x: any) => x?.deleteMany?.({})));

await prisma.$disconnect();
await prisma.$disconnect();
} finally {
process.cwd = prevCwd;
}
};

export const adminUITests = (
Expand Down
2 changes: 1 addition & 1 deletion tests/api-tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const expectPrismaError = (
args.map(({ path, message, code, target }) => ({
extensions: {
code: 'INTERNAL_SERVER_ERROR',
prisma: { clientVersion: '3.0.2', code, meta: { target } },
prisma: { clientVersion: '3.1.1', code, meta: { target } },
},
path,
message,
Expand Down
16 changes: 12 additions & 4 deletions tests/examples-smoke-tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ import _treeKill from 'tree-kill';
import * as playwright from 'playwright';

async function deleteAllData(projectDir: string) {
const { PrismaClient } = require(path.join(projectDir, 'node_modules/.prisma/client'));
const prevCwd = process.cwd;
try {
process.cwd = () => {
return projectDir;
};
const { PrismaClient } = require(path.join(projectDir, 'node_modules/.prisma/client'));

let prisma = new PrismaClient();
let prisma = new PrismaClient();

await Promise.all(Object.values(prisma).map((x: any) => x?.deleteMany?.()));
await Promise.all(Object.values(prisma).map((x: any) => x?.deleteMany?.({})));

await prisma.$disconnect();
await prisma.$disconnect();
} finally {
process.cwd = prevCwd;
}
}

const treeKill = promisify(_treeKill);
Expand Down
141 changes: 73 additions & 68 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2041,40 +2041,40 @@
resolved "https://registry.yarnpkg.com/@preconstruct/next/-/next-3.0.0.tgz#71781cbaecd011f43e456a149817094a43e4755f"
integrity sha512-G90cyJX9w4Zr3Bt/j2fURgDhsJb5+agqf4YUgrvDe3Dyvbbssy9a6d0tzLH0ehfa2Osxw/EEhQb+W4X+v/x06A==

"@prisma/client@3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-3.0.2.tgz#f04d9b252f3d0c6918df43ad228eac27d03f6db1"
integrity sha512-6SrDYY2Yr5AmYpVB3XAXFqfzxKMdDTemXR7FmfXthnxWhQHoBwRLNZ3B3GyI/MmWa5tr+kaaGDJjp1LU0vuYvQ==
"@prisma/client@3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-3.1.1.tgz#f4012631528049c22d12b212846dcf503db33cfe"
integrity sha512-8ud8vVFMIg37yrkZ4wPpjKoMxFbCL0Pesq5eyLnag/s0LTKsVEN7ZBIQq9JzWW+AUqOzGKXr2Jt4Sl8xdGI99w==
dependencies:
"@prisma/engines-version" "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
"@prisma/engines-version" "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"

"@prisma/debug@2.30.3":
version "2.30.3"
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-2.30.3.tgz#2c10a4aa4c99728d0f13d64036eca9521352b0d4"
integrity sha512-hMsCl6ZA718vgKuTRd1+qeetzGSVkZEIEUTfeT5rPtklgqDytQ01nRNN74gLeoSI64tyGg/pvSX1wgAioMuyiQ==
"@prisma/debug@3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-3.0.2.tgz#a99ae8dfa075f4e58a25666d609deb900820c5be"
integrity sha512-D2/LghEqphW6h9ycT8nfdEw2rzT0LXmikBy2101aYcY28vS01rHTVIUOiz/DDaltlqY1qBat3F5vgM+6GwIqbw==
dependencies:
"@types/debug" "4.1.7"
debug "4.3.2"
ms "2.1.3"

"@prisma/debug@3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-3.0.2.tgz#a99ae8dfa075f4e58a25666d609deb900820c5be"
integrity sha512-D2/LghEqphW6h9ycT8nfdEw2rzT0LXmikBy2101aYcY28vS01rHTVIUOiz/DDaltlqY1qBat3F5vgM+6GwIqbw==
"@prisma/debug@3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-3.1.1.tgz#1e9739715465d25c09d21d5c3ed9516694eb7602"
integrity sha512-KCpckIAxYnf3wJ6wa2HkdwK7JZdgwr00T5QulC6dHbhn0a8QCSb/yTo74m2zuiyi/5NYo5LslZVPFeQJvKU7cQ==
dependencies:
"@types/debug" "4.1.7"
debug "4.3.2"
ms "2.1.3"

"@prisma/engine-core@3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@prisma/engine-core/-/engine-core-3.0.2.tgz#f5d574a4b7d359700d0725cb866a5f7be1e12701"
integrity sha512-ThS4ggYJ7J73NcsR3bkrM71vudW1tmcq0o6KLjSFcVirAHB8zEztVzfVgF38GTPOops0lF5XF8fUv4Y+jVvoXg==
"@prisma/engine-core@3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@prisma/engine-core/-/engine-core-3.1.1.tgz#1e32b4089f47d4fd31e8591408fa93dfb299d451"
integrity sha512-zq34wWm797ILXCkYdpJjZqSBXizUffgX5WIsY1Su8RBArap9r9IoO2XMt412vADbBe9+LH86vJPBg92YEaf96g==
dependencies:
"@prisma/debug" "3.0.2"
"@prisma/engines" "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
"@prisma/generator-helper" "3.0.2"
"@prisma/get-platform" "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
"@prisma/debug" "3.1.1"
"@prisma/engines" "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
"@prisma/generator-helper" "3.1.1"
"@prisma/get-platform" "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
chalk "4.1.2"
execa "5.1.1"
get-stream "6.0.1"
Expand All @@ -2084,23 +2084,23 @@
terminal-link "2.1.1"
undici "3.3.6"

"@prisma/engines-version@2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db":
version "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db.tgz#c45323e420f47dd950b22c873bdcf38f75e65779"
integrity sha512-iArSApZZImVmT9oC/rGOjzvpG2AOqlIeqYcVnop9poA3FxD4zfVPbNPH9DTgOWhc06OkBHujJZeAcsNddVabIQ==
"@prisma/engines-version@3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f":
version "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f.tgz#f9908eb7808f2a546634398063942eaecb2474ef"
integrity sha512-EuEMKLuwIcBO7uInZQHeG1yaywcfl32Tq8TDf5tgLvblk+ka70sej7S67lh3BV5gXMLTc3GdthSHPfDqZEK5uA==

"@prisma/engines@2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db":
version "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db.tgz#b6cf70bc05dd2a62168a16f3ea58a1b011074621"
integrity sha512-Q9CwN6e5E5Abso7J3A1fHbcF4NXGRINyMnf7WQ07fXaebxTTARY5BNUzy2Mo5uH82eRVO5v7ImNuR044KTjLJg==
"@prisma/engines@3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f":
version "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f.tgz#7b45708e6a42523dc9bc2214e5c62781f608dc3a"
integrity sha512-6NEp0VlLho3hVtIvj2P4h0e19AYqQSXtFGts8gSIXDnV+l5pRFZaDMfGo2RiLMR0Kfrs8c3ZYxYX0sWmVL0tWw==

"@prisma/fetch-engine@2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db":
version "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db.tgz#d5f5b18d273cb933eab134c46ca3bd65a006482c"
integrity sha512-MVlloe2gnnG8YpB9utDos0qnnHw05ud24OOu6jtXFcYIBJR4rd+7pmRTY5TgD76RnbWH4rNzD5NL1xAiXMTZKA==
"@prisma/fetch-engine@3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f":
version "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f.tgz#957143646d9a046361c45dc34ac3f3932b328192"
integrity sha512-ufywCOjqel/eNzR+yA4U7/RlbcztxFs0UfwbLRgqqNAaWR8hOk9TiTWyzgoxg+gh3nTEaBvh+GYt+n1YU98Wwg==
dependencies:
"@prisma/debug" "2.30.3"
"@prisma/get-platform" "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
"@prisma/debug" "3.0.2"
"@prisma/get-platform" "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
chalk "^4.0.0"
execa "^5.0.0"
find-cache-dir "^3.3.1"
Expand All @@ -2117,30 +2117,30 @@
temp-dir "^2.0.0"
tempy "^1.0.0"

"@prisma/generator-helper@3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@prisma/generator-helper/-/generator-helper-3.0.2.tgz#6aa49ec8d7b31491b21ac99d3020308f93346f22"
integrity sha512-ACWo7j2zapEq8bMNNgfS2QRa9Kkl/rSqNX8iiKo01D1/79jy/MjI+k+S8ByOQBzTeIdiRmu3CF7dO6lV0UQ3eg==
"@prisma/generator-helper@3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@prisma/generator-helper/-/generator-helper-3.1.1.tgz#d81c2945894d365b5d4dcd890487b8ca9a556a52"
integrity sha512-Jke+zZrUE0v1gqaQ4fyMDzDk9yj7W8qMtyyPJjFWyprQNf4zMTffLmYsIrYVCULYt6C47u2AwXbQGyESlSFgJw==
dependencies:
"@prisma/debug" "3.0.2"
"@prisma/debug" "3.1.1"
"@types/cross-spawn" "6.0.2"
chalk "4.1.2"
cross-spawn "7.0.3"

"@prisma/get-platform@2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db":
version "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db.tgz#5a5e9efbdd5607d2fe31e8e7fdad4803d48f17ba"
integrity sha512-c3RYEv/l+n/i7wU/Ua2P3ZXWiKKKAmoZ832VHDe8eX5I8IlhTG+/8pwnGW/b3O/XDXMcYnSGMZqKszToqSYp5g==
"@prisma/get-platform@3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f":
version "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f.tgz#d9499dc9af9032c92f773bb510aefbc7534e76d0"
integrity sha512-m5hsHxC7UmGbqDCEe6EFYDdSjZbxcY/r2Rp53sCy5U2Km6vMBzT/p5SYAH59An0p07WUbhB1R7x7Km11lkUA0w==
dependencies:
"@prisma/debug" "2.30.3"
"@prisma/debug" "3.0.2"

"@prisma/migrate@3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@prisma/migrate/-/migrate-3.0.2.tgz#83c30724784e58de890815b5d34bdff87e46fc15"
integrity sha512-TY75Qj1CB8jtYe3r0GVLJVQWbkIDbQcwafTn2gg5csZYxCjCHVcspoCxNedjmYgOC1/J/t+aY8CjR1MN+BNNzQ==
"@prisma/migrate@3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@prisma/migrate/-/migrate-3.1.1.tgz#464930ce048cc449c7da733dd074d2b1a08ea3c9"
integrity sha512-eZfWfyEn3/NZjN0YKu2IHaOtXdVj5rF94WpSfJuawHwS7aNQ9kZM8XBi+9r8DfhguwXyIAJcOT9fKMOt/HP+ew==
dependencies:
"@prisma/debug" "3.0.2"
"@prisma/get-platform" "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
"@prisma/debug" "3.1.1"
"@prisma/get-platform" "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
"@sindresorhus/slugify" "1.1.2"
execa "5.1.1"
global-dirs "3.0.0"
Expand All @@ -2155,17 +2155,17 @@
strip-ansi "6.0.0"
strip-indent "3.0.0"

"@prisma/sdk@3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@prisma/sdk/-/sdk-3.0.2.tgz#55d1958e6c5d045affdcad3da552a77d5de14e73"
integrity sha512-TP/thlJy9lYb9LOUUXevJYk4owtoNjmHkgAhiI6+IEZ+0fQ30/cLUgk8rsHfQumdTH5GnUsNdOuF3P/JyyBHSg==
dependencies:
"@prisma/debug" "3.0.2"
"@prisma/engine-core" "3.0.2"
"@prisma/engines" "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
"@prisma/fetch-engine" "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
"@prisma/generator-helper" "3.0.2"
"@prisma/get-platform" "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
"@prisma/sdk@3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@prisma/sdk/-/sdk-3.1.1.tgz#4795e1c44ce40e589a47558813fca5a81c05b0e6"
integrity sha512-rzQ4Gsvre6chTm3dV32lKdmvt7XQ3pitIXWvimZx66KhAzy3YSasjx+CmjsLhqIDT8ftT7mpOICJbCcY4HIrGA==
dependencies:
"@prisma/debug" "3.1.1"
"@prisma/engine-core" "3.1.1"
"@prisma/engines" "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
"@prisma/fetch-engine" "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
"@prisma/generator-helper" "3.1.1"
"@prisma/get-platform" "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"
"@timsuchanek/copy" "1.4.5"
archiver "4.0.2"
arg "5.0.1"
Expand All @@ -2180,7 +2180,7 @@
has-yarn "2.1.0"
is-ci "3.0.0"
make-dir "3.1.0"
node-fetch "2.6.1"
node-fetch "2.6.2"
p-map "4.0.0"
read-pkg-up "7.0.1"
resolve "1.20.0"
Expand Down Expand Up @@ -9718,6 +9718,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==

[email protected]:
version "2.6.2"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.2.tgz#986996818b73785e47b1965cc34eb093a1d464d0"
integrity sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA==

node-fetch@^2.5.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.3:
version "2.6.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.3.tgz#57b29b34400e9c52346cbfb575cf3d10f7a49e92"
Expand Down Expand Up @@ -10574,12 +10579,12 @@ prism-react-renderer@^1.2.1:
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.2.1.tgz#392460acf63540960e5e3caa699d851264e99b89"
integrity sha512-w23ch4f75V1Tnz8DajsYKvY5lF7H1+WvzvLUcF0paFxkTHSp42RS0H5CttdN2Q8RR3DRGZ9v5xD/h3n8C8kGmg==

prisma@3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-3.0.2.tgz#e86cb6abf4a815c7ac97b9d0ed383f01c253ce34"
integrity sha512-TyOCbtWGDVdWvsM1RhUzJXoGClXGalHhyYWIc5eizSF8T1ScGiOa34asBUdTnXOUBFSErbsqMNw40DHAteBm1A==
prisma@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-3.1.1.tgz#4c13c35dd3a58af9134008c8ed0fdc21a632802c"
integrity sha512-+eZtWIL6hnOKUOvqq9WLBzSw2d/EbTmOx1Td1LI8/0XE40ctXMLG2N1p6NK5/+yivGaoNJ9PDpPsPL9lO4nJrQ==
dependencies:
"@prisma/engines" "2.31.0-32.2452cc6313d52b8b9a96999ac0e974d0aedf88db"
"@prisma/engines" "3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f"

process-nextick-args@~2.0.0:
version "2.0.1"
Expand Down

0 comments on commit 5e62702

Please sign in to comment.