absolute-version / commit-and-tag-version

Fork of the excellent standard-version. Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org :trophy:
ISC License
385 stars 36 forks source link

Show commits in changelog even if they don't follow format #71

Closed felixvd closed 1 year ago

felixvd commented 1 year ago

Pretty simple usage question, but is there a way to show commits that don't follow the conventionalcommits format? It would be convenient if they appeared under e.g. an "Other" heading.

TimothyJones commented 1 year ago

Not as far as I'm aware, sorry.

From a quick glance at the conventional-changelog-config-spec I don't see a way to do this, but that doesn't mean it isn't possible with some option.

Following the fork rationale, this might be a little outside the remit, but I'd be happy to expose anything that you can make the conventional-commit related dependencies do.

felixvd commented 1 year ago

Thanks for the quick response. conventional-changelog-cli adds the commits without sections if no preset is set, so they are parsed at least.

I'm guessing the undefined types are discarded here. Is there a way to define writerOpts.transform in the package.json, or use a custom preset? I'm not very experienced with JS so I'm stabbing in the dark.

TimothyJones commented 1 year ago

You can use a custom preset with the preset option - which I believe you can set on the command line or in the package json like this:

{
  "commit-and-tag-version": {
    "preset": "alternative-preset-name"
  }
}
TimothyJones commented 1 year ago

Looking at the code, I think it will treat preset: "" as no preset, and then override it with the default. So you might have to figure out which preset will do what you want.

TimothyJones commented 1 year ago

I'll close this for now. Please feel free to reopen (or make another issue) if you have any further questions