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

Inconsistent list markers in generated CHANGELOG files #938

Closed
kachkaev opened this issue Sep 7, 2022 · 2 comments · Fixed by #939
Closed

Inconsistent list markers in generated CHANGELOG files #938

kachkaev opened this issue Sep 7, 2022 · 2 comments · Fixed by #939

Comments

@kachkaev
Copy link

kachkaev commented Sep 7, 2022

Affected Packages

@changesets/apply-release-plan - not anymore with #905

Problem

I’ve noticed inconsistent list markers in some CHANGELOG files, i.e. hyphen alternating with asterisk. Examples:

- * - - from #901:

### Patch Changes
- [#900](https://github.com/changesets/changesets/pull/900) [`7d998ee`](https://github.com/changesets/changesets/commit/7d998eeb16064b5442ebc49ad31dec7b841d504e) Thanks [@sdirosa](https://github.com/sdirosa)! - Fixed an issue with generating changelogs not being skipped when the `changelog` config option was set to `false`.
* [#720](https://github.com/changesets/changesets/pull/720) [`0fd56e1`](https://github.com/changesets/changesets/commit/0fd56e17092c7258de57adf7dd4ba08406c8e440) Thanks [@bhovhannes](https://github.com/bhovhannes)! - Private packages without a `version` field are no longer listed when adding a changeset.
- [#844](https://github.com/changesets/changesets/pull/844) [`8627ec1`](https://github.com/changesets/changesets/commit/8627ec1faba53644b366c314be248e1bba48f329) Thanks [@Andarist](https://github.com/Andarist)! - Attempt to log `stdout` when publish fails if `stderr` is empty and JSON error can't be retrieved from none of those.
- Updated dependencies [[`7d998ee`](https://github.com/changesets/changesets/commit/7d998eeb16064b5442ebc49ad31dec7b841d504e), [`7d998ee`](https://github.com/changesets/changesets/commit/7d998eeb16064b5442ebc49ad31dec7b841d504e)]:
- @changesets/config@2.1.1
- @changesets/apply-release-plan@6.0.4
- @changesets/get-release-plan@3.0.13

- * * from #763

### Patch Changes
- [#760](https://github.com/changesets/changesets/pull/760) [`5a2a59a`](https://github.com/changesets/changesets/commit/5a2a59a37b7fb31e17414579b470402d3016e28e) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with logging non-stringified Buffers in case of publish errors.
* [#769](https://github.com/changesets/changesets/pull/769) [`3e8e672`](https://github.com/changesets/changesets/commit/3e8e6721d31f80fff28826e0fad2c14216c3d94f) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an infinite loop involving a fixed group of packages and a package within that group that was both ignored and dependent on another package from that group.
* Updated dependencies [[`3e8e672`](https://github.com/changesets/changesets/commit/3e8e6721d31f80fff28826e0fad2c14216c3d94f)]:
- @changesets/assemble-release-plan@5.1.1
- @changesets/get-release-plan@3.0.7

- * - * - - from #750:

### Patch Changes
- [#706](https://github.com/changesets/changesets/pull/706) [`0812858`](https://github.com/changesets/changesets/commit/0812858996045e602d22f2b7dd13e8673e3b36b0) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with `"none"` releases causing package versions being bumped during snapshot releases. In addition to when you create `"none"` release types explicitly Changesets might create them implicitly in some situations, for example under some circumstances this issue caused snapshot releases to be created sometimes for ignored packages.
* [#703](https://github.com/changesets/changesets/pull/703) [`15c461d`](https://github.com/changesets/changesets/commit/15c461d5de94a274ccc8b33755a133a513339b0a) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with `*` dependency ranges not being replaced in premode. Those have to replaced with exact versions because prereleases don't satisfy wildcard ranges. A published prerelease package with such dependency range left untouched won't install correct prerelease dependency version.
- [#749](https://github.com/changesets/changesets/pull/749) [`d14cf79`](https://github.com/changesets/changesets/commit/d14cf79fd323529c6fe6ca956d9a7fda93bb425b) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue that caused **created** CHANGELOG files not being formatted in the same way as the **updated** ones (this could happen when calling `changeset version` for the very first time for a package).
* [#751](https://github.com/changesets/changesets/pull/751) [`59c7ebc`](https://github.com/changesets/changesets/commit/59c7ebc7a5e75f69f5487e95a85cd1b7062ac39d) Thanks [@Rugvip](https://github.com/Rugvip)! - Fixed an issue where dependent packages would sometimes not get bumped properly when exiting prerelease mode.
- [#703](https://github.com/changesets/changesets/pull/703) [`15c461d`](https://github.com/changesets/changesets/commit/15c461d5de94a274ccc8b33755a133a513339b0a) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with dependant packages being always bumped when their `*` dependency was bumped.
- Updated dependencies [[`0812858`](https://github.com/changesets/changesets/commit/0812858996045e602d22f2b7dd13e8673e3b36b0), [`15c461d`](https://github.com/changesets/changesets/commit/15c461d5de94a274ccc8b33755a133a513339b0a), [`27a5a82`](https://github.com/changesets/changesets/commit/27a5a82188914570d192162f9d045dfd082a3c15), [`27a5a82`](https://github.com/changesets/changesets/commit/27a5a82188914570d192162f9d045dfd082a3c15), [`d14cf79`](https://github.com/changesets/changesets/commit/d14cf79fd323529c6fe6ca956d9a7fda93bb425b), [`27a5a82`](https://github.com/changesets/changesets/commit/27a5a82188914570d192162f9d045dfd082a3c15), [`0d1debd`](https://github.com/changesets/changesets/commit/0d1debd8f5d364073d627a017316a25554dec4d5), [`59c7ebc`](https://github.com/changesets/changesets/commit/59c7ebc7a5e75f69f5487e95a85cd1b7062ac39d), [`15c461d`](https://github.com/changesets/changesets/commit/15c461d5de94a274ccc8b33755a133a513339b0a)]:

The marker flicks between every two sibling entries except the one about dependency updates.

This is an artifact of Prettier v1 which was used in this repo until #905.

Technically speaking,

- hello

* world

- 42

are three separate unordered lists, according to the markdown spec.

Asterisks were being introduced because of an old bug in Prettier (prettier/prettier#4369), which was fixed in v2.1. When raw CHANGELOG markdown contained two empty lines between list items, Prettier treated them as </ul><ul> and flicked the marker.

Proposed solution

I started creating this issue after noticing - * - in own CHANGELOG files, but then discovered a fix in #905. Glad to know that the problem is permanently fixed!

CHANGELOG files in this repo still contain chunky markdown lists, so I’ve opened this issue anyway to flag it. Feel free to just close it if you don’t see value in replacing * with -. This mini-research can still be useful for someone.

PS

Changesets is one of my favourite monorepo tools! Love it! 😍

@Andarist
Copy link
Member

Andarist commented Sep 7, 2022

CHANGELOG files in this repo still contain chunky markdown lists, so I’ve opened this issue anyway to flag it. Feel free to just close it if you don’t see value in replacing * with -. This mini-research can still be useful for someone.

I guess that this can cause this markdown to be incorrectly rendered by some renderers, right? So it potentially would still be worth fixing 🤔

Changesets is one of my favourite monorepo tools! Love it! 😍

Thanks! ❤️

@kachkaev
Copy link
Author

kachkaev commented Sep 7, 2022

I guess that this can cause this markdown to be incorrectly rendered by some renderers, right?

Hypothetically yes, because essentially the lists contain
<ul><li>...</li></ul><ul><li>...</li></ul><ul><li>...</li></ul>
instead of
<ul><li>...</li><li>...</li><li>...</li></ul>

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

Successfully merging a pull request may close this issue.

2 participants