radian-software / apheleia

🌷 Run code formatter on buffer contents without moving point, using RCS patches and dynamic programming.
MIT License
517 stars 73 forks source link

feat: handle bun projects in apheleia-npx #292

Open ink-pot-monkey opened 3 months ago

ink-pot-monkey commented 3 months ago

The apheleia-npx script now checks for bun projects and handles them correctly by using the installed bun bin exec the command.

ink-pot-monkey commented 3 months ago

Not sure why the formatter test is failing, as this change shouldn't have any impact on previous formatters.

Would it be useful for me to add in a test case here for bun?

raxod502 commented 3 months ago

image

Could be that a newer version of Prettier formats differently by default, breaking the test, or a bug in Prettier being able to find configuration files correctly. Probably the former. I can look into it in a bit.

A new test would be great although the test framework might need to be tweaked a bit to write a good test for this. That is also something I can look at in a bit.

Or you can have a go if you feel up to it earlier.