From 95d2735a81c6bf5d402aef248ddf912067dbbeaf Mon Sep 17 00:00:00 2001 From: murashit Date: Wed, 13 May 2026 10:13:02 +0900 Subject: [PATCH] Read panel client version from manifest --- src/constants.ts | 4 +++- tests/constants.test.ts | 10 ++++++++++ tsconfig.json | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/constants.test.ts diff --git a/src/constants.ts b/src/constants.ts index ef2c1019..e57ad9e4 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,3 +1,5 @@ +import manifest from "../manifest.json"; + export const VIEW_TYPE_CODEX_PANEL = "codex-panel-view"; export const DEFAULT_CODEX_PATH = "codex"; -export const CLIENT_VERSION = "0.1.0"; +export const CLIENT_VERSION = manifest.version; diff --git a/tests/constants.test.ts b/tests/constants.test.ts new file mode 100644 index 00000000..1d75aac8 --- /dev/null +++ b/tests/constants.test.ts @@ -0,0 +1,10 @@ +import { describe, expect, it } from "vitest"; + +import manifest from "../manifest.json"; +import { CLIENT_VERSION } from "../src/constants"; + +describe("constants", () => { + it("uses the manifest version for the panel client version", () => { + expect(CLIENT_VERSION).toBe(manifest.version); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index b079aab1..a712d5da 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,7 @@ "module": "ESNext", "moduleResolution": "Bundler", "allowSyntheticDefaultImports": true, + "resolveJsonModule": true, "strict": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true,