From d46d935c4147453f682296e7f725c782905539a1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 04:20:25 +0000 Subject: [PATCH 1/2] Initial plan From 2954ad90022e43f0965720b1fed2c71b49f71245 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 04:25:48 +0000 Subject: [PATCH 2/2] Fix error handling in publish workflow to prevent panics Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com> --- .github/workflows/publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3c97ae0..e419e3e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -67,7 +67,7 @@ jobs: try { denoJson = JSON.parse(fileContent); } catch (err) { - throw new Error(\`Invalid JSON in \${filePath}: \${err.message}\`); + throw new Error(\`Invalid JSON in \${filePath}: \${err instanceof Error ? err.message : String(err)}\`); } // Ensure denoJson is an object @@ -83,7 +83,7 @@ jobs: console.log(\`Successfully updated \${filePath} to version \${version}\`); } catch (err) { - console.error('Error updating deno.json:', err.message); + console.error('Error updating deno.json:', err instanceof Error ? err.message : String(err)); Deno.exit(1); } " @@ -121,7 +121,7 @@ jobs: try { pkgJson = JSON.parse(fileContent); } catch (err) { - throw new Error(\`Invalid JSON in \${filePath}: \${err.message}\`); + throw new Error(\`Invalid JSON in \${filePath}: \${err instanceof Error ? err.message : String(err)}\`); } // Ensure pkgJson is an object @@ -137,7 +137,7 @@ jobs: console.log(\`Successfully updated \${filePath} to version \${version}\`); } catch (err) { - console.error('Error updating package.json.template:', err.message); + console.error('Error updating package.json.template:', err instanceof Error ? err.message : String(err)); Deno.exit(1); } "