-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Upgrade Prisma to 7.2.0 #710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
68da965
9602411
2ba7393
7564b39
b3a6031
d3565ee
44217f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,19 @@ | ||
| import type { PrismaConfig } from 'prisma'; | ||
|
|
||
| import { existsSync } from 'node:fs'; | ||
| import { loadEnvFile } from 'node:process'; | ||
| import { defineConfig, env } from 'prisma/config'; | ||
|
|
||
| // Only load .env file if it exists | ||
| if (existsSync('.env')) { | ||
| loadEnvFile(); | ||
| } | ||
|
|
||
| export default { | ||
| export default defineConfig({ | ||
| schema: './prisma/schema.prisma', | ||
| migrations: { | ||
| path: './prisma/migrations', | ||
| seed: /* TPL_SEED_COMMAND:START */ 'tsx --env-file-if-exists=.env --env-file-if-exists=.seed.env src/prisma/seed.ts' /* TPL_SEED_COMMAND:END */, | ||
| }, | ||
| } satisfies PrismaConfig; | ||
| datasource: { | ||
| url: env('DATABASE_URL'), | ||
| }, | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,19 @@ | ||
| import type { PrismaConfig } from 'prisma'; | ||
|
|
||
| import { existsSync } from 'node:fs'; | ||
| import { loadEnvFile } from 'node:process'; | ||
| import { defineConfig, env } from 'prisma/config'; | ||
|
||
|
|
||
| // Only load .env file if it exists | ||
| if (existsSync('.env')) { | ||
| loadEnvFile(); | ||
| } | ||
|
|
||
| export default { | ||
| export default defineConfig({ | ||
| schema: './prisma/schema.prisma', | ||
| migrations: { | ||
| path: './prisma/migrations', | ||
| seed: /* TPL_SEED_COMMAND:START */ 'tsx --env-file-if-exists=.env --env-file-if-exists=.seed.env src/prisma/seed.ts' /* TPL_SEED_COMMAND:END */, | ||
| }, | ||
| } satisfies PrismaConfig; | ||
| datasource: { | ||
| url: env('DATABASE_URL'), | ||
| }, | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,19 @@ | ||
| import type { PrismaConfig } from 'prisma'; | ||
|
|
||
| import { existsSync } from 'node:fs'; | ||
| import { loadEnvFile } from 'node:process'; | ||
| import { defineConfig, env } from 'prisma/config'; | ||
|
|
||
| // Only load .env file if it exists | ||
| if (existsSync('.env')) { | ||
| loadEnvFile(); | ||
| } | ||
|
|
||
| export default { | ||
| export default defineConfig({ | ||
| schema: './prisma/schema.prisma', | ||
| migrations: { | ||
| path: './prisma/migrations', | ||
| seed: /* TPL_SEED_COMMAND:START */ 'tsx --env-file-if-exists=.env --env-file-if-exists=.seed.env src/prisma/seed.ts' /* TPL_SEED_COMMAND:END */, | ||
| }, | ||
| } satisfies PrismaConfig; | ||
| datasource: { | ||
| url: env('DATABASE_URL'), | ||
| }, | ||
| }); |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -35,7 +35,7 @@ const IGNORE_FILES = /* TPL_IGNORE_FILES:START */ [ | |||||||||||||||||||||
| // Specifies which files should use the default tsconfig.json project | ||||||||||||||||||||||
| // This is useful for certain files outside the src directory, e.g. config files | ||||||||||||||||||||||
| const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [ | ||||||||||||||||||||||
| 'prisma.config.mts', | ||||||||||||||||||||||
| 'prisma.config.ts', | ||||||||||||||||||||||
| 'vitest.config.ts', | ||||||||||||||||||||||
| 'vitest.config.ts', | ||||||||||||||||||||||
| ]; /* TPL_DEFAULT_PROJECT_FILES:END */ | ||||||||||||||||||||||
|
Comment on lines
37
to
41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove duplicate Lines 39-40 contain duplicate entries of 🔎 Proposed fix const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [
'prisma.config.ts',
'vitest.config.ts',
- 'vitest.config.ts',
]; /* TPL_DEFAULT_PROJECT_FILES:END */📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,19 @@ | ||
| import type { PrismaConfig } from 'prisma'; | ||
|
|
||
| import { existsSync } from 'node:fs'; | ||
| import { loadEnvFile } from 'node:process'; | ||
| import { defineConfig, env } from 'prisma/config'; | ||
|
|
||
| // Only load .env file if it exists | ||
| if (existsSync('.env')) { | ||
| loadEnvFile(); | ||
| } | ||
|
|
||
| export default { | ||
| export default defineConfig({ | ||
| schema: './prisma/schema.prisma', | ||
| migrations: { | ||
| path: './prisma/migrations', | ||
| seed: /* TPL_SEED_COMMAND:START */ 'tsx --env-file-if-exists=.env --env-file-if-exists=.seed.env src/prisma/seed.ts' /* TPL_SEED_COMMAND:END */, | ||
| }, | ||
| } satisfies PrismaConfig; | ||
| datasource: { | ||
| url: env('DATABASE_URL'), | ||
| }, | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ | |
| "@baseplate-dev/core-generators": "workspace:*", | ||
| "@baseplate-dev/sync": "workspace:*", | ||
| "@baseplate-dev/utils": "workspace:*", | ||
| "@prisma/internals": "6.17.1", | ||
| "@prisma/internals": "7.2.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify Prisma/internals version and address breaking changes before upgrade. Prisma 7.2.0 is released and stable, but this major version introduces significant breaking changes and unresolved security concerns that require attention: Breaking Changes: Security Concerns: Note: The specified version 🤖 Prompt for AI Agents |
||
| "change-case": "5.4.4", | ||
| "es-toolkit": "1.31.0", | ||
| "indent-string": "5.0.0", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,21 @@ | ||
| // @ts-nocheck | ||
|
|
||
| import type { PrismaConfig } from 'prisma'; | ||
|
|
||
| import { existsSync } from 'node:fs'; | ||
| import { loadEnvFile } from 'node:process'; | ||
| import { defineConfig, env } from 'prisma/config'; | ||
|
|
||
| // Only load .env file if it exists | ||
| if (existsSync('.env')) { | ||
| loadEnvFile(); | ||
| } | ||
|
|
||
| export default { | ||
| export default defineConfig({ | ||
| schema: './prisma/schema.prisma', | ||
| migrations: { | ||
| path: './prisma/migrations', | ||
| seed: TPL_SEED_COMMAND, | ||
| }, | ||
| } satisfies PrismaConfig; | ||
| datasource: { | ||
| url: env('DATABASE_URL'), | ||
| }, | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove duplicate
vitest.config.tsentry.Lines 39-40 contain duplicate entries of
'vitest.config.ts'in theTS_DEFAULT_PROJECT_FILESarray.🔎 Proposed fix
const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [ 'prisma.config.ts', 'vitest.config.ts', - 'vitest.config.ts', ]; /* TPL_DEFAULT_PROJECT_FILES:END */📝 Committable suggestion
🤖 Prompt for AI Agents