-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
33 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,11 @@ | |
dependencies: | ||
"@prisma/engines-version" "4.17.0-26.6b0aef69b7cdfc787f822ecd7cdc76d5f1991584" | ||
|
||
"@prisma/client@^5.8.1": | ||
version "5.8.1" | ||
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.8.1.tgz#7815ec51c0ca2a6de219c02e7846701ae3baf240" | ||
integrity sha512-xQtMPfbIwLlbm0VVIVQY2yqQVOxPwRQhvIp7Z3m2900g1bu/zRHKhYZJQWELqmjl6d8YwBy0K2NvMqh47v1ubw== | ||
|
||
"@prisma/[email protected]": | ||
version "5.8.1" | ||
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.8.1.tgz#704daa36919b0fc4d227260ecebfa1c94b155b07" | ||
|
@@ -78,7 +83,7 @@ | |
"@prisma/engines-version" "5.8.1-1.78caf6feeaed953168c64e15a249c3e9a033ebe2" | ||
"@prisma/get-platform" "5.8.1" | ||
|
||
"@prisma/[email protected]", "@prisma/generator-helper@^5.0.0": | ||
"@prisma/[email protected]", "@prisma/generator-helper@^5.8.1": | ||
version "5.8.1" | ||
resolved "https://registry.yarnpkg.com/@prisma/generator-helper/-/generator-helper-5.8.1.tgz#11d226bf004839763375303a7a081913796df06b" | ||
integrity sha512-2EDd0o+GHfbX1dtw5BnfOz3hQB7AtYrwe4YNiKfo2UDBvB/ne/ChZa3b/vBm/GKpjW2Xaymct8D9oIHev3juzQ== | ||
|
@@ -92,7 +97,7 @@ | |
dependencies: | ||
"@prisma/debug" "5.8.1" | ||
|
||
"@prisma/internals@^5.0.0": | ||
"@prisma/internals@^5.8.1": | ||
version "5.8.1" | ||
resolved "https://registry.yarnpkg.com/@prisma/internals/-/internals-5.8.1.tgz#cb73784f64846a65efe74f5f563ec8908ac857e9" | ||
integrity sha512-9okoCgLeMqql58IbEG3YmzgNLRUQdN+qZUYp2DojWC7VAmL9TSOKQ5Dcc0588cKAsCBBDUQ2jfdflorYkzeFKw== | ||
|
@@ -182,12 +187,12 @@ make-error@^1.1.1: | |
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== | ||
|
||
"prisma-generator-fake-data@file:..": | ||
version "0.13.0" | ||
version "0.14.0" | ||
dependencies: | ||
"@faker-js/faker" "^8.0.2" | ||
"@prisma/client" "^5.0.0" | ||
"@prisma/generator-helper" "^5.0.0" | ||
"@prisma/internals" "^5.0.0" | ||
"@prisma/client" "^5.8.1" | ||
"@prisma/generator-helper" "^5.8.1" | ||
"@prisma/internals" "^5.8.1" | ||
decimal.js "^10.4.3" | ||
tiny-invariant "^1.3.1" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
import { GeneratorOptions } from '@prisma/generator-helper'; | ||
|
||
export function extractClientPath(options: GeneratorOptions) { | ||
return ( | ||
options.otherGenerators.find( | ||
(g) => g?.provider?.value === 'prisma-client-js', | ||
)?.output?.value || undefined | ||
); | ||
const clientPath = options.otherGenerators.find( | ||
(g) => g?.provider?.value === 'prisma-client-js', | ||
)?.output?.value; | ||
|
||
/** | ||
* not sure what changed, but this value was undefined before | ||
* and now it's set to the full path of the client (including | ||
* the user folder etc). If we detect that, we just return | ||
* the @prisma/client string | ||
*/ | ||
if (clientPath?.includes('node_modules/@prisma/client')) { | ||
return '@prisma/client'; | ||
} | ||
|
||
return clientPath || undefined; | ||
} |