GithubHelp home page GithubHelp logo

pomierski / changelog-md-helper Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 116 KB

CLI tool for maintaining a changelog file for a software project

License: MIT License

JavaScript 7.25% TypeScript 92.75%

changelog-md-helper's Introduction

changelog-md-helper

The changelog-md-helper is a tool for maintaining a changelog file for a software project. The library provides functions for setting the correct Semantic Versioning (SemVer) version on top of the changelog and sorting the entries within the file.

The library is designed to make it easy for developers to keep their changelog file organized and up-to-date, ensuring that the changelog accurately reflects the development history of the project.

By using this library, developers can save time and reduce the risk of manual errors when updating their changelog file.

Usage

Add changelog helper to your dependencies

npm install --save-dev changelog-md-helper
// or
yarn add --dev changelog-md-helper

Initialize config

npx changelog-md-helper --init

Add changelog helper as your package.json script

"scripts": {
    "changelog:release": "changelog-md-helper",
    "changelog:sort": "changelog-md-helper --sort-only"
}

Now you can use

yarn changelog:release
// or
yarn changelog:sort

Config (cmh-config.json)

You can find default values for changelog in default-config.json. Remember that default values will be used for all options that weren't set

  • vNextTemplate: This is the string template that will be used to replace it with the next version.

  • releaseTemplate: This is the string template that will be used to represent a released version, with $version_placeholder to be replaced by the version number and $date_placeholder to be replaced by the release date.

    • if your release header is e.g (v1.0.0) released 2023-03-03, then set your release header to (v$version_placeholder) released $date_placeholder
  • majorTemplate: This is the string template that will be used to find a major version change in the changelog.

  • minorTemplate: This is the string template that will be used to find a minor version change in the changelog.

  • patchTemplate: This is the string template that will be used to find a patch version change in the changelog.

  • useRegexInTemplates: This is a boolean value that indicates whether regular expressions can be used in the templates.

  • parseTemplatesToRegex: This is a boolean value that indicates whether the templates should be parsed as regular expressions.

  • dateFormat: This is a string that specifies the date format to be used in the releaseTemplate.

  • bumpMinorByMajor: This is a boolean value that indicates whether a minor version should be bumped when a major version is bumped.

  • bumpMinorByPatch: This is a boolean value that indicates whether a minor version should be bumped when a patch version is bumped.

  • sortChangelog: This is a boolean value that indicates whether the changelog should be sorted in a particular order.

  • changelogPath: This is a string that specifies the path to the changelog file.

  • displayExampleCommit: This is a boolean value that indicates whether an example commit should be displayed.

Options

  • [-so, --sort-only] option allows the user to sort the changelog without setting a new version header. This option is meant for situations where the user wants to reorganize the existing entries in the changelog, but does not want to release a new version.

  • [-i, --init] option allows the user to initialize default config.

Special thanks

  • ChatGPT for this readme.md :P

changelog-md-helper's People

Contributors

pomierski avatar

Stargazers

Karol Stawowski avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.