Skip to content

Commit

Permalink
fix(prisma): add useDefineForClassFields option to default ts compila…
Browse files Browse the repository at this point in the history
…tion option

Closes: #2927
  • Loading branch information
semantic-release-bot authored and Romakita committed Dec 9, 2024
1 parent a5c2cfb commit 29c0824
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions packages/orm/prisma/src/generator/generateCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const baseCompilerOptions: CompilerOptions = {
module: ModuleKind.ESNext,
emitDecoratorMetadata: true,
experimentalDecorators: true,
esModuleInterop: true
esModuleInterop: true,
useDefineForClassFields: false
};

export interface GenerateCodeOptions {
Expand All @@ -31,7 +32,9 @@ export async function generateCode(dmmf: DMMF.Document, options: GenerateCodeOpt
const project = new Project({
compilerOptions: {
...baseCompilerOptions,
...(emitTranspiledCode && {declaration: true})
...(emitTranspiledCode && {
declaration: true
})
}
});

Expand Down
4 changes: 2 additions & 2 deletions packages/orm/prisma/vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export default defineConfig(
coverage: {
...presets.test.coverage,
thresholds: {
statements: 91.11,
statements: 91.02,
branches: 92.2,
functions: 92.59,
lines: 91.11
lines: 91.02
}
}
}
Expand Down

0 comments on commit 29c0824

Please sign in to comment.