Skip to content

Commit 25a3749

Browse files
committed
fix: address CodeRabbit review comments
- Fix regex bug in Version.test.ts that was appending instead of replacing path - Use node:path prefix for built-in module import in Version.ts
1 parent c5dd13d commit 25a3749

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/cli/src/Version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
} from '@prisma/internals'
1818
import { bold, dim, red } from 'kleur/colors'
1919
import os from 'os'
20-
import path from 'path'
20+
import path from 'node:path'
2121

2222
import { getInstalledPrismaClientVersion } from './utils/getClientVersion'
2323

packages/cli/src/__tests__/commands/Version.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function cleanSnapshot(str: string, versionOverride?: string): string {
7575
str = str.replace(/\.exe/g, '')
7676

7777
// sanitize Prisma CLI Path
78-
str = str.replace(new RegExp('(Prisma CLI Path\\s+:( ).*)', 'g'), '$1sanitized_path')
78+
str = str.replace(new RegExp('(Prisma CLI Path\s+:) .*', 'g'), '$1 sanitized_path')
7979

8080
return str
8181
}

0 commit comments

Comments
 (0)