Skip to content

Commit

Permalink
feat!: update preset interface
Browse files Browse the repository at this point in the history
BREAKING CHANGE: preset now exports preset config factory function. See conventional-changelog/conventional-changelog#1045.
  • Loading branch information
sheerlox committed Oct 1, 2023
1 parent 532019c commit c1bd57d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ const conventionalChangelogConventionalCommits =
const commitGroupsSort = require('./lib/commit-groups-compare');
const transform = require('./lib/commit-transform');

/**
* @type {Promise<Object>} preset with `parserOpts` and `writerOpts`.
*/
module.exports = conventionalChangelogConventionalCommits.then((preset) =>
_.merge(preset, {
writerOpts: { transform, commitGroupsSort, groupBy: 'groupType' },
})
);
async function createPreset() {
return conventionalChangelogConventionalCommits.then((preset) =>
_.merge(preset, {
writerOpts: { transform, commitGroupsSort, groupBy: 'groupType' },
})
);
}

module.exports = createPreset;

0 comments on commit c1bd57d

Please sign in to comment.