diff --git a/src/lib/compiler.ts b/src/lib/compiler.ts index 4c413d0d22..16caf399e3 100644 --- a/src/lib/compiler.ts +++ b/src/lib/compiler.ts @@ -30,7 +30,6 @@ import { relative, basename, extname, join } from 'path' import { readFileSync, writeFileSync } from 'fs' -import { EOL } from 'os' import mkdirp = require('mkdirp') import bufferFrom from 'buffer-from' import stableStringify = require('fast-json-stable-stringify') @@ -160,7 +159,7 @@ export function createCompiler(configs: ConfigSet): TsCompiler { readDirectory: wrapWithDebug('readDirectory', ts.sys.readDirectory), getDirectories: wrapWithDebug('getDirectories', ts.sys.getDirectories), directoryExists: wrapWithDebug('directoryExists', ts.sys.directoryExists), - getNewLine: () => EOL, + getNewLine: () => '\n', getCurrentDirectory: () => cwd, getCompilationSettings: () => compilerOptions, getDefaultLibFileName: () => ts.getDefaultLibFilePath(compilerOptions), diff --git a/src/lib/config-set.ts b/src/lib/config-set.ts index c8b024e988..4bf22f855a 100644 --- a/src/lib/config-set.ts +++ b/src/lib/config-set.ts @@ -29,7 +29,6 @@ import { FormatDiagnosticsHost, ParsedCommandLine, } from 'typescript' -import { EOL } from 'os' import { TSError } from './ts-error' import { sha1 } from './sha1' import { stringify } from './json' @@ -354,7 +353,7 @@ export class ConfigSet { : this.compilerModule.formatDiagnostics const diagnosticHost: FormatDiagnosticsHost = { - getNewLine: () => EOL, + getNewLine: () => '\n', getCurrentDirectory: () => this.cwd, getCanonicalFileName: path => path, }