MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / readPackageVersion

Function readPackageVersion

scripts/prepare-release.mjs:54–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52const CHANGELOG_PATH = resolve(process.cwd(), 'CHANGELOG.md');
53
54function readPackageVersion() {
55 const pkg = JSON.parse(readFileSync(resolve(process.cwd(), 'package.json'), 'utf8'));
56 if (!pkg.version) throw new Error('package.json has no "version" field');
57 return pkg.version;
58}
59
60function todayUtcIsoDate() {
61 // YYYY-MM-DD in UTC. Matches the CHANGELOG's existing convention

Callers 1

mainFunction · 0.70

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected