MCPcopy
hub / github.com/vercel/next-forge / getCurrentVersion

Function getCurrentVersion

scripts/update.ts:71–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 await rm(tempDirName, { recursive: true, force: true });
70
71const getCurrentVersion = async (): Promise<string | undefined> => {
72 const packageJsonPath = join(process.cwd(), "package.json");
73 const packageJsonContents = await readFile(packageJsonPath, "utf-8");
74 const packageJson = JSON.parse(packageJsonContents) as { version?: string };
75
76 return packageJson.version;
77};
78
79const selectVersion = async (
80 label: string,

Callers 1

updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected