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.

Changelog preset is not correctly picked up

See original GitHub issue

Expected Behavior

Calling lerna version --conventional-commits --changelog-preset <preset> should use the given preset.

In my case conventional-changelog-emojis

EDIT: I found the issue, but I am not sure this is an issue with lerna or conventional-changelog-core. Since both syntax (see “Possible Solution”) seem to be supported when using the conventional-changelog-cli.

Please just close this, if you want. Sorry for bothering!

Current Behavior

The preset is picked up correctly:

lerna info getChangelogConfig Auto-prefixing conventional-commits preset 'emojis'

But the printed changelog does not use the chosen (or any preset) and prints like this:

# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 0.1.0 (2019-01-28)

- ✨ Feat 1 ([<sha>](<url>))
- 🛠 Config ([<sha>](<url>))

Using conventional changelog directly works, tough. Running conventional-changelog -p emojis -i CHANGELOG.md -s -r 0 will generate the correct changelog (in the root directory).

Possible Solution

~Digged into get-changelog-config.js but debugging is kinda hard, because of conventional-changelog only passing a function. But the transform function of the custom preset is never called.~

Seems like lerna “can not” resolve the “bloody Q.all”.

Basically it is this syntax (e.g. ember preset): https://github.com/conventional-changelog/conventional-changelog/blob/943542f3b2342bb5933d84847fb19b727c607df0/packages/conventional-changelog-ember/index.js#L10-L15

Versus this syntax (angular preset): https://github.com/conventional-changelog/conventional-changelog/blob/943542f3b2342bb5933d84847fb19b727c607df0/packages/conventional-changelog-angular/index.js#L8-L11

The angular preset syntax works with lerna! 🙂

Steps to Reproduce (for bugs)

  1. Setup monorepo with lerna
  2. Change a file and add commit \w message “✨ Feat 1”
  3. Change a file and add commit \w message “🛠 Config”
  4. lerna version --conventional-commits --changelog-preset emojis
lerna.json

{
  "version": "0.1.0",
  "npmClient": "yarn",
  "useWorkspaces": true,
  "command": {
    "version": {
      "conventionalCommits": true,
      "changelogPreset": "emojis",
      "exact": true,
      "message": "🔖 %s"
    }
  }
}
<!-- Please paste your `lerna.json` here -->

Context

Your Environment

Executable Version
lerna --version 3.10.7
npm --version 6.4.1
yarn --version 1.12.3
node --version 10.13.0
OS Version
NAME VERSION
macOS Sierra 10.14.2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sebaldcommented, Feb 13, 2019

@hutson Sorry, I didn’t want to offend anyone. When I first digged into the codebase I was confused that it still uses q, because the project is so widely used 🙂

1reaction
sebaldcommented, Feb 1, 2019

Thanks!

PS: I honestly was startled when I looked at conventional-changelog source and that it still uses q 😔

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Preset not longer showing up or loading since yest...
Today, after update: some of my presets are appearing, but the most important ones (and most complex) no longer appear in the preset...
Read more >
What's New in Preset
(Dataset) We fixed an issue for which the default temporal column wasn't picked up correctly. (Explore) We improved the metadata language and tooltip ......
Read more >
Changelog - Cypress Documentation
Fixed an issue with Angular Component Testing where urls within SASS/SCSS files were not being correctly resolved which could result in incomplete styling....
Read more >
If Logic Pro isn't working - Apple Support
Open Logic Pro and immediately press and hold the Control key before a project opens. In the alert, click Don't Launch. If Logic...
Read more >
LUNA Release Notes - Universal Audio Support Home
Plug-in preset favorites now work for UAD-2 plug-ins in the Unison ... AAC files that were labeled incorrectly with the MP3 file extension ......
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