We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c25e269 commit e2b5f40Copy full SHA for e2b5f40
src/generator.ts
@@ -29,6 +29,22 @@ generatorHandler({
29
};
30
},
31
onGenerate: async (options: GeneratorOptions) => {
32
+ if (!options.version) {
33
+ throw new Error(
34
+ `Could not determine Prisma version. ` +
35
+ `Make sure you are using a recent version of Prisma.`
36
+ );
37
+ }
38
+
39
+ const semverMatch = options.version.match(/^(\d+)\./);
40
+ if (semverMatch && parseInt(semverMatch[1], 10) < 7) {
41
42
+ `prisma-kysely v${version} requires Prisma 7 or later. ` +
43
+ `You are using Prisma ${options.version}. ` +
44
+ `Please upgrade Prisma or use prisma-kysely v2.x for Prisma 6.`
45
46
47
48
// Parse the config
49
const config = validateConfig({
50
...options.generator.config,
0 commit comments