MCPcopy Create free account
hub / github.com/nodejs/node / resolvedProjectReferenceUptoDate

Function resolvedProjectReferenceUptoDate

test/fixtures/snapshot/typescript.js:116431–116458  ·  view source on GitHub ↗
(oldResolvedRef, oldRef)

Source from the content-addressed store, hash-verified

116429 resolvedProjectReferenceUptoDate(program.getResolvedProjectReferences()[index], oldRef);
116430 }
116431 function resolvedProjectReferenceUptoDate(oldResolvedRef, oldRef) {
116432 if (oldResolvedRef) {
116433 // Assume true
116434 if (ts.contains(seenResolvedRefs, oldResolvedRef))
116435 return true;
116436 var refPath_1 = resolveProjectReferencePath(oldRef);
116437 var newParsedCommandLine = getParsedCommandLine(refPath_1);
116438 // Check if config file exists
116439 if (!newParsedCommandLine)
116440 return false;
116441 // If change in source file
116442 if (oldResolvedRef.commandLine.options.configFile !== newParsedCommandLine.options.configFile)
116443 return false;
116444 // check file names
116445 if (!ts.arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newParsedCommandLine.fileNames))
116446 return false;
116447 // Add to seen before checking the referenced paths of this config file
116448 (seenResolvedRefs || (seenResolvedRefs = [])).push(oldResolvedRef);
116449 // If child project references are upto date, this project reference is uptodate
116450 return !ts.forEach(oldResolvedRef.references, function (childResolvedRef, index) {
116451 return !resolvedProjectReferenceUptoDate(childResolvedRef, oldResolvedRef.commandLine.projectReferences[index]);
116452 });
116453 }
116454 // In old program, not able to resolve project reference path,
116455 // so if config file doesnt exist, it is uptodate.
116456 var refPath = resolveProjectReferencePath(oldRef);
116457 return !getParsedCommandLine(refPath);
116458 }
116459 }
116460 ts.isProgramUptoDate = isProgramUptoDate;
116461 function getConfigFileParsingDiagnostics(configFileParseResult) {

Callers 1

projectReferenceUptoDateFunction · 0.85

Calls 5

getParsedCommandLineFunction · 0.85
forEachMethod · 0.65
containsMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected