Skip to content

Commit a78f5a7

Browse files
authored
chore: add CLI warning for Prisma7 (#2312)
1 parent bfa40c1 commit a78f5a7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/schema/src/cli/actions/generate.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { getPrismaClientGenerator, PluginError } from '@zenstackhq/sdk';
22
import { isPlugin } from '@zenstackhq/sdk/ast';
3+
import { getPrismaVersion } from '@zenstackhq/sdk/prisma';
34
import colors from 'colors';
45
import path from 'path';
6+
import semver from 'semver';
57
import { CliError } from '../cli-error';
68
import {
79
checkNewVersion,
@@ -48,6 +50,11 @@ export async function generate(projectPath: string, options: Options) {
4850
}
4951
}
5052

53+
const prismaVersion = getPrismaVersion();
54+
if (prismaVersion && semver.gte(prismaVersion, '7.0.0')) {
55+
console.warn(colors.yellow('Prisma 7 support is untested and not planned. Use with caution.'));
56+
}
57+
5158
await runPlugins(options);
5259

5360
// note that we can't run online jobs concurrently with plugins because

0 commit comments

Comments
 (0)