apheleia
apheleia copied to clipboard
Fix `apheleia-npx` in Yarn PnP projects
apheleia-npxwould use an incorrect path for the Yarn PnP ESM loader.apheleia-npxdid not correctly guard against word splitting.apheleia-npxwas sometimes not able to find formatters in a Yarn PnP project if there was also a node_modules folder at the root of the project. Unfortunately, many tools (including Prettier) will create a cache folder innode_moduleseven in Yarn PnP projects. The presence of anynode_modulesfolders are irrelevant when a.pnp.cjsfile is present.
cc @edslocomb & @raxod502, as you were involved in https://github.com/radian-software/apheleia/pull/200.
LGTM generally. Looks like upstream changes broke the tests. I'll fix, and also make sure we have test coverage that actually validates this change.
Apologies to @zeorin for taking so long to look at this, notifications got lost in the shuffle
Also my fault because I was in the middle of working on this and it was still in progress but I have been busy with other things in my life and not attending to any of my GitHub notifications for a while, there are several dozen threads that have been waiting. This is still very much on my list if Ed doesn't beat me to it.
Heyo, it turns out that I had got this pretty close to working already! The latest few changes seem to make things fully successful and now we have a proper test framework that supports ensuring that features like this will not break in the future.