Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prisma/prisma
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: hzmifork/prisma
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Feb 14, 2025

  1. Copy the full SHA
    2a4fd52 View commit details
  2. Copy the full SHA
    7d82d46 View commit details
Showing with 3 additions and 2 deletions.
  1. +3 −2 packages/client/src/generation/generateClient.ts
5 changes: 3 additions & 2 deletions packages/client/src/generation/generateClient.ts
Original file line number Diff line number Diff line change
@@ -361,7 +361,7 @@ function getTypedSqlRuntimeBase(runtimeBase: string) {

// TODO: explore why we have a special case for excluding pnpm
async function getDefaultOutdir(outputDir: string): Promise<string> {
if (outputDir.endsWith('node_modules/@prisma/client')) {
if (outputDir.endsWith(path.normalize('node_modules/@prisma/client'))) {
return path.join(outputDir, '../../.prisma/client')
}
if (
@@ -648,8 +648,9 @@ async function getGenerationDirs({
testMode,
}: GenerateClientOptions) {
const isCustomOutput = generator.isCustomOutput === true
const normalizedOutputDir = path.normalize(outputDir)
let userRuntimeImport = isCustomOutput ? './runtime' : '@prisma/client/runtime'
let userOutputDir = isCustomOutput ? outputDir : await getDefaultOutdir(outputDir)
let userOutputDir = isCustomOutput ? normalizedOutputDir : await getDefaultOutdir(normalizedOutputDir)

if (testMode && runtimeBase) {
userOutputDir = outputDir