Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for formatters locally installed via yarn 2+ pnp mode #200

Merged
merged 24 commits into from
Nov 5, 2023
Merged
Changes from 4 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
24f785f
add basic support for formatters installed locally via yarn 3 pnp (ht…
edslocomb Jul 22, 2023
52b12db
pnp was introduced in yarn 2, not yarn 3!
edslocomb Jul 22, 2023
8ba34dd
limit line length
edslocomb Jul 22, 2023
740bf0c
omit yarn version check
edslocomb Jul 29, 2023
73ea68d
Use a more efficient approach
raxod502 Sep 16, 2023
7cfd1ec
Merge branch 'main' into yarn-pnp
raxod502 Sep 16, 2023
14c13d5
oops missed this
raxod502 Sep 16, 2023
c5c437b
fix part of ci
raxod502 Sep 23, 2023
81ccc6e
remove dupes
raxod502 Sep 23, 2023
415c4c3
rework apheleia-npx to use the pnp api to find formatters in pnp pack…
edslocomb Oct 5, 2023
a0c7455
Merge branch 'yarn-pnp' of github.com:edslocomb/apheleia into yarn-pnp
edslocomb Oct 5, 2023
b77dd9d
resolve merge conflict
edslocomb Oct 5, 2023
3adb30c
fix long lines, ignore line-length checks on autogenerated pnp files
edslocomb Oct 5, 2023
f36fe05
fix tests, fix prettier options
edslocomb Oct 6, 2023
2341678
Merge upstream
edslocomb Oct 9, 2023
b7616a2
fix prettier-ruby formatter when editing files without an extension (…
edslocomb Oct 9, 2023
9c46cc0
fix apheleia-ft.el, make definitions for html-tidy and jq consistent …
edslocomb Oct 10, 2023
156f320
ensure formatter definition is a list before calling member on it
edslocomb Oct 10, 2023
e4bdaf9
resolve merge conflicts
edslocomb Oct 30, 2023
3166f24
Extract pnp-bin to its own repo, use a standalone minified build of i…
edslocomb Oct 30, 2023
ef82e42
reintroduce prettier option fixes/simplifications lost in merge resol…
edslocomb Oct 30, 2023
365cdfc
Changes to apheleia-npx script:
edslocomb Oct 31, 2023
96093c2
merge main
edslocomb Oct 31, 2023
bfa8692
Fix nodejs install by using new universal installer
edslocomb Oct 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apheleia-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,11 @@ cmd is to be run."
"node_modules"
project-dir)))))
(when (file-executable-p binary)
(setcar command binary)))))
(setcar command binary))))
(when (locate-dominating-file default-directory ".pnp.cjs")
(if-let (yarn-executable (executable-find "yarn"))
(push yarn-executable command)
(message "apheleia: .pnp.cjs found but yarn is not installed"))))
(when (or (memq 'file command) (memq 'filepath command))
;; Fail when using file but not as the first formatter in this
;; sequence. (But filepath is okay, since it indicates content
Expand All @@ -780,7 +784,7 @@ it's first in the sequence"))
(unless remote-match
(error "Formatter uses `file' but process will run on different \
machine from the machine file is available on"))
(setq stdin nil)
(setq stdin nil)
;; If `buffer-file-name' is nil then there is no backing
;; file, so `buffer-modified-p' should be ignored (it always
;; returns non-nil).
Expand Down