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"
|
const filePath = typeof relativeFileName !== "string"
|
||||||
? undefined
|
? undefined
|
||||||
: toPath(relativeFileName, baseDirPath, createGetCanonicalFileName(sys.useCaseSensitiveFileNames));
|
: 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)) {
|
for (const fileCallback of fileWatcherCallbacks.get(filePath)) {
|
||||||
fileCallback(filePath);
|
fileCallback(filePath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -486,7 +486,7 @@ namespace ts {
|
||||||
}
|
}
|
||||||
|
|
||||||
function watchedDirectoryChanged(fileName: string) {
|
function watchedDirectoryChanged(fileName: string) {
|
||||||
if (fileName && !ts.isSupportedSourceFileName(fileName, commandLine.options)) {
|
if (fileName && !ts.isSupportedSourceFileName(fileName, compilerOptions)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue