Skip to content

Commit caa7b75

Browse files
committed
feat: update client build version retrieval to use package metadata
1 parent 75ae251 commit caa7b75

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/lib/mars.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Transmission } from "../types/mars";
2-
import dotenv from "dotenv";
3-
dotenv.config();
2+
import packageJson from "../../package.json";
43

54
export const MARS_SERVER = {
65
host: "play.nexusgit.info",
@@ -13,8 +12,8 @@ export const MARS_SERVER = {
1312

1413
export const STATUS_REFRESH_INTERVAL_MS = 15_000;
1514

16-
// Get the current client build version from the package metadata.
17-
export const CLIENT_BUILD = process.env.npm_package_version;
15+
// Get the current client build version from package metadata.
16+
export const CLIENT_BUILD = packageJson.version;
1817

1918
/** Local placeholder feed until a signed manifest feed exists. */
2019
export const LOCAL_TRANSMISSIONS: Transmission[] = [

0 commit comments

Comments
 (0)