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
commit 6c4876a00a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {