diff options
-rw-r--r-- | .github/workflows/bun-linux-build.yml | 1 | ||||
-rw-r--r-- | src/bun.js/node/node_fs_binding.zig | 2 | ||||
-rw-r--r-- | src/bun.js/webcore/encoding.zig | 2 | ||||
-rw-r--r-- | src/js/out/ResolvedSourceTag.zig | 10 | ||||
-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 |
12 files changed, 38 insertions, 20 deletions
diff --git a/.github/workflows/bun-linux-build.yml b/.github/workflows/bun-linux-build.yml index f4b288d8e..4f8b2981e 100644 --- a/.github/workflows/bun-linux-build.yml +++ b/.github/workflows/bun-linux-build.yml @@ -197,6 +197,7 @@ jobs: TLS_POSTGRES_DATABASE_URL: ${{ secrets.TLS_POSTGRES_DATABASE_URL }} # if: ${{github.event.inputs.use_bun == 'false'}} run: | + sudo apt-get update && sudo apt-get install -y openssl bun install bun install --cwd test bun install --cwd packages/bun-internal-test diff --git a/src/bun.js/node/node_fs_binding.zig b/src/bun.js/node/node_fs_binding.zig index 845f6936e..3a02442b3 100644 --- a/src/bun.js/node/node_fs_binding.zig +++ b/src/bun.js/node/node_fs_binding.zig @@ -147,7 +147,7 @@ fn call(comptime FunctionEnum: NodeFSFunctionEnum) NodeFSFunction { return JSC.Node.AsyncReadFileTask.create(globalObject, args, slice.vm, slice.arena); } - if (comptime FunctionEnum == .realpath) { + if (comptime FunctionEnum == .realpath) { return JSC.Node.AsyncRealpathTask.create(globalObject, args, slice.vm, slice.arena); } diff --git a/src/bun.js/webcore/encoding.zig b/src/bun.js/webcore/encoding.zig index 2090b7058..f2525348f 100644 --- a/src/bun.js/webcore/encoding.zig +++ b/src/bun.js/webcore/encoding.zig @@ -912,7 +912,7 @@ pub const Encoder = struct { var out = bun.String.createUninitialized(.latin1, bun.base64.urlSafeEncodeLen(input)) orelse return ZigString.init("Out of memory").toErrorInstance(global); defer out.deref(); _ = bun.base64.encodeURLSafe(@constCast(out.latin1()), input); - return out.toJS(global); + return out.toJS(global); }, .base64 => { diff --git a/src/js/out/ResolvedSourceTag.zig b/src/js/out/ResolvedSourceTag.zig index 43dc24689..5d6fcdc79 100644 --- a/src/js/out/ResolvedSourceTag.zig +++ b/src/js/out/ResolvedSourceTag.zig @@ -57,16 +57,16 @@ pub const ResolvedSourceTag = enum(u32) { @"node:wasi" = 557, @"node:worker_threads" = 558, @"node:zlib" = 559, - @"depd" = 560, + depd = 560, @"detect-libc" = 561, @"detect-libc/linux" = 562, @"isomorphic-fetch" = 563, @"node-fetch" = 564, - @"undici" = 565, - @"vercel_fetch" = 566, - @"ws" = 567, + undici = 565, + vercel_fetch = 566, + ws = 567, // Native modules run through a different system using ESM registry. - @"bun" = 1024, + bun = 1024, @"bun:jsc" = 1025, @"node:buffer" = 1026, @"node:constants" = 1027, 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", |