diff options
Diffstat (limited to 'test')
| -rwxr-xr-x | test/bun.lockb | bin | 149737 -> 148448 bytes | |||
| -rw-r--r-- | test/js/third_party/prisma/helper.ts | 31 | ||||
| -rw-r--r-- | test/js/third_party/prisma/package.json | 4 | ||||
| -rw-r--r-- | test/js/third_party/prisma/prisma/mongodb/schema.prisma | 1 | ||||
| -rw-r--r-- | test/js/third_party/prisma/prisma/mssql/schema.prisma | 1 | ||||
| -rw-r--r-- | test/js/third_party/prisma/prisma/postgres/schema.prisma | 1 | ||||
| -rw-r--r-- | test/js/third_party/prisma/prisma/sqlite/schema.prisma | 1 | ||||
| -rw-r--r-- | test/package.json | 4 |
8 files changed, 30 insertions, 13 deletions
diff --git a/test/bun.lockb b/test/bun.lockb Binary files differindex a4e2b2fdb..01383ce5d 100755 --- a/test/bun.lockb +++ b/test/bun.lockb diff --git a/test/js/third_party/prisma/helper.ts b/test/js/third_party/prisma/helper.ts index 8b4462247..ae11ede20 100644 --- a/test/js/third_party/prisma/helper.ts +++ b/test/js/third_party/prisma/helper.ts @@ -1,5 +1,6 @@ import path from "path"; import { bunExe, bunEnv } from "harness"; +import fs from "fs"; const cwd = import.meta.dir; export async function generateClient(type: string) { @@ -39,15 +40,27 @@ export function migrate(type: string) { } export function generate(type: string) { - const result = Bun.spawnSync( - [bunExe(), "prisma", "generate", "--schema", path.join(cwd, "prisma", type, "schema.prisma")], - { - cwd, - env: { - ...bunEnv, - NODE_ENV: undefined, - }, + const schema = path.join(cwd, "prisma", type, "schema.prisma"); + + const content = fs + .readFileSync(schema) + .toString("utf8") + // only affect linux + .replace( + "%binaryTargets%", + process.platform === "win32" || process.platform === "darwin" + ? "" + : 'binaryTargets = ["native", "debian-openssl-1.1.x", "debian-openssl-3.0.x", "linux-musl", "linux-musl-openssl-3.0.x"]', + ); + + fs.writeFileSync(schema, content); + + const result = Bun.spawnSync([bunExe(), "prisma", "generate", "--schema", schema], { + cwd, + env: { + ...bunEnv, + NODE_ENV: undefined, }, - ); + }); if (!result.success) throw new Error(result.stderr.toString("utf8")); } diff --git a/test/js/third_party/prisma/package.json b/test/js/third_party/prisma/package.json index 7455b963b..4086944d0 100644 --- a/test/js/third_party/prisma/package.json +++ b/test/js/third_party/prisma/package.json @@ -4,13 +4,13 @@ "type": "module", "devDependencies": { "bun-types": "0.7.0", - "prisma": "5.0.0" + "prisma": "5.1.1" }, "peerDependencies": { "typescript": "5.0.0" }, "dependencies": { - "@prisma/client": "5.0.0" + "@prisma/client": "5.1.1" }, "scripts": { "postinstall": "prisma generate --schema=./prisma/schema.prisma" diff --git a/test/js/third_party/prisma/prisma/mongodb/schema.prisma b/test/js/third_party/prisma/prisma/mongodb/schema.prisma index 42e77d1d4..184ac829b 100644 --- a/test/js/third_party/prisma/prisma/mongodb/schema.prisma +++ b/test/js/third_party/prisma/prisma/mongodb/schema.prisma @@ -4,6 +4,7 @@ generator client { provider = "prisma-client-js" output = "client" + %binaryTargets% } datasource db { diff --git a/test/js/third_party/prisma/prisma/mssql/schema.prisma b/test/js/third_party/prisma/prisma/mssql/schema.prisma index ea10aae7d..1e275ee7b 100644 --- a/test/js/third_party/prisma/prisma/mssql/schema.prisma +++ b/test/js/third_party/prisma/prisma/mssql/schema.prisma @@ -4,6 +4,7 @@ generator client { provider = "prisma-client-js" output = "client" + %binaryTargets% } datasource db { diff --git a/test/js/third_party/prisma/prisma/postgres/schema.prisma b/test/js/third_party/prisma/prisma/postgres/schema.prisma index 4884e21ce..afbd6f39a 100644 --- a/test/js/third_party/prisma/prisma/postgres/schema.prisma +++ b/test/js/third_party/prisma/prisma/postgres/schema.prisma @@ -4,6 +4,7 @@ generator client { provider = "prisma-client-js" output = "client" + %binaryTargets% } datasource db { diff --git a/test/js/third_party/prisma/prisma/sqlite/schema.prisma b/test/js/third_party/prisma/prisma/sqlite/schema.prisma index 1759eeaf1..bbe3292cb 100644 --- a/test/js/third_party/prisma/prisma/sqlite/schema.prisma +++ b/test/js/third_party/prisma/prisma/sqlite/schema.prisma @@ -4,6 +4,7 @@ generator client { provider = "prisma-client-js" output = "client" + %binaryTargets% } datasource db { diff --git a/test/package.json b/test/package.json index 5fecb838b..7d8156aa0 100644 --- a/test/package.json +++ b/test/package.json @@ -8,7 +8,7 @@ "@types/supertest": "2.0.12" }, "dependencies": { - "@prisma/client": "5.0.0", + "@prisma/client": "5.1.1", "@swc/core": "1.3.38", "bktree-fast": "0.0.7", "body-parser": "1.20.2", @@ -24,7 +24,7 @@ "pg": "8.11.1", "pg-connection-string": "2.6.1", "postgres": "3.3.5", - "prisma": "5.0.0", + "prisma": "5.1.1", "socket.io": "4.7.1", "socket.io-client": "4.7.1", "supertest": "6.3.3", |
