Describe the bug
2 warnings:
- When running
commit-and-tag-version on Windows (and having default git configuration), file is generated with LF instead of CRLF.
- According to
markdownlint, generated CHANGELOG.md has an extra (unnecessary) break line. One line before each commit type header is enough. No need to put 2.
Current behavior
npx commit-and-tag-version --first-release
× skip version bump on first release
√ outputting changes to CHANGELOG.md
√ committing CHANGELOG.md
warning: in the working copy of 'CHANGELOG.md', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'CHANGELOG.md', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'CHANGELOG.md', LF will be replaced by CRLF the next time Git touches it
...


Expected behavior
No warnings
Environment
commit-and-tag-version version(s): v12.5.0
- Node/npm version: Node 20.17.0/npm 10.8.2
- OS: Windows 11
Possible Solution
Additional context
Describe the bug
2 warnings:
commit-and-tag-versionon Windows (and having default git configuration), file is generated with LF instead of CRLF.markdownlint, generatedCHANGELOG.mdhas an extra (unnecessary) break line. One line before each commit type header is enough. No need to put 2.Current behavior
Expected behavior
No warnings
Environment
commit-and-tag-versionversion(s): v12.5.0Possible Solution
Read git configuration (
git config --get core.autocrlf) and generate the file accordinglyos.EOLfrom os module (https://stackoverflow.com/a/16829025/767160)Remove the extra line from generated file
Additional context