Merge pull request #31270 from ajafff/getParsedCommandLine-path

parseProjectReferenceConfigFile: always set SourceFile.path
This commit is contained in:
Sheetal Nandi
2019-05-06 12:59:33 -07:00
committed by GitHub

View File

@@ -2688,6 +2688,7 @@ namespace ts {
return undefined;
}
sourceFile = Debug.assertDefined(commandLine.options.configFile);
Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath);
addFileToFilesByName(sourceFile, sourceFilePath, /*redirectedPath*/ undefined);
}
else {
@@ -2699,11 +2700,12 @@ namespace ts {
projectReferenceRedirects.set(sourceFilePath, false);
return undefined;
}
sourceFile.path = sourceFilePath;
sourceFile.resolvedPath = sourceFilePath;
sourceFile.originalFileName = refPath;
commandLine = parseJsonSourceFileConfigFileContent(sourceFile, configParsingHost, basePath, /*existingOptions*/ undefined, refPath);
}
sourceFile.path = sourceFilePath;
sourceFile.resolvedPath = sourceFilePath;
sourceFile.originalFileName = refPath;
const resolvedRef: ResolvedProjectReference = { commandLine, sourceFile };
projectReferenceRedirects.set(sourceFilePath, resolvedRef);
if (commandLine.projectReferences) {