chore(release): unify all versions to v2.6.1 with single-source APP_VERSION

This commit is contained in:
Amirul Islam Redwan71
2026-11-13 01:32:48 +06:00
parent 5e552ee743
commit e6c63ce9fa
26 changed files with 108 additions and 58 deletions
+17
View File
@@ -0,0 +1,17 @@
import { readFileSync } from "node:fs";
function readPackageVersion(): string {
try {
const pkgUrl = new URL("../package.json", import.meta.url);
const raw = readFileSync(pkgUrl, "utf8");
const parsed = JSON.parse(raw);
if (typeof parsed?.version === "string" && parsed.version.trim()) {
return parsed.version.trim();
}
} catch {
// Fallback if package.json is unavailable at runtime
}
return "2.6.1";
}
export const APP_VERSION: string = readPackageVersion();