perf(javascript): replace add-node-modules-path

The add-node-modules-path package calls `npm bin` to locate the
node_modules/.bin, and does so while invoking the user's $SHELL, which
can be very expensive depending on the user's shell configuration,
possibly adding seconds to the startup time of any JS/TS file.

To mitigate this, I replace the package with a much faster, and in-house
heuristic. Folks with more complex needs should be using direnv anyway.

Fix: #6878
This commit is contained in:
Henrik Lissner 2022-10-08 18:07:17 +02:00
parent 4bd4b13158
commit d25ff46d46
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
3 changed files with 10 additions and 2 deletions

View file

@ -8,7 +8,6 @@
;; Tools
(package! js2-refactor :pin "a0977c4ce1918cc266db9d6cd7a2ab63f3a76b9a")
(package! npm-mode :pin "3ee7c0bad5b7a041d4739ef3aaa06a3dc764e5eb")
(package! add-node-modules-path :pin "63f047fd84b825876152743f66de7ee6f9ed203b")
;; Eval
(package! nodejs-repl :pin "3b841055cad00f442e4a9159b1056f59411b6646")