Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ts.transpile() outputs CRLF as EOL in any OS #2614

Closed
teppeis opened this issue Apr 4, 2015 · 7 comments · Fixed by #2640
Closed

ts.transpile() outputs CRLF as EOL in any OS #2614

teppeis opened this issue Apr 4, 2015 · 7 comments · Fixed by #2640
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@teppeis
Copy link

teppeis commented Apr 4, 2015

CRLF is hardcoded:
https://github.com/Microsoft/TypeScript/blob/5e7343f573c3e987caaa3f2326386b8c796e6fa3/src/services/services.ts#L1683

@mhegazy
Copy link
Contributor

mhegazy commented Apr 6, 2015

@teppeis would the use of system-dependent line ending be good enough?

@mhegazy mhegazy added the Bug A bug in TypeScript label Apr 6, 2015
@mhegazy mhegazy added this to the TypeScript 1.5 milestone Apr 6, 2015
@mhegazy mhegazy self-assigned this Apr 6, 2015
@teppeis
Copy link
Author

teppeis commented Apr 6, 2015

@mhegazy yes, sys.newLine is good.

@nycdotnet
Copy link

FYI: The line endings question has come up in every meta-TypeScript project I've been involved in:

TypeStrong/atom-typescript#216
TypeStrong/grunt-ts#199

This issue is still open as accepting PR:

#1693

It's fine to default to the current system's default line ending but to solve this, it really should be overrideable via the tsconfig or a switch. I had intended to take a stab at 1693, but of course this is the sort of thing where the implementation is the easy part and naming the switch is the hard part. :-)

@mhegazy
Copy link
Contributor

mhegazy commented Apr 6, 2015

@nycdotnet i agree. i was initially going to do fix it by adding the flag. if you intend to send a PR for #1693 soon, then i would wait for it.

@nycdotnet
Copy link

I'll give it a shot and let you know either way in the next two weeks. Based on the ~80% 1.5 issues treadmill, I'm hopeful this should be in plenty of time.

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Apr 6, 2015
@teppeis
Copy link
Author

teppeis commented Apr 7, 2015

@mhegazy thanks!

@basarat
Copy link
Contributor

basarat commented Apr 8, 2015

Having looked at @nycdotnet 's list I am now inclined to say "os.eol" or death in the next meta ts project :)

@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants