release-it / conventional-changelog

Conventional changelog plugin for release-it
MIT License
125 stars 38 forks source link

Update conventional-changelog Dependency to Support Changelog Section Sort Order #65

Closed wesleyboar closed 1 year ago

wesleyboar commented 1 year ago

Goal

Support sorting / ordering changelog sections i.e.

conventional-changelog-conventionalcommits: sort groups based on config types (#702) (#1002) (0e59f0c) — v6.1.0

Idea

In https://github.com/release-it/conventional-changelog, update dependency https://github.com/conventional-changelog/conventional-changelog (from 3.1.25) to v4.0.0, so it will include conventional-changelog-conventionalcommits v6.1.0.

Possibly Related Issues

wesleyboar commented 1 year ago

Workaround: package.json property overrides (source) e.g. to package.json add:

  "overrides": {
    "conventional-changelog": "^4.0.0"
  },

Worked for me.

wesleyboar commented 1 year ago

To avoid the workaround, I tried adding —

      "writerOpts": {
        "groupBy": "type"
      }

— to .release-it.json, but the sorting did not change.

My Full .release-it.json ```{ "github": { "release": true }, "plugins": { "@release-it/conventional-changelog": { "infile": "CHANGELOG.md", "header": "# Changelog Test", "writerOpts": { "groupBy": "type" } "preset": { "name": "conventionalcommits", "types": [ { "type": "feat", "section": "Added" }, { "type": "fix", "section": "Changed" }, { "type": "docs", "section": "Documented" }, { "type": "perf", "section": "Changed" }, { "type": "refactor", "section": "Changed" }, { "type": "build", "section": "Other" }, { "type": "ops", "section": "Other" }, {} ] } } } } ```
webpro commented 1 year ago

I bumped versions and released v6.0.0 - happy to hear whether that does the job?

wesleyboar commented 1 year ago

Unfortunately, I paused usage of release-it in favor of trying GitHub Actions. It also is not going smoothly.[^1] When I revisit release-it solution, I will re-test this.

[^1]: I've begun to believe I am the problem 😅.

wesleyboar commented 1 year ago

Thanks for the quick reply and action.