aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorEd Slocomb <edslocomb@gmail.com>2023-11-05 12:08:58 -0800
committerGitHub <noreply@github.com>2023-11-05 12:08:58 -0800
commit54a192c3454e82be9d5ad910d80796b27d58035f (patch)
treea4769b1d43708709f37965837b705ec2fc30817b /CHANGELOG.md
parent47547ea6941e605198369de9a7f3a63847765e5d (diff)
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>
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d7cb8f..50e5f96 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,10 @@ The format is based on [Keep a Changelog].
* Prettier is now enabled in `svelte-mode`.
* More tree-sitter based major modes have been added to
`apheleia-mode-alist` ([#191]).
+* Built-in formatters now use a new `"apheleia-npx"` built-in script
+ instead of the legacy `npx` keyword. The effect of the new script is
+ the same, except that it also works with Yarn PNP projects as well
+ as `node_modules` style projects ([#200]).
* Autoload the apheleia-goto-error command ([#215]).
* Use `lisp-indent` as default formatter for `emacs-lisp-mode` ([#223])
* Use `hclfmt` for formatting hashicorp HCL files ([#231])
@@ -34,6 +38,9 @@ The format is based on [Keep a Changelog].
### Internal Changes
* Refactored the organisation of the apheleia package for ease of
understanding and usability ([#215]).
+* The new `scripts/pnp-bin.js` script is standalone minified nodejs built
+ from the [`pnp-bin`](https://github.com/PuddleByteComputing/pnp-bin) repo,
+ extracted from apheleia PR [#200].
### Bugs fixed
* `ktlint` would emit log messages into its stdout when formatting,