Skip to content

Warnings when generating CHANGELOG.md #195

Open
@gian1200

Description

@gian1200

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
...

image
image

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

  • Read git configuration (git config --get core.autocrlf) and generate the file accordingly

  • Remove the extra line from generated file

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions