question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

conventionalcommits preset broken

See original GitHub issue

Hi,

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:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
thomasbottonaricommented, Sep 20, 2019

@tommywo thanks for the fix. when can we expect a release?

2reactions
thomasbottonaricommented, Sep 23, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conventional Commits
BREAKING CHANGE: a commit that has a footer BREAKING CHANGE: , or appends a ! after the type/scope, introduces a breaking API change...
Read more >
VSCode Conventional Commits - Visual Studio Marketplace
Blank means no line breaks. "" conventionalCommits.promptBody, Control whether the extension should prompt for the body section. true. conventionalCommits.
Read more >
conventional-changelog-conventionalcommits - Socket
A concrete implementation of the specification described at conventionalcommits.org for automated CHANGELOG generation and version management.
Read more >
semantic-release breaking-change using ! (exclamation mark)
When I looked at the source code conventional-changelog-conventionalcommits it seamed like breaking change in header should be supported. enter ...
Read more >
README - semantic-release
By default, semantic-release uses Angular Commit Message Conventions. ... Major Breaking Release (Note that the BREAKING CHANGE: token must be in the footer ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found