diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 62ba54e3d18..34e18cf7212 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -638,7 +638,7 @@ namespace ts { return { getSourceFile, getDefaultLibLocation, - getDefaultLibFileName: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), getDefaultLibFileName(options)), + getDefaultLibFileName: options => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)), writeFile, getCurrentDirectory: memoize(() => sys.getCurrentDirectory()), useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 36bc7717974..58ba1b41c09 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -712,8 +712,21 @@ namespace ts { output += usage + makePadding(marginLength - usage.length + 2) + description + sys.newLine; if (kindsList) { - for (const kind of kindsList) { - output += makePadding(marginLength + 4) + kind + sys.newLine; + const maxElementsInLine = 6; + for (let idx = 0; idx < kindsList.length; idx++) { + // We have to manually cut the line because the list is too long and it will be very hard to read with auto-wrapping + // It will print in the following format: + // 'es5' 'es6' 'es2015' + // 'es7' 'es2016' 'dom' + // .... + const positionInLine = idx % maxElementsInLine; + if (positionInLine === 0) { + output += makePadding(marginLength + 4); + } + output += kindsList[idx] + " "; + if (positionInLine === maxElementsInLine - 1) { + output += sys.newLine; + } } output += sys.newLine; }