Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: revert "fix(sdk): avoid crash in prisma version, rename 'getVe…
…rsion' -> 'getBinaryVersion' (#13737)" (#14025) This reverts commit 3718bfa. Co-authored-by: Alexey Orlenko <alex@aqrln.net>
- Loading branch information
Showing
7 changed files
with
61 additions
and
233 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
14 changes: 7 additions & 7 deletions
14
.../engine-commands/getEngineVersion.test.ts → ...ests__/engine-commands/getVersion.test.ts
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,32 +1,32 @@ | ||
import { enginesVersion, getCliQueryEngineBinaryType } from '@prisma/engines' | ||
|
||
import { BinaryType, getEngineVersion } from '../..' | ||
import { BinaryType, getVersion } from '../..' | ||
|
||
const testIf = (condition: boolean) => (condition ? test : test.skip) | ||
const useNodeAPI = getCliQueryEngineBinaryType() === BinaryType.libqueryEngine | ||
|
||
describe('getEngineVersion', () => { | ||
describe('getVersion', () => { | ||
test('Introspection Engine', async () => { | ||
const introspectionEngineVersion = await getEngineVersion(undefined, BinaryType.introspectionEngine) | ||
const introspectionEngineVersion = await getVersion(undefined, BinaryType.introspectionEngine) | ||
expect(introspectionEngineVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
|
||
test('Migration Engine', async () => { | ||
const migrationEngineVersion = await getEngineVersion(undefined, BinaryType.migrationEngine) | ||
const migrationEngineVersion = await getVersion(undefined, BinaryType.migrationEngine) | ||
expect(migrationEngineVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
|
||
test('Prisma Fmt', async () => { | ||
const prismaFmtVersion = await getEngineVersion(undefined, BinaryType.prismaFmt) | ||
const prismaFmtVersion = await getVersion(undefined, BinaryType.prismaFmt) | ||
expect(prismaFmtVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
|
||
testIf(!useNodeAPI)('Query Engine', async () => { | ||
const queryEngineVersion = await getEngineVersion(undefined, BinaryType.queryEngine) | ||
const queryEngineVersion = await getVersion(undefined, BinaryType.queryEngine) | ||
expect(queryEngineVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
testIf(useNodeAPI)('Query Engine (Node-API)', async () => { | ||
const libqueryEngineVersion = await getEngineVersion(undefined, BinaryType.libqueryEngine) | ||
const libqueryEngineVersion = await getVersion(undefined, BinaryType.libqueryEngine) | ||
expect(libqueryEngineVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
}) |
167 changes: 0 additions & 167 deletions
167
packages/internals/src/engine-commands/getEnginesMetaInfo.ts
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.