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

Function readVersion

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

Source from the content-addressed store, hash-verified

100};
101
102const readVersion = async (): Promise<string> => {
103 const pkg = (await Bun.file(versionPackagePath).json()) as { version?: string };
104 const version = pkg.version?.trim();
105
106 if (!version) {
107 throw new Error(`Missing version in ${versionPackagePath}`);
108 }
109
110 return version;
111};
112
113const validateVersion = (version: string): void => {
114 if (!semverPattern.test(version)) {

Callers 1

mainFunction · 0.85

Calls 1

jsonMethod · 0.65

Tested by

no test coverage detected