(state, project, resolvedPath)
| 124929 | } |
| 124930 | } |
| 124931 | function getUpToDateStatusWorker(state, project, resolvedPath) { |
| 124932 | var force = !!state.options.force; |
| 124933 | var newestInputFileName = undefined; |
| 124934 | var newestInputFileTime = minimumDate; |
| 124935 | var host = state.host; |
| 124936 | // Get timestamps of input files |
| 124937 | for (var _i = 0, _a = project.fileNames; _i < _a.length; _i++) { |
| 124938 | var inputFile = _a[_i]; |
| 124939 | if (!host.fileExists(inputFile)) { |
| 124940 | return { |
| 124941 | type: ts.UpToDateStatusType.Unbuildable, |
| 124942 | reason: "".concat(inputFile, " does not exist") |
| 124943 | }; |
| 124944 | } |
| 124945 | if (!force) { |
| 124946 | var inputTime = ts.getModifiedTime(host, inputFile); |
| 124947 | if (inputTime > newestInputFileTime) { |
| 124948 | newestInputFileName = inputFile; |
| 124949 | newestInputFileTime = inputTime; |
| 124950 | } |
| 124951 | } |
| 124952 | } |
| 124953 | // Container if no files are specified in the project |
| 124954 | if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) { |
| 124955 | return { |
| 124956 | type: ts.UpToDateStatusType.ContainerOnly |
| 124957 | }; |
| 124958 | } |
| 124959 | // Collect the expected outputs of this project |
| 124960 | var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames()); |
| 124961 | // Now see if all outputs are newer than the newest input |
| 124962 | var oldestOutputFileName = "(none)"; |
| 124963 | var oldestOutputFileTime = maximumDate; |
| 124964 | var newestOutputFileName = "(none)"; |
| 124965 | var newestOutputFileTime = minimumDate; |
| 124966 | var missingOutputFileName; |
| 124967 | var newestDeclarationFileContentChangedTime = minimumDate; |
| 124968 | var isOutOfDateWithInputs = false; |
| 124969 | if (!force) { |
| 124970 | for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) { |
| 124971 | var output = outputs_1[_b]; |
| 124972 | // Output is missing; can stop checking |
| 124973 | // Don't immediately return because we can still be upstream-blocked, which is a higher-priority status |
| 124974 | if (!host.fileExists(output)) { |
| 124975 | missingOutputFileName = output; |
| 124976 | break; |
| 124977 | } |
| 124978 | var outputTime = ts.getModifiedTime(host, output); |
| 124979 | if (outputTime < oldestOutputFileTime) { |
| 124980 | oldestOutputFileTime = outputTime; |
| 124981 | oldestOutputFileName = output; |
| 124982 | } |
| 124983 | // If an output is older than the newest input, we can stop checking |
| 124984 | // Don't immediately return because we can still be upstream-blocked, which is a higher-priority status |
| 124985 | if (outputTime < newestInputFileTime) { |
| 124986 | isOutOfDateWithInputs = true; |
| 124987 | break; |
| 124988 | } |
no test coverage detected
searching dependent graphs…