MCPcopy
hub / github.com/t3-oss/create-t3-app / getVersion

Function getVersion

cli/src/utils/getT3Version.ts:7–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import { PKG_ROOT } from "~/consts.js";
6
7export const getVersion = () => {
8 const packageJsonPath = path.join(PKG_ROOT, "package.json");
9
10 const packageJsonContent = fs.readJSONSync(packageJsonPath) as PackageJson;
11
12 return packageJsonContent.version ?? "1.0.0";
13};

Callers 3

mainFunction · 0.85
renderVersionWarningFunction · 0.85
runCliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected