MCPcopy
hub / github.com/vercel/hyper / _getIntegrityFile

Method _getIntegrityFile

bin/yarn-standalone.js:48325–48335  ·  view source on GitHub ↗
(locationPath)

Source from the content-addressed store, hash-verified

48323 }
48324
48325 _getIntegrityFile(locationPath) {
48326 return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
48327 const expectedRaw = yield (_fs || _load_fs()).readFile(locationPath);
48328 try {
48329 return (0, (_extends2 || _load_extends()).default)({}, INTEGRITY_FILE_DEFAULTS(), JSON.parse(expectedRaw));
48330 } catch (e) {
48331 // ignore JSON parsing for legacy text integrity files compatibility
48332 }
48333 return null;
48334 })();
48335 }
48336
48337 _compareIntegrityFiles(actual, expected, checkFiles, workspaceLayout) {
48338 if (!expected) {

Callers 1

checkMethod · 0.80

Calls 5

_load_asyncToGeneratorFunction · 0.85
_load_fsFunction · 0.85
_load_extendsFunction · 0.85
INTEGRITY_FILE_DEFAULTSFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected