From f654310c4df7bef932f0b9767d4aa5f9d718769b Mon Sep 17 00:00:00 2001 From: gorkem-bwl Date: Thu, 23 Apr 2026 23:33:41 -0400 Subject: [PATCH] fix(client): source app version from package.json The client version shown on the Settings page was hardcoded as a literal in vite.config.ts, while client/package.json sat at the placeholder "0.0.0". Bumping the displayed version required editing two unrelated places, and stale Docker client images would keep showing the old number after upgrades. This change makes client/package.json the single source of truth and reads it at build time. Bumps client/package.json from 0.0.0 to 3.6.1 to preserve current behaviour. Closes #3271 --- client/package.json | 2 +- client/vite.config.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/package.json b/client/package.json index 2e6b5cfcb..783f7e045 100644 --- a/client/package.json +++ b/client/package.json @@ -1,7 +1,7 @@ { "name": "client", "private": true, - "version": "0.0.0", + "version": "3.6.1", "type": "module", "scripts": { "dev": "vite", diff --git a/client/vite.config.ts b/client/vite.config.ts index 075bc7a0b..f3209eaea 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -3,11 +3,13 @@ import react from "@vitejs/plugin-react"; import svgr from "vite-plugin-svgr"; import path from "path"; import { fileURLToPath } from "url"; +import { readFileSync } from "fs"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); export default defineConfig(({}) => { - let version = "3.6.1"; + const pkg = JSON.parse(readFileSync(path.resolve(__dirname, "package.json"), "utf-8")); + const version = pkg.version; return { base: "/",