From 9c0075cb0cee0dceb5273e681b7957e14263a4ed Mon Sep 17 00:00:00 2001 From: Sonja Askim Date: Thu, 14 May 2026 11:53:47 +0200 Subject: [PATCH] chore: derive APP_VERSION from package.json at build time Removes the manually-maintained version string in app-version.ts and imports version directly from package.json, so there is a single source of truth. Enables resolveJsonModule in tsconfig to support the import. Co-Authored-By: Claude Sonnet 4.6 --- src/app/app-version.ts | 3 ++- tsconfig.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/app-version.ts b/src/app/app-version.ts index c6ad3d9..6fd885b 100644 --- a/src/app/app-version.ts +++ b/src/app/app-version.ts @@ -1 +1,2 @@ -export const APP_VERSION = '1.0.1'; +import { version } from '../../package.json'; +export const APP_VERSION = version; diff --git a/tsconfig.json b/tsconfig.json index 33e10b0..096b112 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,8 @@ "importHelpers": true, "target": "ES2022", "module": "ES2022", - "useDefineForClassFields": false + "useDefineForClassFields": false, + "resolveJsonModule": true }, "angularCompilerOptions": { "angularStandalone": true,