Question: with `conventional-changelog-recommended-bump` v10 how do I provide a custom preset?
Closed this issue · 3 comments
Hi there,
Before with v9 of the library it was possible to provide a custom template through options like seen here: https://github.com/favware/cliff-jumper/blob/ab8d611813a18efedfdba0df07ccfb98005fbaa3/src/commands/get-conventional-bump.ts#L18-L112. However with v10 all these options are gone and only loadPreset
is left. How can I ensure that my library can still use the custom preset with v10?
For the most part my custom preset is the same as the angular
preset, with the exception that I have provided a breakingHeaderPattern
to config.parserOpts
so I would also accept a way to use the Angular preset but override that option only.
That said, assuming that would be through classInstanceOfBumper.getPreset
/ .preset
, those are completely untyped in the published bundle of the package so that doesn't help much either
bumper.d.ts
:
export declare class Bumper {
private readonly gitClient;
private preset;
private whatBump;
private tagGetter;
private commitsGetter;
constructor(cwdOrGitClient?: string | ConventionalGitClient);
private getLastSemverTag;
private getCommits;
private getPreset;
Sorry for blind spots in documentation, I will fix that.
new Bumper()
.commits({
path: '...'
}, parserOpts)
.tag({
prefix: packagePrefix(lernaPackage)
})
.bump(whatBump)
bumper.commits(params: GetCommitsParams & Params, parserOptions?: ParserStreamOptions): this
conventional-changelog/packages/git-client/src/types.ts
Lines 1 to 29 in d3b8aaa
bumper.tag(paramsOrTag: GetSemverTagsParams & Params | string): this
conventional-changelog/packages/git-client/src/types.ts
Lines 44 to 57 in d3b8aaa