Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

feat(prisma-legacy): bring Prisma legacy up-to-date #78

Merged
merged 8 commits into from
May 10, 2021
Merged
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
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"packages/*"
],
"devDependencies": {
"@babel/cli": "^7.13.16",
"@babel/plugin-transform-runtime": "^7.13.15",
"@babel/preset-env": "^7.14.1",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"eslint": "^7.25.0",
Expand Down
9 changes: 0 additions & 9 deletions packages/prisma-legacy/.babelrc

This file was deleted.

9 changes: 9 additions & 0 deletions packages/prisma-legacy/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// We aim to have the same support as Next.js
// https://nextjs.org/docs/getting-started#system-requirements
// https://nextjs.org/docs/basic-features/supported-browsers-features

module.exports = {
presets: [["@babel/preset-env", { targets: { node: "10.13" } }]],
plugins: ["@babel/plugin-transform-runtime"],
comments: false,
}
14 changes: 14 additions & 0 deletions packages/prisma-legacy/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { PrismaClient } from ".prisma/client"
import { Adapter } from "next-auth/adapters"

export type PrismaLegacyAdapter = Adapter<{
prisma: PrismaClient
modelMapping?: {
User: string
Account: string
Session: string
VerificationRequest: string
}
}>

export { PrismaLegacyAdapter as Adapter }
8 changes: 4 additions & 4 deletions packages/prisma-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"main": "dist/index.js",
"files": [
"dist"
"dist",
"index.d.ts"
],
"private": false,
"publishConfig": {
Expand All @@ -34,8 +35,7 @@
"@prisma/client": "^2.16.1",
"next-auth": "^3.17.2"
},
"devDependencies": {
"@babel/cli": "^7.13.16",
"@babel/preset-env": "^7.13.15"
"dependencies": {
"@babel/runtime": "^7.14.0"
}
}
Loading