MCPcopy
hub / github.com/ampproject/amphtml / depCheck

Function depCheck

build-system/tasks/dep-check.js:273–292  ·  view source on GitHub ↗

* @return {Promise }

()

Source from the content-addressed store, hash-verified

271 * @return {Promise<void>}
272 */
273async function depCheck() {
274 const handlerProcess = createCtrlcHandler('dep-check');
275 await css();
276 await compileJison();
277 logLocalDev('Checking dependencies...');
278 const entryPointModule = await getEntryPointModule();
279 const moduleGraph = await getModuleGraph(entryPointModule);
280 const errorsFound = runRules(flattenGraph(moduleGraph));
281 if (errorsFound) {
282 log(
283 yellow('NOTE:'),
284 'Invalid dependencies must be removed, while valid ones must be added to',
285 cyan('build-system/test-configs/dep-check-config.js')
286 );
287 throw new Error('Dependency checks failed');
288 } else {
289 logLocalDev(green('SUCCESS:'), 'Checked all dependencies.');
290 }
291 exitCtrlcHandler(handlerProcess);
292}
293
294/**
295 * Put value in Array context.

Callers

nothing calls this directly

Calls 11

compileJisonFunction · 0.85
logLocalDevFunction · 0.85
getEntryPointModuleFunction · 0.85
getModuleGraphFunction · 0.85
runRulesFunction · 0.85
flattenGraphFunction · 0.85
yellowFunction · 0.85
cyanFunction · 0.85
greenFunction · 0.85
cssFunction · 0.50
logFunction · 0.50

Tested by

no test coverage detected