From 24c8feba3ea2e0e054de3f64333e554ca9353e38 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sun, 28 Sep 2025 07:28:27 -0400 Subject: [PATCH] fix(bindings): fix root detection on windows --- crates/cli/src/templates/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/cli/src/templates/index.js b/crates/cli/src/templates/index.js index 233261d0..4b363040 100644 --- a/crates/cli/src/templates/index.js +++ b/crates/cli/src/templates/index.js @@ -1,4 +1,6 @@ -const root = new URL("../..", import.meta.url).pathname; +import { fileURLToPath } from "node:url"; + +const root = fileURLToPath(new URL("../..", import.meta.url)); const binding = typeof process.versions.bun === "string" // Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time