Refactor: derive version from package.json
This commit is contained in:
7
src/version.ts
Normal file
7
src/version.ts
Normal 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";
|
||||
Reference in New Issue
Block a user