javascript-studio / studio-changes

📦 Generate a changelog as part of the npm version command
https://medium.com/javascript-studio/nice-and-easy-module-releases-a32c906b564e
MIT License
49 stars 7 forks source link

CRLF #2

Closed mantoni closed 7 years ago

mantoni commented 7 years ago

If the CHANGES.md file is checked out on Windows with CRLF, the header detection and the check for an already existing version fail.

With this fix, the checks are made with regular expressions to support CRLF and LF. The initial check for the header is also used to detect which newline style is used.

There are two open points:

@tivac Can you check?

Fixes #1

tivac commented 7 years ago

Looks fine to me. I'm having a problem where the editor package is immediately returning instead of waiting for the file to be closed, but I'll dig into that separately.

tivac commented 7 years ago

(just verified that editor thing is 100% unrelated, totally a local config issue! 👍 )

mantoni commented 7 years ago

I read about git log a bit more and it seems to always print out LF only, regardless of settings.

mantoni commented 7 years ago

Released in v1.0.5. Please update.