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

feat: control which linefeed character to use #45

Merged
merged 7 commits into from Jun 12, 2019
Merged

feat: control which linefeed character to use #45

merged 7 commits into from Jun 12, 2019

Conversation

merceyz
Copy link
Contributor

@merceyz merceyz commented Jun 12, 2019

What:
Allow the user to control which linefeed character to use.

Why:
Babel does not care about line endings and always uses \n, which means you're forced to keep the output files in the same format for fixtures to work. Which in a repository where core.autocrlf = true means extra config files and mixing the linefeed used in the repository. This is an unnecessary process that can be eliminated.

How:
After babel has transformed the code run a regex to replace the line endings with either \n, \r\n, the system default, or preserve from input, depending on what the user specifies.

@codecov-io
Copy link

codecov-io commented Jun 12, 2019

Codecov Report

Merging #45 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #45   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         132    143   +11     
  Branches       33     35    +2     
=====================================
+ Hits          132    143   +11
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d22086...3b5e5ce. Read the comment docs.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@kentcdodds kentcdodds merged commit 8c38231 into babel-utils:master Jun 12, 2019
@merceyz merceyz deleted the eol branch June 12, 2019 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants