Skip to content

Bump up for Prisma v7#36

Merged
samchon merged 2 commits intomasterfrom
feat/dependency
Nov 24, 2025
Merged

Bump up for Prisma v7#36
samchon merged 2 commits intomasterfrom
feat/dependency

Conversation

@samchon
Copy link
Copy Markdown
Owner

@samchon samchon commented Nov 24, 2025

This pull request updates the project to support Prisma v7 and modernizes the configuration and testing setup. The most important changes include upgrading Prisma-related dependencies, refactoring Prisma generator configurations, and improving the test structure to use directory-based test cases.

Dependency and Configuration Upgrades:

  • Upgraded all Prisma-related dependencies (@prisma/client, prisma, and @prisma/generator-helper) in package.json to version 7, and updated peer dependencies to require Prisma v7 or higher.
  • Changed Prisma generator provider from prisma-client-js to prisma-client and added explicit output directories in all relevant .prisma files (schema.prisma, test/drive/drive.prisma, test/implicit/implicit.prisma, test/summary/summary.prisma). [1] [2] [3] [4]

Test Structure and Automation Improvements:

  • Added new prisma.config.ts files to each test directory (test/drive, test/implicit, test/summary) using defineConfig from Prisma v7, and removed direct url references from .prisma files in favor of config files. [1] [2] [3] [4]
  • Refactored test/index.ts to iterate over test directories with their own config files, running prisma generate in each, instead of generating from individual .prisma files.

Workflow and File Management:

  • Moved workflow permissions in .github/workflows/release.yml from the job level to the top-level permissions key for better GitHub Actions compatibility, and removed the use of NODE_AUTH_TOKEN for npm publishing. [1] [2]
  • Renamed test schema files to reside within their respective directories for better organization. [1] [2] [3]

@samchon samchon requested a review from Copilot November 24, 2025 13:18
@samchon samchon self-assigned this Nov 24, 2025
@samchon samchon added the enhancement New feature or request label Nov 24, 2025
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Nov 24, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​prisma/​generator-helper@​6.8.0 ⏵ 7.0.099 +110073 +398100
Updated@​prisma/​client@​6.8.0 ⏵ 7.0.099 +610085 +198 +1100
Updatedprisma@​6.8.0 ⏵ 7.0.09410097 +198 +1100

View full report

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Nov 24, 2025

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm safer-buffer is 94.0% likely obfuscated

Confidence: 0.94

Location: Package overview

From: package-lock.jsonnpm/prisma@7.0.0npm/safer-buffer@2.1.2

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/safer-buffer@2.1.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@samchon samchon merged commit 143afee into master Nov 24, 2025
3 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the project from Prisma v6 to Prisma v7, adopting the new configuration pattern and modernizing the test structure. The upgrade includes breaking changes in how Prisma is configured, with datasource URLs now defined in separate prisma.config.ts files rather than directly in .prisma schema files.

Key Changes:

  • Upgraded all Prisma dependencies (@prisma/client, prisma, @prisma/generator-helper) from v6 to v7 with updated peer dependencies
  • Changed Prisma generator provider from prisma-client-js to prisma-client with explicit output directories
  • Introduced prisma.config.ts files using Prisma v7's defineConfig API for datasource configuration

Reviewed changes

Copilot reviewed 12 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Updated Prisma dependencies and peer dependencies to v7.0.0
package-lock.json Reflected dependency updates with new Prisma v7 packages
schema.prisma Changed generator provider to "prisma-client", added output directory, removed datasource URL
prisma.config.ts Added new config file with datasource URL configuration
test/drive/drive.prisma Updated generator provider and path to executable, added output directory
test/drive/prisma.config.ts Added new config file with datasource URL configuration
test/implicit/implicit.prisma Updated generator provider and path to executable, added output directory
test/implicit/prisma.config.ts Added new config file with datasource URL configuration
test/summary/summary.prisma Updated generator provider and path to executable, added output directory
test/summary/prisma.config.ts Added new config file with datasource URL configuration
test/index.ts Refactored to iterate over directories with config files instead of individual .prisma files
test/drive/drive.md Generated output file from updated schema (informational)
test/implicit/implicit.md Generated output file from updated schema (informational)
test/summary/summary.md Generated output file from updated schema (informational)
.gitignore Added generated/ directory to ignore generated Prisma client output
.github/workflows/release.yml Moved permissions to top level, removed NODE_AUTH_TOKEN (uses provenance instead)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

export default defineConfig({
schema: "summary.prisma",
datasource: {
url: "localhost",
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The datasource URL is set to "localhost", which is likely a placeholder and not a valid database connection string. This could cause issues when running prisma generate. The URL should either be a valid connection string (e.g., "postgresql://localhost:5432/db") or use environment variables like env("DATABASE_URL").

Suggested change
url: "localhost",
url: env("DATABASE_URL"),

Copilot uses AI. Check for mistakes.
export default defineConfig({
schema: "implicit.prisma",
datasource: {
url: "localhost",
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The datasource URL is set to "localhost", which is likely a placeholder and not a valid database connection string. This could cause issues when running prisma generate. The URL should either be a valid connection string (e.g., "postgresql://localhost:5432/db") or use environment variables like env("DATABASE_URL").

Suggested change
url: "localhost",
url: 'env("DATABASE_URL")',

Copilot uses AI. Check for mistakes.
export default defineConfig({
schema: "drive.prisma",
datasource: {
url: "localhost",
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The datasource URL is set to "localhost", which is likely a placeholder and not a valid database connection string. This could cause issues when running prisma generate. The URL should either be a valid connection string (e.g., "postgresql://localhost:5432/db") or use environment variables like env("DATABASE_URL").

Suggested change
url: "localhost",
url: env("DATABASE_URL"),

Copilot uses AI. Check for mistakes.
Comment thread prisma.config.ts
export default defineConfig({
schema: "schema.prisma",
datasource: {
url: "localhost",
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The datasource URL is set to "localhost", which is likely a placeholder and not a valid database connection string. This could cause issues when running prisma generate. The URL should either be a valid connection string (e.g., "postgresql://localhost:5432/db") or use environment variables like env("DATABASE_URL").

Suggested change
url: "localhost",
url: 'env("DATABASE_URL")',

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants