MCPcopy Index your code
hub / github.com/react/react / readSavedBuildMetadata

Function readSavedBuildMetadata

scripts/devtools/utils.js:95–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95function readSavedBuildMetadata() {
96 const path = join(BUILD_METADATA_TEMP_DIRECTORY, 'metadata');
97
98 if (!existsSync(path)) {
99 console.error(chalk.red('Expected to find build metadata at:'));
100 console.error(chalk.dim(` ${path}`));
101 process.exit(1);
102 }
103
104 const {archivePath, currentCommitHash} = readJsonSync(path);
105
106 return {archivePath, currentCommitHash};
107}
108
109function saveBuildMetadata({archivePath, currentCommitHash}) {
110 const path = join(BUILD_METADATA_TEMP_DIRECTORY, 'metadata');

Callers 1

mainFunction · 0.85

Calls 2

exitMethod · 0.80
errorMethod · 0.65

Tested by

no test coverage detected