Show redirected files in --listFiles

This commit is contained in:
Sheetal Nandi
2019-09-20 14:23:04 -07:00
parent d6a3a944d7
commit 2d62050b8f
3 changed files with 13 additions and 3 deletions
+5 -1
View File
@@ -122,7 +122,11 @@ namespace ts {
export function listFiles(program: ProgramToEmitFilesAndReportErrors, writeFileName: (s: string) => void) {
if (program.getCompilerOptions().listFiles) {
forEach(program.getSourceFiles(), file => {
writeFileName(file.fileName);
writeFileName(
!file.redirectInfo ?
file.fileName :
`${file.fileName} -> ${file.redirectInfo.redirectTarget.fileName}`
);
});
}
}
@@ -67,7 +67,7 @@ namespace ts {
"/plugin-one/node_modules/plugin-two": new vfs.Symlink("/plugin-two"),
});
},
commandLineArgs: ["-p", "plugin-one"]
commandLineArgs: ["-p", "plugin-one", "--listFiles"]
});
});
}
@@ -1,6 +1,12 @@
//// [/lib/initial-buildOutput.txt]
/lib/tsc -p plugin-one
/lib/tsc -p plugin-one --listFiles
plugin-one/action.ts(4,14): error TS2742: The inferred type of 'actions' cannot be named without a reference to 'plugin-two/node_modules/typescript-fsa'. This is likely not portable. A type annotation is necessary.
/lib/lib.d.ts
/plugin-one/node_modules/typescript-fsa/index.d.ts
/plugin-one/action.ts
/plugin-two/node_modules/typescript-fsa/index.d.ts -> /plugin-one/node_modules/typescript-fsa/index.d.ts
/plugin-two/index.d.ts
/plugin-one/index.ts
exitCode:: 1