MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / readVersion

Function readVersion

apps/cli/src/release.ts:77–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75};
76
77const readVersion = async (): Promise<string> => {
78 const pkg = (await Bun.file(versionPackagePath).json()) as { version?: string };
79 const version = pkg.version?.trim();
80
81 if (!version) {
82 throw new Error(`Missing version in ${versionPackagePath}`);
83 }
84
85 return version;
86};
87
88const validateVersion = (version: string): void => {
89 if (!semverPattern.test(version)) {

Callers 1

mainFunction · 0.85

Calls 1

jsonMethod · 0.65

Tested by

no test coverage detected