MCPcopy Create free account
hub / github.com/upstash/context7 / writeUpdateState

Function writeUpdateState

packages/cli/src/utils/update-check.ts:83–87  ·  view source on GitHub ↗
(state: UpdateState, stateFile?: string)

Source from the content-addressed store, hash-verified

81}
82
83async function writeUpdateState(state: UpdateState, stateFile?: string): Promise<void> {
84 const path = await writeStateFilePath(stateFile);
85 await mkdir(dirname(path), { recursive: true });
86 await writeFile(path, JSON.stringify(state, null, 2) + "\n", "utf-8");
87}
88
89export function compareVersions(a: string, b: string): number {
90 const normalize = (version: string): number[] =>

Callers 2

checkForUpdatesFunction · 0.85

Calls 1

writeStateFilePathFunction · 0.85

Tested by

no test coverage detected