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

Function getVersion

src/utils/getT3Version.ts:6–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

mainFunction · 0.85
runCliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected