From c7d7265c5c0316b2ed5a4108639f73b928298683 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 06:44:11 +0000 Subject: [PATCH 1/2] Initial plan From 425db9ae5e584901d6feaa0b77ddc2eb15ab92cf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 06:46:19 +0000 Subject: [PATCH 2/2] fix: resolve lint errors from ESLint 10 upgrade - Add error cause to preserve error chain in retry.ts, authConfig.ts, and fileConfig.ts - Remove useless initial assignment in redeploy.ts Co-authored-by: timowestnosto <13622115+timowestnosto@users.noreply.github.com> --- src/api/retry.ts | 4 +++- src/config/authConfig.ts | 4 ++-- src/config/fileConfig.ts | 4 ++-- src/modules/deployments/redeploy.ts | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/api/retry.ts b/src/api/retry.ts index 6c4644e..982603a 100644 --- a/src/api/retry.ts +++ b/src/api/retry.ts @@ -22,7 +22,9 @@ async function executeWithRetry( if (operationType === "fetch") { Logger.error(`${chalk.red("✗")} ${chalk.cyan(filePath)}: ${errorMessage}`) } - throw new Error(`Failed to ${operationType} ${filePath} after ${MAX_RETRIES} retries: ${errorMessage}`) + throw new Error(`Failed to ${operationType} ${filePath} after ${MAX_RETRIES} retries: ${errorMessage}`, { + cause: error + }) } const delay = INITIAL_RETRY_DELAY * Math.pow(2, retryCount) Logger.warn( diff --git a/src/config/authConfig.ts b/src/config/authConfig.ts index 3d7ac48..d9fba43 100644 --- a/src/config/authConfig.ts +++ b/src/config/authConfig.ts @@ -32,10 +32,10 @@ export function parseAuthFile({ allowIncomplete }: { allowIncomplete?: boolean } return AuthConfigSchema.parse(rawConfig) } catch (error) { if (error instanceof z.ZodError) { - throw new Error(`Invalid auth file at ${AuthConfigFilePath}: ${error.message}`) + throw new Error(`Invalid auth file at ${AuthConfigFilePath}: ${error.message}`, { cause: error }) } if (error instanceof SyntaxError) { - throw new Error(`Invalid JSON in auth file at ${AuthConfigFilePath}: ${error.message}`) + throw new Error(`Invalid JSON in auth file at ${AuthConfigFilePath}: ${error.message}`, { cause: error }) } throw error } diff --git a/src/config/fileConfig.ts b/src/config/fileConfig.ts index 02d9e11..64d5063 100644 --- a/src/config/fileConfig.ts +++ b/src/config/fileConfig.ts @@ -29,10 +29,10 @@ export function parseConfigFile({ return PartialPersistentConfigSchema.parse(rawConfig) } catch (error) { if (error instanceof z.ZodError) { - throw new Error(`Invalid configuration file at ${configPath}: ${error.message}`) + throw new Error(`Invalid configuration file at ${configPath}: ${error.message}`, { cause: error }) } if (error instanceof SyntaxError) { - throw new Error(`Invalid JSON in configuration file at ${configPath}: ${error.message}`) + throw new Error(`Invalid JSON in configuration file at ${configPath}: ${error.message}`, { cause: error }) } throw error } diff --git a/src/modules/deployments/redeploy.ts b/src/modules/deployments/redeploy.ts index 3857c50..6203088 100644 --- a/src/modules/deployments/redeploy.ts +++ b/src/modules/deployments/redeploy.ts @@ -14,7 +14,7 @@ type RedeployOptions = { } export async function deploymentsRedeploy({ deploymentId, force }: RedeployOptions) { - let selectedDeployment = null + let selectedDeployment let selectedDeploymentId if (deploymentId) {