Fixed watcher for rename operations, and for allowJs in config file
(cherry picked from commit 745f32bbee
)
This commit is contained in:
parent
bf234887b0
commit
cc76f0f7f0
2 changed files with 3 additions and 2 deletions
|
@ -378,7 +378,8 @@ namespace ts {
|
|||
const filePath = typeof relativeFileName !== "string"
|
||||
? undefined
|
||||
: toPath(relativeFileName, baseDirPath, createGetCanonicalFileName(sys.useCaseSensitiveFileNames));
|
||||
if (eventName === "change" && fileWatcherCallbacks.contains(filePath)) {
|
||||
// Some applications save a working file via rename operations
|
||||
if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks.contains(filePath)) {
|
||||
for (const fileCallback of fileWatcherCallbacks.get(filePath)) {
|
||||
fileCallback(filePath);
|
||||
}
|
||||
|
|
|
@ -486,7 +486,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
function watchedDirectoryChanged(fileName: string) {
|
||||
if (fileName && !ts.isSupportedSourceFileName(fileName, commandLine.options)) {
|
||||
if (fileName && !ts.isSupportedSourceFileName(fileName, compilerOptions)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue