Refactor: derive version from package.json

This commit is contained in:
Peter Steinberger
2025-11-25 17:10:53 +01:00
parent c251681a40
commit 20fc412765
3 changed files with 11 additions and 2 deletions

7
src/version.ts Normal file
View File

@@ -0,0 +1,7 @@
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
const pkg = require("../package.json") as { version?: string };
// Single source of truth for the current warelay version (reads from package.json).
export const VERSION = pkg.version ?? "0.0.0";