-
Notifications
You must be signed in to change notification settings - Fork 500
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
CHANGELOG.md change lists unwanted formatting. #1283
Comments
This seems to be a regression? See #20 |
I've done some further digging: this seems to be a problem with recent versions of prettier (with applyReleasePlan() uses Debugging revealed that the search for the configuration file starts in Related: prettier/prettier#15879 |
Thanks for the explanation and for sharing the issue in Prettier's GitHub, @mbeckem! I'll subscribe to that thread so I can close this issue as soon as that one is completed. |
Hi, I'm a maintainer from Prettier, do you think it make sense to change it to resolve config with file path instead of |
Is there any update if its ok to upgrade prettier now? |
Is this also the root cause of changes to |
Affected Packages
I believe the issue is in changeset's CLI monorepo.
Problem
Previously, when I ran
pnpm changeset version
the changes applied toCHANGELOG.md
were only adding a new entry to the list of versions, but a fewdays ago I started noticing that the formatting for the entire
CHANGELOG.md
file was changing.
To reproduce it, just have a project with a prettier formated
CHANGELOG.md
, inwhich lists use
-
and are followed by 3 spaces:- like this
And you'll see that after running
pnpm changeset
and thenpnpm changeset version
the spacing for list items is changed to:- a single space 🥺
This seems to be happening even after custom
changelog
scripts. I have acustom
changelog.cjs
script that has the formatting I want for the new listitems, but this formatting is overriding that.
Code of my changelog.cjs because maybe is relevant for y'all
So now after each
pnpm changeset version
I need to run prettier overCHANGELOG.md
, which isn't fun at all.Proposed solution
Whatever changed in the way
CHANGELOG.md
is being parsed and then formattedshould be reverted, or if the idea is to format it, then at least it should
follow the local prettier configuration.
I'm willing to help with a PR if you can point me in the right direction to deal
with this issue.
The text was updated successfully, but these errors were encountered: