diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index 2f03e5bc5d4..7a98c43dd04 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -488,14 +488,14 @@ namespace ts { const watchFilePath = compilerOptions.extendedDiagnostics ? ts.addFilePathWatcherWithLogging : ts.addFilePathWatcher; const watchDirectoryWorker = compilerOptions.extendedDiagnostics ? ts.addDirectoryWatcherWithLogging : ts.addDirectoryWatcher; + const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); + let newLine = updateNewLine(); + writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames}`); if (configFileName) { watchFile(host, configFileName, scheduleProgramReload, writeLog); } - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); - let newLine = updateNewLine(); - const compilerHost: CompilerHost & ResolutionCacheHost = { // Members for CompilerHost getSourceFile: (fileName, languageVersion, onError?, shouldCreateNewSourceFile?) => getVersionedSourceFileByPath(fileName, toPath(fileName), languageVersion, onError, shouldCreateNewSourceFile), @@ -583,7 +583,9 @@ namespace ts { // Compile the program if (loggingEnabled) { - writeLog(`CreatingProgramWith::\n roots: ${JSON.stringify(rootFileNames)}\n options: ${JSON.stringify(compilerOptions)}`); + writeLog(`CreatingProgramWith::`); + writeLog(` roots: ${JSON.stringify(rootFileNames)}`); + writeLog(` options: ${JSON.stringify(compilerOptions)}`); } const needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !program;