DEV Community

Cover image for gitmoji-changelog v2 is out πŸŽ‰
🦁 Yvonnick FRIN
🦁 Yvonnick FRIN

Posted on • Originally published at yvonnickfrin.dev

gitmoji-changelog v2 is out πŸŽ‰

gitmoji-changelog is a command line tool that generates changelog files for projects following gitmoji convention.

gitmoji-changelog usage example

Last week, I published the version 2.0.0 πŸ”–

There was two major goals in this version:

  • Making the cli available for all kinds of projects not only JavaScript ones
  • Add tests to be more confident about merging contributions

πŸ— Preset system

To enable the cli for more users than the JavaScript ones ❀️ we needed find another way to gather projects metadata like name, version and description than we did in first version. Previously, we get these from the first package.json file we found in the upper folder hierarchy. We extracted this logic from our core package and imagine a simple system to make the cli more flexible. Benjamin Petetot proposed a preset system describe in this issue.

The usage is quite simple you have to call the cli with preset option filled with the preset you want to use:

gitmoji-changelog --preset=node
Enter fullscreen mode Exit fullscreen mode

We only wrote the preset for node right now. We need you to help us identify which preset to develop. Please fill this form so we know the presets you want πŸ™Œ

We add presets section in our documentation. It also contains a tutorial that explains how to write a new preset. Feel free to open a pull request to add one that doesn't already exist πŸ™

βœ… E2E tests

To make the code base easier to refactored and simplify contributors work, We spend some time adding e2e tests. It was quite hard since we didn't find a simple solution to test a cli that interacts with the filesystem (if you know some library to do it tell us in comment section).

With these tests we are not afraid anymore to broke the cli each time we commit some changes πŸ˜‚

There are two commands to execute tests now. One for unit tests:

yarn test
Enter fullscreen mode Exit fullscreen mode

Another one for e2e tests:

yarn test:e2e
Enter fullscreen mode Exit fullscreen mode

✨ Interactive mode

Special mention to Franck Abgrall who added a whole feature. Using the option -i let you enter in interactive mode:

gitmoji-changelog -i
Enter fullscreen mode Exit fullscreen mode

In this mode you can pick which commits you want to add into your changelog for the current version.

gitmoji-changelog interactive mode

πŸ’‘ Documentation

Before releasing, we made some effort to improve the documentation. We put it into a separate file to keep our README.md as simple as possible. We did the same thing with the contributing guide. The documentation now describes all available options in the cli. We also clarified how the cli works and the workflow we recommend using.

Don't hesitate to tell us if something isn't clear enough.

❀️ Thanks

We only talked about presets and tests to keep it short but a lot of other things have been done in this version! Find more in our changelog πŸ˜‰

I would like to all contributors that took time to improve gitmoji-changelog Benjamin Petetot, Franck Abgrall, quentinncl, Baptiste Gauduchon, Florent Berthelot, s n, Mathieu TUDISCO, Emmanuel DEMEY and Fabien JUIF.

I'm really proud you choose this project to make your contributions πŸ‘


Feedback is appreciated πŸ™ Please tweet me if you have any questions @YvonnickFrin!

If you encounter any issue using gitmoji-changelog tell us on our repository!

Top comments (2)

Collapse
 
jessekphillips profile image
Jesse Phillips • Edited

You mentioned that node is the only preset and want requests. Is it not possible to not use this without a preset not being set?

That was fun editing.

Collapse
 
yvonnickfrin profile image
🦁 Yvonnick FRIN

Hi Jesse,

Since this post was written, gitmoji-changelog had a few improvements. Especially a generic preset was coded to enable every kind of projects to use gitmoji-changelog. You can find the documentation on this preset in the usage section of the README.md πŸ˜„

Feel free to ask if you have any questions!