Skip to content

chore: Format changelogs with Oxfmt#8442

Draft
Mrtenz wants to merge 6 commits intomainfrom
mrtenz/oxfmt-changelog
Draft

chore: Format changelogs with Oxfmt#8442
Mrtenz wants to merge 6 commits intomainfrom
mrtenz/oxfmt-changelog

Conversation

@Mrtenz
Copy link
Copy Markdown
Member

@Mrtenz Mrtenz commented Apr 13, 2026

Explanation

This updates changelog validation to use Oxfmt instead of Prettier.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 13, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​auto-changelog@​4.1.0 ⏵ 6.0.0-preview-b0fc35a100 +2100100 +1100 +13100

View full report

Mrtenz added a commit to MetaMask/auto-changelog that referenced this pull request Apr 13, 2026
This adds a new `--formatter` option, which can be set to either
"prettier" or "oxfmt", and deprecates the `--prettier` option. I've also
refactored the logic to load Prettier dynamically, so both Oxfmt and
Prettier are now _optional_ peer dependencies.

Tested in `MetaMask/core`:
- MetaMask/core#8442

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Moderate risk: changes CLI flags and formatting behavior via dynamic
imports, which could affect consumers relying on the deprecated
`--prettier` flag or missing optional peer deps at runtime.
> 
> **Overview**
> Adds a new `--formatter` CLI option to choose changelog formatting
(`prettier` or `oxfmt`, with `none` for `validate`) and deprecates the
legacy `--prettier` flag (which still takes precedence when provided).
> 
> Refactors changelog formatting to route through new
`src/formatters.ts` helpers that dynamically import Prettier/Oxfmt and
throw clearer errors when the chosen formatter isn’t installed, and
updates tests and package metadata to treat `prettier`/`oxfmt` as
*optional* peer dependencies.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
b0fc35a. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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 this pull request may close these issues.

1 participant