MCPcopy Index your code
hub / github.com/craftreactnative/ui / getPackageVersion

Function getPackageVersion

cli/src/cli.ts:11–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10// Function to get version from package.json
11function getPackageVersion(): string {
12 try {
13 // Use require to read package.json from the parent directory
14 const packageJson = require("../package.json");
15 return packageJson.version || "1.0.0";
16 } catch (error) {
17 console.warn(
18 "Warning: Could not read package.json version, using fallback"
19 );
20 return "1.0.0";
21 }
22}
23
24const program = new Command();
25

Callers 1

cli.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected