Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version heading should use h2 level #317

Open
NateScarlet opened this issue Mar 28, 2019 · 17 comments
Open

version heading should use h2 level #317

NateScarlet opened this issue Mar 28, 2019 · 17 comments
Labels

Comments

@NateScarlet
Copy link

image

image

@stevemao
Copy link
Member

I believe it was fixed by conventional-changelog/conventional-changelog#237. Are you on the latest version?

@NateScarlet
Copy link
Author

@NateScarlet
Copy link
Author

Found duplicate with #208

@jcornaz
Copy link

jcornaz commented Jul 31, 2020

It is obviously not solved. (or the poblem came back)

Look at versions 8.0.1 and 8.0.2 in standard-version's changelog: https://raw.githubusercontent.com/conventional-changelog/standard-version/91cd83c35145b733cd2407f106ebe43b5ce3edc5/CHANGELOG.md

@stevemao Can you reopen the issue?

@tonai
Copy link

tonai commented Oct 13, 2020

I just test this package I found really great, but I think the header problem is still present.
See https://github.com/tonai/react-deploy/commit/9057ee81875c4972d26da658c75c3828156ab99e
I have ### 0.1.1 (2020-10-13) but it should be ## 0.1.1 (2020-10-13)

@tonai
Copy link

tonai commented Oct 13, 2020

Ok I miss the fact that for the first release you should run npm run release -- --first-release.
It looks better: https://github.com/tonai/react-deploy/commit/797d7240ec3c5df3b6897fa7f0e9c7a0b7513748

@tonai
Copy link

tonai commented Oct 13, 2020

It still looks a little odd for patch releases: https://github.com/tonai/react-deploy/commit/b44911e45ca9861df4cc191aa116e5381e8c8de0

It is ok for minor release: https://github.com/tonai/react-deploy/commit/2cdadf4acff8940bc648e6570fe8be32fdbafa79

Is it something that is wanted ?

@weareoutman
Copy link

weareoutman commented Nov 2, 2020

For the example below, the Bug Fixes heading should be a subheading of the release 0.1.2, but now they are at the same level. This also caused bots like renovatebot failed to parse the changelog.

### 0.1.2

### Bug Fixes

* some fixes.

@bcoe bcoe added the bug label Nov 2, 2020
@ghost
Copy link

ghost commented Mar 2, 2021

Hi !
I have the same problem !

Is it fixed ?
Thanks !

@NateScarlet
Copy link
Author

changes that fix this problem is not included in [email protected]

for now, i use a postchangelog script:

sed -r -e 's/^#{1,3} \[/## [/' -i CHANGELOG.md

@ghost
Copy link

ghost commented Apr 2, 2021

Any updates about that ?
thanks !

@amokmen
Copy link

amokmen commented Apr 21, 2021

sed -r -e 's/^#{1,3} \[/## [/' -i CHANGELOG.md

Spent 2 hours fighting backslash "\" problem!

It's not working if directly included in .versionrc.js as

module.exports = {
  scripts: {
    postchangelog: "sed -r -e 's/^#{1,3} \[/## [/' -i CHANGELOG.md",
  },
};

Because there are 2 problems arise:

  1. Prettier automatically SILENTLY REMOVES backslash symbol from string!
  2. NodeJS 14.16.0 REPL and standard-version incorrectly works with backslash in string too (removing single backslash or using double backslash if you trying to escape - "\\").

I put this shell-command line into external shell-script file - this exterminated both problems:

#!/bin/bash
# Workaround for buggy behavior
# Change '### [' to '## ['
DIR="./"
sed -r -e 's/^#{1,3} \[/## [/' -i $DIR/CHANGELOG.md

So, now it looks like:

module.exports = {
  scripts: {
    postchangelog: "./tools/for_standard-version.sh",
  },
};

@NateScarlet
Copy link
Author

@amokmen

use bash ./tools/for_standard-version.sh if you want be windows compatible (git-bash almost always installed, otherwise it may not run due to some encoding issue).

image

@amokmen
Copy link

amokmen commented Apr 21, 2021

@NateScarlet
I am personally using WSL (Ubuntu) at Windows desktop, so for me all working without adding prefix "bash ".

P. S. As for me - trying "native" Windows-based development is a bad idea in general. There are a lot of problems even in Linux-based development, so multiplying problems with Windows is not helping at all :)

@josteph
Copy link

josteph commented Jul 4, 2021

I'm not sure why does conventional changelog template need isPatch treatment here. If somebody could explain the reasoning behind this, then this answers other issues regarding heading level as well.

https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-conventionalcommits/templates/header.hbs#L1

@zavoloklom
Copy link

zavoloklom commented Jul 12, 2021

Small addition to @amokmen advise.

There is a problem with that script and MacOS sed: -i may not be used with stdin. So if you want to use script both in Linux and Mac you should do:

"scripts": {
    "postchangelog": "if [[ \"$OSTYPE\" == \"darwin\"* ]]; then SEDOPTION=\"\\'\\'\"; fi && sed -i $SEDOPTION -re 's/^#{1,3} \\[/## [/' ./CHANGELOG.md"
  }

@ciltocruz
Copy link

What about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

10 participants