Commit Graph

2 Commits

Author SHA1 Message Date
Hikari Hayashi 3dbf6a8101 Fix npm-backed language server setup in pnpm and Yarn projects (#65280)
## Summary

Give directory-less npm commands a Zed-owned working directory and
explicit prefix, preventing project devEngines requirements from
blocking language server package queries. Apply the directory
consistently to managed and system runtimes while preserving explicit
install targets.

Cover command construction, child working directories, and propagation
of directory-creation errors for both runtimes.

Fixes #65279

## Testing

Tested locally and confirmed language server setup works in Yarn and
pnpm projects.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Fixed language server setup failing with `EBADDEVENGINES` in Yarn and
pnpm projects.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-10-21 15:37:34 +00:00
Ben Brandt afecd6d719 node_runtime: Expose standalone system Node discovery (#64928)
Expose `SystemNode::discover` so callers can locate and validate Node
without also requiring npm or initializing Zed's cache. It accepts a
configured executable or an explicit search PATH, preserves the Node 22
minimum, and reports typed lookup, execution, and version errors with
guidance.

Zed's existing system runtime reuses the validation before its existing
npm setup. Configured overrides and PATH order remain authoritative.
Selected paths are made absolute without resolving symlinks, and
absolute executables remain usable after the process's working directory
is removed. Managed downloads and npm policy are unchanged.

Release Notes:

- N/A
2026-09-30 04:51:51 +00:00