Describe the bug
We have a custom conventional changelog preset (distributed as an npm package internally) that essentially extends conventional-changelog-conventionalcommits.
In the custom preset repository, we want to use the custom preset itself to generate the changelog, i.e. via commit-and-tag-version --config src/index.js. Elsewhere we can use the --preset option directly, so it's an issue only when working in the preset repo.
This worked well in v12 with the older conventional-changelog packages, as the preset factory function returned an object with writerOpts, parserOpts etc keys, which commit-and-tag-version then forwarded to conventional-changelog-conventionalcommits.
In v13, however, since the preset format changed - it now returns writer and parser keys - but commit-and-tag-version did not update its config options, things don't work magically out of the box anymore.
The workaround is to create a separate config file for the preset repo:
import createPreset from './index.js';
const preset = createPreset();
export default {
...preset,
writerOpts: preset.writer,
parserOpts: preset.parser,
};
However, I don't think that's ideal and feel like commit-and-tag-version config options should be updated to match the new preset structure.
Environment
commit-and-tag-version version: 11.0.0
Possible Solution
Deprecate the current writerOpts, parserOpts etc config options and add new ones that match the new preset structure.
Describe the bug
We have a custom conventional changelog preset (distributed as an npm package internally) that essentially extends
conventional-changelog-conventionalcommits.In the custom preset repository, we want to use the custom preset itself to generate the changelog, i.e. via
commit-and-tag-version --config src/index.js. Elsewhere we can use the--presetoption directly, so it's an issue only when working in the preset repo.This worked well in v12 with the older conventional-changelog packages, as the preset factory function returned an object with
writerOpts,parserOptsetc keys, which commit-and-tag-version then forwarded to conventional-changelog-conventionalcommits.In v13, however, since the preset format changed - it now returns
writerandparserkeys - but commit-and-tag-version did not update its config options, things don't work magically out of the box anymore.The workaround is to create a separate config file for the preset repo:
However, I don't think that's ideal and feel like commit-and-tag-version config options should be updated to match the new preset structure.
Environment
commit-and-tag-versionversion: 11.0.0Possible Solution
Deprecate the current
writerOpts,parserOptsetc config options and add new ones that match the new preset structure.