conventionalcommits preset broken
See original GitHub issueHi,
I have just installed the latest version of this, and the conventionalcommits
preset seems to be broken.
I did a bit of digging, and it seems to be breaking here: https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-preset-loader/index.js#L36
But path
is always a string for me, so the callback-style here:
https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-conventionalcommits/index.js
I looked into other presets, and they either take a callback only, or directly return a promise. However, they do not seem to be taking any config or so, so not sure how to fix this, as the config is used in multiple places here.
So basically, these styles seem to be working:
// Angular
module.exports = Q.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts])
.spread((conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts) => {
return { conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts }
})
// Ember
module.exports = presetOpts
function presetOpts (cb) {
Q.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts])
.spread((conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts) => {
cb(null, { gitRawCommitsOpts: { noMerges: null }, conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts })
})
}
But this is not working:
module.exports = function (config) {
return Q.all([
conventionalChangelog(config),
parserOpts(config),
recommendedBumpOpts(config),
writerOpts(config)
]).spread((conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts) => {
return { conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts }
})
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
@tommywo thanks for the fix. when can we expect a release?
Is there a past release that I can use in the meantime where the
conventionalcommits
preset was working? I tried a few but can’t get it to output anything.