Skip to content

Commit

Permalink
feat!: unified presets 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 Sep 30, 2023
1 parent 871ee47 commit d3bb35b
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 d3bb35b

Please sign in to comment.