MCPcopy Index your code
hub / github.com/nodejs/corepack / createLastKnownGoodFile

Function createLastKnownGoodFile

sources/Engine.ts:72–76  ·  view source on GitHub ↗
(lastKnownGood: Record<string, string>)

Source from the content-addressed store, hash-verified

70}
71
72async 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
78export function getLastKnownGoodFromFileContent(lastKnownGood: Record<string, string>, packageManager: string) {
79 if (Object.hasOwn(lastKnownGood, packageManager))

Callers 1

activatePackageManagerFunction · 0.85

Calls 1

getLastKnownGoodFilePathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…