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

Unexpected CHANGES.md file header on Windows #24

Open manuel-sv opened 5 years ago

manuel-sv commented 5 years ago

Hi,

I am using studio-changes v1.7.0 and get the following error when I try to update my CHANGES.md on Windows:

Unexpected CHANGES.md file header

There was already an issue on this topic (#1) but the problem still occured in my case. I also tried to replace "\r\n" with "\n" using Notepad++ but get the same error.

Thanks for your help! Manuel

mantoni commented 5 years ago

Can you post the first couple of line from your CHANGES.md file?

manuel-sv commented 5 years ago

Sure, here they are:

# Changes

## 0.6.0

Line endings are CR+LF.

mantoni commented 5 years ago

I tried to reproduce with a test case, but there doesn't seem to be anything wrong with the header you've posted. The piece of code that is checking the header is this:

https://github.com/javascript-studio/studio-changes/blob/9d16e0211028ef872cd64be3f998f8f5c0bd9758/lib/changes.js#L65-L71

Maybe you can add a console.log statement to figure out why the expression isn't matching?

Sorry for not being able to help here.