Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/shaggy-wombats-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@shopify/shopify-app-session-storage-prisma': major
---

Update Prisma dependency

This updates the `prisma` peer dependency to `^7.0.0`.

Please update your `prisma` and `@prisma/client` dependencies to `^7.0.0` in your project.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
.env

prisma/test.db*
prisma/generated
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ You can then instantiate and use `PrismaSessionStorage` like so:
```js
import {shopifyApp} from '@shopify/shopify-app-express';
import {PrismaSessionStorage} from '@shopify/shopify-app-session-storage-prisma';
import {PrismaClient} from '@prisma/client';
import {PrismaBetterSqlite3} from '@prisma/adapter-better-sqlite3';

const prisma = new PrismaClient();
import {PrismaClient} from '../prisma/generated/client';

const adapter = new PrismaBetterSqlite3({
url: process.env.DATABASE_URL,
});
const prisma = new PrismaClient({ adapter });
const storage = new PrismaSessionStorage(prisma);

const shopify = shopifyApp({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/shopify-app-session-storage-prisma",
"version": "7.0.3",
"version": "8.0.0",
"description": "Shopify App Session Storage for Prisma",
"repository": {
"type": "git",
Expand Down Expand Up @@ -45,15 +45,15 @@
"Prisma"
],
"peerDependencies": {
"@prisma/client": "^6.17.1",
"@prisma/client": "^7.0.0",
"@shopify/shopify-api": "^12.0.0",
"@shopify/shopify-app-session-storage": "^4.0.0",
"prisma": "^6.17.1"
"prisma": "^7.0.0"
},
"devDependencies": {
"@prisma/client": "^6.17.1",
"@prisma/client": "^7.0.0",
"@shopify/shopify-app-session-storage-test-utils": "^4.0.3",
"prisma": "^6.17.1"
"prisma": "^7.0.0"
},
"dependencies": {},
"files": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
generator client {
provider = "prisma-client-js"
provider = "prisma-client"
output = "./generated"
}

datasource db {
provider = "sqlite"
url = "file:test.db"
}

model Session {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {execSync} from 'child_process';

import {Session} from '@shopify/shopify-api';
import {batteryOfTests} from '@shopify/shopify-app-session-storage-test-utils';
import {Prisma, PrismaClient} from '@prisma/client';

import {Prisma, PrismaClient} from '../../prisma/generate/client';
import {
MissingSessionStorageError,
MissingSessionTableError,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {Session} from '@shopify/shopify-api';
import {SessionStorage} from '@shopify/shopify-app-session-storage';
import type {PrismaClient, Session as Row} from '@prisma/client';
import {Prisma} from '@prisma/client';

import {
Prisma,
type PrismaClient,
type Session as Row,
} from '../prisma/generated/client';

interface PrismaSessionStorageOptions {
tableName?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"outDir": "./dist/ts",
"rootDir": "src"
},
"include": ["src/**/*.ts"],
"include": ["src/**/*.ts", "prisma/generated/**/*.ts"],
"exclude": ["**/*.test.ts", "**/*.test.tsx", "**/test/*", "**/__tests__/*"]
}
Loading