<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apheleia.git/scripts/formatters/apheleia-npx, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/apheleia.git/'/>
<entry>
<title>apheleia-npx: return silently when formatter is missing (#383)</title>
<updated>2025-12-23T19:24:34+00:00</updated>
<author>
<name>Frédéric Giquel</name>
<email>frederic.giquel@laposte.net</email>
</author>
<published>2025-12-23T19:24:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/apheleia.git/commit/?id=426616cf1799dbce89800ae2fe9f155311436503'/>
<id>426616cf1799dbce89800ae2fe9f155311436503</id>
<content type='text'>
Behavior of `aphaleia-npx` currently differs from other formatters by
triggering an error when formatter is missing (causing a message to be
displayed in minibuffer and an error buffer to be created).

This PR adds a test to check if command is on user's PATH before
executing it in order to make `aphaleia-npx` silently ends when the
formatter command is not found at project and system level.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Behavior of `aphaleia-npx` currently differs from other formatters by
triggering an error when formatter is missing (causing a message to be
displayed in minibuffer and an error buffer to be created).

This PR adds a test to check if command is on user's PATH before
executing it in order to make `aphaleia-npx` silently ends when the
formatter command is not found at project and system level.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix `apheleia-npx` in Yarn PnP projects (#301)</title>
<updated>2024-09-03T00:44:02+00:00</updated>
<author>
<name>Xandor Schiefer</name>
<email>me@xandor.co.za</email>
</author>
<published>2024-09-03T00:44:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/apheleia.git/commit/?id=f1492683c10cbe4fd5c03e6a75fb0256bd739c2a'/>
<id>f1492683c10cbe4fd5c03e6a75fb0256bd739c2a</id>
<content type='text'>
* `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 &lt;radon@intuitiveexplanations.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* `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 &lt;radon@intuitiveexplanations.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>move pnp-bin.js into formatters dir for simpler melpa recipe (#243)</title>
<updated>2023-11-07T02:02:09+00:00</updated>
<author>
<name>Ed Slocomb</name>
<email>edslocomb@gmail.com</email>
</author>
<published>2023-11-07T02:02:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/apheleia.git/commit/?id=314af56e8dc1eb9f71a70e6c1858e6f6021cf708'/>
<id>314af56e8dc1eb9f71a70e6c1858e6f6021cf708</id>
<content type='text'>
Gets all non-elisp dependencies into a single directory,
`scripts/formatters`

&lt;!--

To expedite the pull request process, please see the contributor guide
for my projects:

  &lt;https://github.com/raxod502/contributor-guide&gt;

--&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Gets all non-elisp dependencies into a single directory,
`scripts/formatters`

&lt;!--

To expedite the pull request process, please see the contributor guide
for my projects:

  &lt;https://github.com/raxod502/contributor-guide&gt;

--&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for formatters locally installed via yarn 2+ pnp mode (#200)</title>
<updated>2023-11-05T20:08:58+00:00</updated>
<author>
<name>Ed Slocomb</name>
<email>edslocomb@gmail.com</email>
</author>
<published>2023-11-05T20:08:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/apheleia.git/commit/?id=54a192c3454e82be9d5ad910d80796b27d58035f'/>
<id>54a192c3454e82be9d5ad910d80796b27d58035f</id>
<content type='text'>
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 &lt;radon@intuitiveexplanations.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;radon@intuitiveexplanations.com&gt;</pre>
</div>
</content>
</entry>
</feed>
