{"id":18613429,"url":"https://github.com/release-it/conventional-changelog","last_synced_at":"2025-05-15T06:08:23.791Z","repository":{"id":41063269,"uuid":"168369417","full_name":"release-it/conventional-changelog","owner":"release-it","description":"Conventional changelog plugin for release-it","archived":false,"fork":false,"pushed_at":"2025-05-04T08:13:16.000Z","size":389,"stargazers_count":142,"open_issues_count":11,"forks_count":41,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-04T09:21:22.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/release-it.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-30T15:50:19.000Z","updated_at":"2025-05-04T08:13:20.000Z","dependencies_parsed_at":"2024-06-18T12:39:21.652Z","dependency_job_id":"8f690439-501a-44fc-becc-47ccdaecc862","html_url":"https://github.com/release-it/conventional-changelog","commit_stats":{"total_commits":136,"total_committers":11,"mean_commits":"12.363636363636363","dds":0.08088235294117652,"last_synced_commit":"1f3d145ae79a95ded3c2dc6b8387e1e449cb10e2"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/release-it%2Fconventional-changelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/release-it%2Fconventional-changelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/release-it%2Fconventional-changelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/release-it%2Fconventional-changelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/release-it","download_url":"https://codeload.github.com/release-it/conventional-changelog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254283350,"owners_count":22045141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T03:22:04.113Z","updated_at":"2025-05-15T06:08:18.780Z","avatar_url":"https://github.com/release-it.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conventional Changelog plugin for release-it\n\nThis plugin will provide the recommended bump to release-it, and update the changelog file (e.g. `CHANGELOG.md`).\n\n```\nnpm install --save-dev @release-it/conventional-changelog\n```\n\n## Configuration\n\nIn the [release-it][1] config, for example:\n\n```json\n\"plugins\": {\n  \"@release-it/conventional-changelog\": {\n    \"preset\": {\n      \"name\": \"angular\"\n    },\n    \"infile\": \"CHANGELOG.md\"\n  }\n}\n```\n\nThe plugin is a wrapper around conventional-changelog packages [conventional-recommended-bump][2],\n[conventional-changelog-core][3] and more.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e For the `conventionalcommits` preset, you may need to override the version\n\u003e of the transitive `conventional-changelog-conventionalcommits` dependency, like so:\n\u003e\n\u003e ```json\n\u003e {\n\u003e   \"overrides\": {\n\u003e     \"conventional-changelog-conventionalcommits\": \"8.0.0\"\n\u003e   }\n\u003e }\n\u003e ```\n\u003e\n\u003e Use `\"resolutions\"` for pnpm or Yarn.\n\n## Contents\n\n- [`preset`][4]\n- Bump\n  - [`commitsOpts`][5]\n  - [`tagOpts`][6]\n  - [`whatBump`][7]\n  - [`ignoreRecommendedBump`][8]\n  - [`strictSemVer`][9]\n- Changelog\n  - [`infile`][10]\n  - [`header`][11]\n  - [`context`][12]\n  - [`gitRawCommitsOpts`][13]\n  - [`parserOpts`][14]\n  - [`writerOpts`][15]\n\n### `preset`\n\nFor `preset.name`, use one of:\n\n- `angular`\n- `atom`\n- `codemirror`\n- `conventionalcommits`\n- `ember`\n- `eslint`\n- `express`\n- `jquery`\n- `jscs`\n- `jshint`\n\nUse an object with `name` and `types` to use a custom preset:\n\n```json\n\"plugins\": {\n  \"@release-it/conventional-changelog\": {\n    \"infile\": \"CHANGELOG.md\",\n    \"preset\": {\n      \"name\": \"conventionalcommits\",\n      \"types\": [\n        {\n          \"type\": \"feat\",\n          \"section\": \"Features\"\n        },\n        {\n          \"type\": \"fix\",\n          \"section\": \"Bug Fixes\"\n        },\n        {}\n      ]\n    }\n  }\n}\n```\n\nThis is passed as the first argument to [`bumper.loadPreset`][16] (in both bumper and changelog writer).\n\nSee the [Conventional Changelog Configuration Spec (v2.1.0)][17] for the configuration object to pass as `preset`.\n\n## Bump\n\n### `tagOpts`\n\n- This option will be passed as the first argument to [`bumper.tag`][16]\n- [Type definition for `tagOpts` → look for `GetSemverTagsParams`][18]\n\n### `commitsOpts`\n\n- This option will be passed as the first argument to [`bumper.commits`][16]\n- [Type definition for `commitsOpts` → look for `GetCommitsParams`][18]\n\n### `whatBump`\n\n- This option will be passed as the first argument to [`bumper.bump`][16]\n- [Type definition for `whatBump` → look for `Preset['whatBump']`][19]\n- Use `false` to skip releasing a new version:\n\n```json\n{\n  \"plugins\": {\n    \"@release-it/conventional-changelog\": {\n      \"whatBump\": false\n    }\n  }\n}\n```\n\n- Use a function to manually provide a bump:\n\n```js\nmodule.exports = {\n  plugins: {\n    '@release-it/conventional-changelog': {\n      whatBump: function () {\n        return { releaseType: '10.0.1' };\n      }\n    }\n  }\n};\n```\n\n### `ignoreRecommendedBump`\n\nDefault value: `false`\n\nUse `true` to ignore the recommended bump, and use the version provided by release-it (command line argument or prompt).\n\nNote that the changelog preview shows the recommended bump, as the desired version isn't known yet in the release-it\nprocess. The `infile` will have the correct version.\n\n### `strictSemVer`\n\nDefault value: `false`\n\nUse `true` to strictly follow semver, also in consecutive pre-releases. This means that from a pre-release, a\nrecommended bump will result in a next pre-release for the next version.\n\nFor example, from `1.0.0-alpha.0` a recommended bump of `minor` will result in a `preminor` bump to `1.1.0-alpha.0`.\n\nThe default behavior results in a `prerelease` bump to `1.0.0-alpha.1`.\n\n## Changelog\n\n### `infile`\n\nDefault value: `undefined`\n\n- Set a filename as `infile` to write the changelog to. If this file does not exist yet, it's created with the full\n  history.\n- When `infile` is not set, the changelog generated by this plugin will still be used as release notes for e.g. [GitHub\n  Releases][20].\n- Set `infile: false` to disable the changelog writing (and only use the recommended bump for the next version).\n\n### `header`\n\nDefault value: `\"# Changelog\"`\n\nSet the main header for the changelog document:\n\n```json\n{\n  \"plugins\": {\n    \"@release-it/conventional-changelog\": {\n      \"infile\": \"CHANGELOG.md\",\n      \"header\": \"# Changelog\",\n      \"preset\": {\n        \"name\": \"conventionalcommits\"\n      }\n    }\n  }\n}\n```\n\n### `context`\n\nDefault value: `undefined`\n\nThis option will be passed as the second argument (`context`) to [conventional-changelog-core][21], for example:\n\n```json\n\"plugins\": {\n  \"@release-it/conventional-changelog\": {\n    \"context\": {\n      \"linkCompare\": false\n    }\n  }\n}\n```\n\n### `gitRawCommitsOpts`\n\nDefault value: `undefined`\n\nOptions for [`git-raw-commits`][22]. For example, you can use the following option to include merge commits into\nchangelog:\n\n```json\n{\n  \"plugins\": {\n    \"@release-it/conventional-changelog\": {\n      \"gitRawCommitsOpts\": {\n        \"merges\": null\n      }\n    }\n  }\n}\n```\n\n### `parserOpts`\n\n- Default value: `undefined`\n- Options for [`conventional-commits-parser`][23]\n- This option will also be passed as the second argument to [`bumper.parserOptions`][16]\n- [Type definition for `parserOpts` → look for `ParserOptions`][24]\n\nFor example, you can use the following option to set the merge pattern during parsing the commit message:\n\n```json\n{\n  \"plugins\": {\n    \"@release-it/conventional-changelog\": {\n      \"parserOpts\": {\n        \"mergePattern\": \"^Merge pull request #(\\\\d+) from (.*)$\"\n      }\n    }\n  }\n}\n```\n\n### `writerOpts`\n\n- Default value: `undefined`\n- Options for [`conventional-changelog-writer`][25]\n- [Type definition for `writerOpts` → look for `Options`][26]\n\nFor example, you can use the following option to group the commits by 'scope' instead of 'type' by default.\n\n```json\n{\n  \"plugins\": {\n    \"@release-it/conventional-changelog\": {\n      \"writerOpts\": {\n        \"groupBy\": \"scope\"\n      }\n    }\n  }\n}\n```\n\nIf you want to customize the templates used to write the changelog, you can do it like in a `.release-it.js` file like\nso:\n\n```js\nconst fs = require('fs');\n\nconst commitTemplate = fs.readFileSync('commit.hbs').toString();\n\nmodule.exports = {\n  plugins: {\n    '@release-it/conventional-changelog': {\n      writerOpts: {\n        commitPartial: commitTemplate\n      }\n    }\n  }\n};\n```\n\n## Command-line\n\nOptions for this plugin can be set from the command line. Some examples:\n\n```\nrelease-it --plugins.@release-it/conventional-changelog.infile=history.md\nrelease-it --no-plugins.@release-it/conventional-changelog.infile\n```\n\n- Keys are separated by dots.\n- Values can be negated by prefixing the key with `no-`.\n- Arguments may need to be single-quoted (`'`) such as `--'deep.key=value'` or `'--deep.key=value'`\n\nDepending on your shell or OS this may differ.\n\n## GitHub Actions\n\nWhen using this plugin in a GitHub Action, make sure to set [`fetch-depth: 0`][27] so the history is available to\ndetermine the correct recommended bump and changelog.\n\nAlso see [https://github.com/release-it/release-it/blob/master/docs/ci.md#github-actions][28]\n\n[1]: https://github.com/release-it/release-it\n[2]:\n  https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-recommended-bump#readme\n[3]:\n  https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#api\n[4]: #preset\n[5]: #commitsopts\n[6]: #tagopts\n[7]: #whatbump\n[8]: #ignorerecommendedbump\n[9]: #strictsemver\n[10]: #infile\n[11]: #header\n[12]: #context\n[13]: #gitrawcommitsopts\n[14]: #parseropts\n[15]: #writeropts\n[16]:\n  https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/README.md#api\n[17]: https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.1.0/README.md\n[18]: https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/git-client/src/types.ts\n[19]:\n  https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/src/types.ts\n[20]: https://github.com/release-it/release-it/blob/master/docs/github-releases.md\n[21]:\n  https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#context\n[22]: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-raw-commits#api\n[23]:\n  https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser#api\n[24]:\n  https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-commits-parser/src/types.ts\n[25]:\n  https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#api\n[26]:\n  https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-writer/src/types/options.ts\n[27]: https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches\n[28]: https://github.com/release-it/release-it/blob/master/docs/ci.md#github-actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelease-it%2Fconventional-changelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelease-it%2Fconventional-changelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelease-it%2Fconventional-changelog/lists"}