From f403d3e9571de2e81fcf59010cbfdc49d93f2920 Mon Sep 17 00:00:00 2001 From: AmirSa12 Date: Sat, 7 Feb 2026 19:02:28 +0330 Subject: [PATCH 1/2] init --- packages/cli/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/cli/index.ts b/packages/cli/index.ts index 79a774b5..3fdf7be9 100644 --- a/packages/cli/index.ts +++ b/packages/cli/index.ts @@ -687,6 +687,15 @@ async function resolveTarball(pm: PackMethod, p: string, pJson: PackageJson) { if (pm !== "yarn" && pm !== "bun") { filename = lines[lines.length - 1].trim(); } + if (pm === "bun") { + const tgzFiles = fsSync + .readdirSync(p) + .filter((file) => file.endsWith(".tgz")); + console.warn(`[bun pack] stdout:\n${stdout}`); + console.warn( + `[bun pack] expected filename: ${filename}; tgz files: ${tgzFiles.join(", ") || "(none)"}`, + ); + } const shasum = createHash("sha1") .update(await fs.readFile(path.resolve(p, filename))) From 5bf14fcc5d0534d81f6c01122ef2a507e7ae8f0e Mon Sep 17 00:00:00 2001 From: AmirSa12 Date: Sat, 7 Feb 2026 19:22:12 +0330 Subject: [PATCH 2/2] fix --- packages/cli/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/cli/index.ts b/packages/cli/index.ts index 3fdf7be9..ce625385 100644 --- a/packages/cli/index.ts +++ b/packages/cli/index.ts @@ -676,7 +676,7 @@ async function resolveTarball(pm: PackMethod, p: string, pJson: PackageJson) { if (pm === "yarn") { cmd += ` --filename ${filename}`; } else if (pm === "bun") { - cmd = `bun pm pack --filename ${filename}`; + cmd = `bun pm pack --quiet --filename ${filename}`; } const { stdout } = await ezSpawn.async(cmd, { stdio: "overlapped", @@ -691,6 +691,10 @@ async function resolveTarball(pm: PackMethod, p: string, pJson: PackageJson) { const tgzFiles = fsSync .readdirSync(p) .filter((file) => file.endsWith(".tgz")); + const bunFilename = stdout.trim(); + if (bunFilename) { + filename = bunFilename; + } console.warn(`[bun pack] stdout:\n${stdout}`); console.warn( `[bun pack] expected filename: ${filename}; tgz files: ${tgzFiles.join(", ") || "(none)"}`,