MCPcopy Create free account
hub / github.com/effect-app/libs / parsePackageVersion

Function parsePackageVersion

packages/cli/src/sync-effect-app-subtree.ts:55–61  ·  view source on GitHub ↗
(source: string, packagePath: string)

Source from the content-addressed store, hash-verified

53const resolveRequestedRef = (ref: string) => ref === "latest" ? "main" : ref
54
55const parsePackageVersion = (source: string, packagePath: string) => {
56 const parsed: unknown = JSON.parse(source)
57 if (!isRecord(parsed) || typeof parsed["version"] !== "string") {
58 throw new Error(`Could not read version from ${packagePath}`)
59 }
60 return parsed["version"]
61}
62
63const parseDefaultBranch = (source: string) => {
64 const line = source

Callers 1

Calls 2

parseMethod · 0.80
isRecordFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…