MCPcopy Create free account
hub / github.com/csskit/csskit / readVersion

Function readVersion

packages/csskit_vscode/src/main.js:115–123  ·  view source on GitHub ↗

* @param {string} versionPath * @returns {Promise }

(versionPath)

Source from the content-addressed store, hash-verified

113 * @returns {Promise<string | null>}
114 */
115async function readVersion(versionPath) {
116 try {
117 const content = await fsp.readFile(versionPath, "utf-8");
118 const trimmed = content.trim();
119 return trimmed || null;
120 } catch {
121 return null;
122 }
123}
124
125/**
126 * @typedef {{ tag_name: string, assets: Array<{ name: string, browser_download_url: string }> }} GithubRelease

Callers 1

ensureBinaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected