Hi, currently we are able to overwrite parserOpts and writerOpts:
|
return { |
|
parserOpts: { ...loadedConfig.parser, ...parserOpts }, |
|
writerOpts: { ...loadedConfig.writer, ...writerOpts }, |
|
}; |
|
}; |
but we miss a capability to overwrite whatBump() function used by presets, e.g. conventional-changelog-conventionalcommits:
export default async function createPreset (config) {
return {
commits: {
ignore: config?.ignoreCommits,
merges: false
},
parser: createParserOpts(config),
writer: await createWriterOpts(config),
whatBump: createWhatBump(config)
}
}
In case of this specific preset, whatBump() impacts the generated release notes because of a) commit object modification (which is a preset issue itself) b) hardcoded breakingHeaderPattern here:
export const breakingHeaderPattern = /^(\w*)(?:\((.*)\))?!: (.*)$/
which ignores the breakingHeaderPattern value passed to parserOpts (which, I guess, makes sense as whatBump() is a separate function). If we could overwrite a function - we would be able to align parser and whatBump() logic on our end.
Hi, currently we are able to overwrite
parserOptsandwriterOpts:release-notes-generator/lib/load-changelog-config.js
Lines 35 to 39 in 354354b
but we miss a capability to overwrite
whatBump()function used by presets, e.g.conventional-changelog-conventionalcommits:In case of this specific preset,
whatBump()impacts the generated release notes because of a)commitobject modification (which is a preset issue itself) b) hardcodedbreakingHeaderPatternhere:which ignores the
breakingHeaderPatternvalue passed toparserOpts(which, I guess, makes sense aswhatBump()is a separate function). If we could overwrite a function - we would be able to alignparserandwhatBump()logic on our end.