(lastKnownGood: Record<string, string>)
| 70 | } |
| 71 | |
| 72 | async function createLastKnownGoodFile(lastKnownGood: Record<string, string>) { |
| 73 | const content = `${JSON.stringify(lastKnownGood, null, 2)}\n`; |
| 74 | await fs.promises.mkdir(folderUtils.getCorepackHomeFolder(), {recursive: true}); |
| 75 | await fs.promises.writeFile(getLastKnownGoodFilePath(), content, `utf8`); |
| 76 | } |
| 77 | |
| 78 | export function getLastKnownGoodFromFileContent(lastKnownGood: Record<string, string>, packageManager: string) { |
| 79 | if (Object.hasOwn(lastKnownGood, packageManager)) |
no test coverage detected
searching dependent graphs…