(stateFile?: string)
| 72 | } |
| 73 | |
| 74 | async function readUpdateState(stateFile?: string): Promise<UpdateState> { |
| 75 | try { |
| 76 | const raw = await readFile(await readStateFilePath(stateFile), "utf-8"); |
| 77 | return JSON.parse(raw) as UpdateState; |
| 78 | } catch { |
| 79 | return {}; |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | async function writeUpdateState(state: UpdateState, stateFile?: string): Promise<void> { |
| 84 | const path = await writeStateFilePath(stateFile); |
no test coverage detected