apheleia/test/formatters
Ed Slocomb 54a192c345
Add support for formatters locally installed via yarn 2+ pnp mode (#200)
This adds support for formatters installed locally in project
directories via yarn 2's "zero install" [pnp
mode](https://yarnpkg.com/features/pnp).

It's quite similar to the support for formatters installed locally in a
project's `node_modules` via npm, and leverages the `npx` symbol, so
existing formatter definitions should work without modification.

This checks for a `.pnp.cjs` file (expected in the project root for yarn
pnp projects), then looks for a yarn executable, and checks the version
of yarn to make sure it supports pnp. If that works, we just push
`"yarn"` onto the front of `command`.

I've only tested this with a locally installed `prettier.js`. It's very
much a works-for-me draft, I'm putting in a PR to make sure this is a
workable approach before going any further with it.

---------

Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
2023-11-05 12:08:58 -08:00
..
installers Add support for formatters locally installed via yarn 2+ pnp mode (#200) 2023-11-05 12:08:58 -08:00
samplecode Add support for the ruff python formatter (#236) 2023-11-04 18:23:00 +00:00
apheleia-ft.el Add support for formatters locally installed via yarn 2+ pnp mode (#200) 2023-11-05 12:08:58 -08:00
build-image.bash Fix brittany formatter & misc improvements (#222) 2023-10-06 22:01:38 -07:00
Dockerfile Fix brittany formatter & misc improvements (#222) 2023-10-06 22:01:38 -07:00
install-common.bash Add support for formatters locally installed via yarn 2+ pnp mode (#200) 2023-11-05 12:08:58 -08:00
install-formatters.bash Add formatter tests (#72) 2022-01-05 15:35:12 -08:00
run-func.bash Fix brittany formatter & misc improvements (#222) 2023-10-06 22:01:38 -07:00