@release-it/conventional-changelog

    3.3.0 • Public • Published

    Conventional Changelog plugin for release-it

    This plugin will provide the recommended bump to release-it, and update the changelog file (e.g. CHANGELOG.md).

    npm install --save-dev @release-it/conventional-changelog
    

    Configuration

    In the release-it config, for example:

    "plugins": {
      "@release-it/conventional-changelog": {
        "preset": "angular",
        "infile": "CHANGELOG.md"
      }
    }

    Options are passed verbatim to conventional-recommended-bump and conventional-changelog-core.

    preset

    Use one of:

    • angular
    • atom
    • codemirror
    • conventionalcommits
    • ember
    • eslint
    • express
    • jquery
    • jscs
    • jshint

    Use an object with name and types to use a custom preset:

    "plugins": {
      "@release-it/conventional-changelog": {
        "infile": "CHANGELOG.md",
        "preset": {
          "name": "conventionalcommits",
          "types": [
            {
              "type": "feat",
              "section": "Features"
            },
            {
              "type": "fix",
              "section": "Bug Fixes"
            },
            {}
          ]
        }
      }
    }

    See the Conventional Changelog Configuration Spec (v2.1.0) for the configuration object to pass as preset.

    infile

    Default value: undefined

    • Set a filename as infile to write the changelog to. If this file does not exist yet, it's created with the full history.
    • When infile is not set, the changelog generated by this plugin will still be used as release notes for e.g. GitHub Releases.

    ignoreRecommendedBump

    Default value: false

    Use true to ignore the recommended bump, and use the version provided by release-it (command line argument or prompt).

    (Note that the changelog preview shows the recommended bump, as the desired version isn't known yet. The infile will have the correct version.)

    context

    Default value: undefined

    This option will be passed as the second argument (context) to conventional-changelog-core, for example:

    "plugins": {
      "@release-it/conventional-changelog": {
        "context": {
          "linkCompare": false
        }
      }
    }

    gitRawCommitsOpts

    Default value: undefined

    Options for git-raw-commits. For example, you can use the following option to include merge commits into changelog:

    {
      "plugins": {
        "@release-it/conventional-changelog": {
          "gitRawCommitsOpts": {
            "merges": null
          }
        }
      }
    }

    parserOpts

    Default value: undefined

    Options for conventional-commits-parser. For example, you can use the following option to set the merge pattern during parsing the commit message:

    {
      "plugins": {
        "@release-it/conventional-changelog": {
          "parserOpts": {
            "mergePattern": "^Merge pull request #(\\d+) from (.*)$"
          }
        }
      }
    }

    writerOpts

    Default value: undefined

    Options for conventional-changelog-writer. For example, you can use the following option to group the commits by 'scope' instead of 'type' by default.

    {
      "plugins": {
        "@release-it/conventional-changelog": {
          "writerOpts": {
            "groupBy:" "scope"
          }
        }
      }
    }

    GitHub Actions

    When using this plugin in a GitHub Action, make sure to set fetch-depth: 0 so the history is available to determine the correct recommended bump and changelog.

    Also see https://github.com/release-it/release-it/blob/master/docs/ci.md#github-actions

    Install

    npm i @release-it/conventional-changelog

    DownloadsWeekly Downloads

    30,645

    Version

    3.3.0

    License

    MIT

    Unpacked Size

    21.3 kB

    Total Files

    6

    Last publish

    Collaborators

    • webpro