From cfbd1e5e4b5fdf3782a678c471d63651b27f6145 Mon Sep 17 00:00:00 2001 From: Waldemar Reusch Date: Sun, 5 Feb 2023 12:34:48 +0100 Subject: [PATCH] fix(bundler): fix type mismatch introduced in last-minute 'fixes' --- src/bin/tools/jar.ts | 6 +++--- src/bin/tools/zip.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/tools/jar.ts b/src/bin/tools/jar.ts index 76fbba57..1ee53da9 100644 --- a/src/bin/tools/jar.ts +++ b/src/bin/tools/jar.ts @@ -57,9 +57,9 @@ export default async function jar({ groupId, artifactId, version, rootPath, targ const pathToRecord = () => new Transform({ objectMode: true, - transform: function (path, _, cb) { - const filename = relative(rootPath, path).split(sep).join("/"); - this.push({ filename, path }); + transform: function (fsPath, _, cb) { + const path = relative(rootPath, fsPath).split(sep).join("/"); + this.push({ path, fsPath }); cb(); }, final: function () { diff --git a/src/bin/tools/zip.ts b/src/bin/tools/zip.ts index 737ba4c2..5a2ad9be 100644 --- a/src/bin/tools/zip.ts +++ b/src/bin/tools/zip.ts @@ -216,7 +216,7 @@ export default function zip() { const writeRecord = async (source: ZipSource) => { if ("fsPath" in source) await writeFromPath(source.path, source.fsPath); else if ("data" in source) await writeFromBuffer(source.path, source.data); - else throw new Error("Illegal argument " + typeof source + " " + source); + else throw new Error("Illegal argument " + typeof source + " " + JSON.stringify(source)); }; /**