diff --git a/bun.lockb b/bun.lockb index febdb13a..180a5a1d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 97e91973..e8d89858 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "cli": "bun run cli/index.ts", "prune": "ts-prune | grep -v server/ | grep -v dist/ | grep -v '(used in module)'", "check": "bunx tsc -p .", + "postinstall": "bun run patches/patch.ts", "prepare": "bunx husky" }, "trustedDependencies": [ diff --git a/patches/patch.ts b/patches/patch.ts new file mode 100644 index 00000000..b47a3d3a --- /dev/null +++ b/patches/patch.ts @@ -0,0 +1,5 @@ +import { $ } from "bun"; + +// Replace all occurrences of 'Deno' with '{}' in node_modules/@logtape/logtape/logtape/filesink.deno.js +// LogTape assumes a Deno global exists which causes it to break in Bun +await $`sed -i 's/Deno/{}/g' '${import.meta.dir}/../node_modules/@logtape/logtape/logtape/filesink.deno.js'`;