Skip to content

Commit 47fff43

Browse files
committed
fix: we are not writing files, use normalized EOL
1 parent cea9cc8 commit 47fff43

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/lib/compiler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import { relative, basename, extname, join } from 'path'
3232
import { readFileSync, writeFileSync } from 'fs'
33-
import { EOL } from 'os'
3433
import mkdirp = require('mkdirp')
3534
import bufferFrom from 'buffer-from'
3635
import stableStringify = require('fast-json-stable-stringify')
@@ -160,7 +159,7 @@ export function createCompiler(configs: ConfigSet): TsCompiler {
160159
readDirectory: wrapWithDebug('readDirectory', ts.sys.readDirectory),
161160
getDirectories: wrapWithDebug('getDirectories', ts.sys.getDirectories),
162161
directoryExists: wrapWithDebug('directoryExists', ts.sys.directoryExists),
163-
getNewLine: () => EOL,
162+
getNewLine: () => '\n',
164163
getCurrentDirectory: () => cwd,
165164
getCompilationSettings: () => compilerOptions,
166165
getDefaultLibFileName: () => ts.getDefaultLibFilePath(compilerOptions),

src/lib/config-set.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {
2929
FormatDiagnosticsHost,
3030
ParsedCommandLine,
3131
} from 'typescript'
32-
import { EOL } from 'os'
3332
import { TSError } from './ts-error'
3433
import { sha1 } from './sha1'
3534
import { stringify } from './json'
@@ -354,7 +353,7 @@ export class ConfigSet {
354353
: this.compilerModule.formatDiagnostics
355354

356355
const diagnosticHost: FormatDiagnosticsHost = {
357-
getNewLine: () => EOL,
356+
getNewLine: () => '\n',
358357
getCurrentDirectory: () => this.cwd,
359358
getCanonicalFileName: path => path,
360359
}

0 commit comments

Comments
 (0)