🐛 Bug Report: backstage-repo-tools api-reports
fails to format generated api report files when using Prettier v3
#27559
Labels
bug
Something isn't working
📜 Description
Prettier is used to format generated API reports. This code relies on the
resolveConfig.sync
method in Prettier, which was removed in v3. This means the code hits the catch block and silently fails.Note that even if we move away from using this method, the
format
method itself in prettier has also moved to be async, so we'll likely need a deeper refactoring here if we want to support Prettier v3. It's not clear how we'd actually go about that though, since the curretn approach relies on patching a synchronous method. Perhaps one solution here is a feature request to api-extractor to add support for supplying a custom formatter.👍 Expected behavior
👎 Actual Behavior with Screenshots
Report generation succeeds but files are not formatted.
👟 Reproduction steps
📃 Provide the context for the Bug.
No response
🖥️ Your Environment
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Code of Conduct?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: