Read panel client version from manifest

This commit is contained in:
murashit 2026-05-13 10:13:02 +09:00
parent 079b9c2500
commit 95d2735a81
3 changed files with 14 additions and 1 deletions

View file

@ -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;

10
tests/constants.test.ts Normal file
View file

@ -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);
});
});

View file

@ -6,6 +6,7 @@
"module": "ESNext",
"moduleResolution": "Bundler",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,