Add --prettier flag for Prettier-formatted changelogs#155
Conversation
976f9ce to
79caa80
Compare
Mrtenz
left a comment
There was a problem hiding this comment.
Rather than running Prettier programatically, couldn't we just remove the changelog from the ignore list, and disable formatting with a flag?
https://github.com/MetaMask/metamask-module-template/blob/main/package.json#L45
|
I'm not sure. The |
We run Prettier regardless, hence why it's currently ignored. |
|
Not always at the same time as updating the changelog though. There's also the |
|
If we ignore formating, enforcing that the sections are always in the same order may be more complex. Yes @Gudahtt, this is why I passed the formatter to both |
|
Ok, makes sense! |
|
If we are not willing to add a formatter, I suppose I could workaround like this: Replace And replace and then check if the |
This PR adds a new
--prettierflag. When enabled, this flag signals that the tool should expect the changelog to be formatted using Prettier. By default, this flag is set tofalse, ensuring backward compatibility with all existingCHANGELOG.mdfiles.The primary motivation for this change is to overcome a current limitation of
auto-changelog. At present, our tool does not support the changelog format provided by Keep a Changelog (version ^1.1.0).Fixes: #60