diff options
| author | Xandor Schiefer <me@xandor.co.za> | 2024-09-03 02:44:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-02 17:44:02 -0700 |
| commit | f1492683c10cbe4fd5c03e6a75fb0256bd739c2a (patch) | |
| tree | a36012c9f8ac8404aee635a86075a7e44f2f180e /Makefile | |
| parent | 73617ab050b646f099ba7ccb74cbecf94329a67c (diff) | |
Fix `apheleia-npx` in Yarn PnP projects (#301)
* `apheleia-npx` would use an incorrect path for the Yarn PnP ESM
loader.
* `apheleia-npx` did not correctly guard against word splitting.
* `apheleia-npx` was 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](https://github.com/prettier/prettier/issues/13032)) will
create a cache folder in `node_modules` even in Yarn PnP projects. The
presence of any `node_modules` folders are irrelevant when a `.pnp.cjs`
file is present.
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -111,6 +111,10 @@ fmt-changed: ## Get list of changed formatters on this PR fmt-test: ## Actually run formatter tests @test/shared/run-func.bash apheleia-ft-test $(APHELEIA_FT) +.PHONY: fmt-emacs # env var: FILE +fmt-emacs: ## Start an Emacs instance for testing formatters + @emacs -L . -L test/formatters -l apheleia-ft -f apheleia-global-mode $(FILE) + .PHONY: lint-changelog lint-changelog: ## Report an error if the changelog wasn't updated @scripts/lint-changelog.bash |
