Skip to content

Commit b96f484

Browse files
committed
update to Prisma v6
Closes #55
1 parent 74bf000 commit b96f484

153 files changed

Lines changed: 6283 additions & 4468 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ workshop material that is different from what you'll see in the videos.
88
`DataFunctionArgs` was deprecated in Remix and will be removed in the future. It
99
is recommended to use `LoaderFunctionArgs` and `ActionFunctionArgs` instead
1010
which are the exact same.
11+
12+
## Prisma v6
13+
14+
Updated everything to use Prisma v6. The only substantial change is instead of
15+
using `Buffer.from` to convert a file to a `Uint8Array`, we now use
16+
`new Uint8Array(await file.arrayBuffer())`.

epicshop/package-lock.json

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

epicshop/update-deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ rm -rf node_modules package-lock.json ./epicshop/package-lock.json ./epicshop/no
55
npm install
66
npm run setup
77
npm run typecheck
8-
npm run lint --fix
8+
npm run lint -- --fix

examples/typed-sql/app/routes/resources+/note-images.$imageId.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function loader({ params }: LoaderFunctionArgs) {
1414
return new Response(image.blob, {
1515
headers: {
1616
'content-type': image.contentType,
17-
'content-length': Buffer.byteLength(image.blob).toString(),
17+
'content-length': image.blob.length.toString(),
1818
'content-disposition': `inline; filename="${params.imageId}"`,
1919
'cache-control': 'public, max-age=31536000, immutable',
2020
},

examples/typed-sql/app/routes/resources+/user-images.$imageId.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function loader({ params }: LoaderFunctionArgs) {
1414
return new Response(image.blob, {
1515
headers: {
1616
'content-type': image.contentType,
17-
'content-length': Buffer.byteLength(image.blob).toString(),
17+
'content-length': image.blob.length.toString(),
1818
'content-disposition': `inline; filename="${params.imageId}"`,
1919
'cache-control': 'public, max-age=31536000, immutable',
2020
},

examples/typed-sql/app/routes/users+/$username_+/notes.$noteId_.edit.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
112112
id: i.id,
113113
altText: i.altText,
114114
contentType: i.file.type,
115-
blob: Buffer.from(await i.file.arrayBuffer()),
115+
blob: new Uint8Array(await i.file.arrayBuffer()),
116116
}
117117
} else {
118118
return { id: i.id, altText: i.altText }
@@ -127,7 +127,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
127127
return {
128128
altText: image.altText,
129129
contentType: image.file.type,
130-
blob: Buffer.from(await image.file.arrayBuffer()),
130+
blob: new Uint8Array(await image.file.arrayBuffer()),
131131
}
132132
}),
133133
),

examples/typed-sql/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@conform-to/react": "^0.9.0",
2323
"@conform-to/zod": "^0.9.0",
2424
"@mswjs/data": "^0.16.1",
25-
"@prisma/client": "^5.19.0",
25+
"@prisma/client": "^6.19.1",
2626
"@radix-ui/react-label": "^2.1.0",
2727
"@radix-ui/react-slot": "^1.1.0",
2828
"@radix-ui/react-tooltip": "^1.1.2",
@@ -45,7 +45,7 @@
4545
"glob": "^11.0.0",
4646
"isbot": "^5.1.17",
4747
"morgan": "^1.10.0",
48-
"prisma": "^5.19.0",
48+
"prisma": "^6.19.1",
4949
"react": "^18.3.1",
5050
"react-dom": "^18.3.1",
5151
"remix-utils": "^7.6.0",

examples/typed-sql/prisma/seed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async function img({
4343
return {
4444
altText,
4545
contentType: filepath.endsWith('.png') ? 'image/png' : 'image/jpeg',
46-
blob: await fs.promises.readFile(filepath),
46+
blob: new Uint8Array(await fs.promises.readFile(filepath)),
4747
}
4848
}
4949

exercises/01.schema/01.problem.init/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@conform-to/react": "^0.9.0",
2323
"@conform-to/zod": "^0.9.0",
2424
"@mswjs/data": "^0.16.1",
25-
"@prisma/client": "^5.19.0",
25+
"@prisma/client": "^6.19.1",
2626
"@radix-ui/react-label": "^2.1.0",
2727
"@radix-ui/react-slot": "^1.1.0",
2828
"@radix-ui/react-tooltip": "^1.1.2",
@@ -45,7 +45,7 @@
4545
"glob": "^11.0.0",
4646
"isbot": "^5.1.17",
4747
"morgan": "^1.10.0",
48-
"prisma": "^5.19.0",
48+
"prisma": "^6.19.1",
4949
"react": "^18.3.1",
5050
"react-dom": "^18.3.1",
5151
"remix-utils": "^7.6.0",

exercises/01.schema/01.solution.init/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@conform-to/react": "^0.9.0",
2323
"@conform-to/zod": "^0.9.0",
2424
"@mswjs/data": "^0.16.1",
25-
"@prisma/client": "^5.19.0",
25+
"@prisma/client": "^6.19.1",
2626
"@radix-ui/react-label": "^2.1.0",
2727
"@radix-ui/react-slot": "^1.1.0",
2828
"@radix-ui/react-tooltip": "^1.1.2",
@@ -45,7 +45,7 @@
4545
"glob": "^11.0.0",
4646
"isbot": "^5.1.17",
4747
"morgan": "^1.10.0",
48-
"prisma": "^5.19.0",
48+
"prisma": "^6.19.1",
4949
"react": "^18.3.1",
5050
"react-dom": "^18.3.1",
5151
"remix-utils": "^7.6.0",

0 commit comments

Comments
 (0)