From c77437949b4ff943ab2c238ebdc451ba709f8383 Mon Sep 17 00:00:00 2001 From: Zhi Date: Fri, 12 Jun 2026 03:47:06 +0800 Subject: [PATCH 1/2] fix: log update check failures instead of silently swallowing The update check in both the esbuild builder and Vite plugin used \.catch(() => {})\ which silently discards all errors. This means network failures, parse errors, and timeouts during version checking are never surfaced to the developer. Log failures via \console.debug\ so they appear in verbose/debug output without cluttering normal dev server output. --- packages/fresh/src/dev/builder.ts | 4 +++- packages/plugin-vite/src/mod.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/fresh/src/dev/builder.ts b/packages/fresh/src/dev/builder.ts index c78ec430fae..fec31131f1d 100644 --- a/packages/fresh/src/dev/builder.ts +++ b/packages/fresh/src/dev/builder.ts @@ -170,7 +170,9 @@ export class Builder { options: ListenOptions = {}, ): Promise { // Run update check in background - updateCheck(UPDATE_INTERVAL).catch(() => {}); + updateCheck(UPDATE_INTERVAL).catch((e) => + console.debug("Update check failed:", e), + ); this.config.mode = "development"; diff --git a/packages/plugin-vite/src/mod.ts b/packages/plugin-vite/src/mod.ts index c49c244526c..81308faeee4 100644 --- a/packages/plugin-vite/src/mod.ts +++ b/packages/plugin-vite/src/mod.ts @@ -223,7 +223,9 @@ export function fresh(config?: FreshViteConfig): Plugin[] { }, async configResolved(vConfig) { // Run update check in background - updateCheck(UPDATE_INTERVAL).catch(() => {}); + updateCheck(UPDATE_INTERVAL).catch((e) => + console.debug("Update check failed:", e), + ); fConfig.islandsDir = pathWithRoot(fConfig.islandsDir, vConfig.root); fConfig.routeDir = pathWithRoot(fConfig.routeDir, vConfig.root); From 886c014c30e7333791e20a8c7ae103ef52df1ed7 Mon Sep 17 00:00:00 2001 From: Zhi Date: Sat, 13 Jun 2026 01:49:29 +0800 Subject: [PATCH 2/2] fix: use console.warn instead of console.debug for update check failures \console.debug\ output is invisible at Deno's default log level (\info\), making the fix functionally equivalent to the original silent swallow. \console.warn\ ensures the failure is visible in normal dev server output without needing \--log-level debug\. --- packages/fresh/src/dev/builder.ts | 2 +- packages/plugin-vite/src/mod.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fresh/src/dev/builder.ts b/packages/fresh/src/dev/builder.ts index fec31131f1d..a9cdb9eb791 100644 --- a/packages/fresh/src/dev/builder.ts +++ b/packages/fresh/src/dev/builder.ts @@ -171,7 +171,7 @@ export class Builder { ): Promise { // Run update check in background updateCheck(UPDATE_INTERVAL).catch((e) => - console.debug("Update check failed:", e), + console.warn("Update check failed:", e), ); this.config.mode = "development"; diff --git a/packages/plugin-vite/src/mod.ts b/packages/plugin-vite/src/mod.ts index 81308faeee4..21a16f8a935 100644 --- a/packages/plugin-vite/src/mod.ts +++ b/packages/plugin-vite/src/mod.ts @@ -224,7 +224,7 @@ export function fresh(config?: FreshViteConfig): Plugin[] { async configResolved(vConfig) { // Run update check in background updateCheck(UPDATE_INTERVAL).catch((e) => - console.debug("Update check failed:", e), + console.warn("Update check failed:", e), ); fConfig.islandsDir = pathWithRoot(fConfig.islandsDir, vConfig.root);