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

Fix changesets destroying our Astro codeblocks in changelogs #4227

Merged
merged 1 commit into from Aug 10, 2022

Conversation

Princesseuh
Copy link
Member

Changes

Changesets was mysteriously destroying every Astro code block inside CHANGELOG.md. This happen because changesets Prettier version is very old and our plugin is not compatible. As such, this PR disable the plugin inside CHANGELOG.md

While I was there, I fixed some non-astro code blocks that had been weirdly formatted from back when we didn't have astro codeblocks

Testing

Tested manually

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2022

⚠️ No Changeset found

Latest commit: 0cff5f0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Aug 10, 2022
// not support our plugin and it ends up doing more harm than good. As such, we'll disable our plugin for changelogs
files: ['CHANGELOG.md'],
options: {
plugins: [],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we do it that way, our format command will still format CHANGELOG.md because it override this. As such, this will only impact formatting inside the editor and when not using our format command

@@ -0,0 +1,32 @@
// Heads up: This file should be renamed to `.cjs`, however if we did that, changesets wouldn't be able to load it
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.cjs config files were added in Prettier 2.1 🙈

@Princesseuh
Copy link
Member Author

Might not be needed in the future, changesets is fixing this issue changesets/changesets#905

Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌🏻

@Princesseuh Princesseuh merged commit a862da8 into main Aug 10, 2022
@Princesseuh Princesseuh deleted the fix-changelog-formatting branch August 10, 2022 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants