# languages: Respect \`devEngines\` package manager for package scripts \(\#58113\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/0cb2b616f93a7dd76fa069c85ecd73500019d8aa)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 0cb2b616f93a7dd76fa069c85ecd73500019d8aa

Requested commit: 0cb2b616f93a7dd76fa069c85ecd73500019d8aa

Commit: 0cb2b616f93a7dd76fa069c85ecd73500019d8aa

Tree: 9798201acafc1e5fd44182e5a465e8f1fc611d1a

Author: liam

Committer: GitHub

## Message

```
languages: Respect `devEngines` package manager for package scripts (#58113)

Resolves https://github.com/zed-industries/zed/issues/58086

This diff fixes `package.json` runnables using npm for projects that
declare their package manager through
`devEngines.packageManager`. The `package.json` parser only looked at
the top-level `packageManager` field, so projects using the newer
`devEngines` shape fell back to `npm` even when they specified `pnpm`,
`yarn`, or `bun`.

With this change, package manager detection also reads
`devEngines.packageManager` in both object and array forms. The
top-level `packageManager` field still takes precedence when both are
present, and the shared parser means the fix applies to `package.json`
gutter runnables as well as TypeScript package-script tasks.

Release Notes:
- Fixed `package.json` runnables ignoring package managers declared via
`devEngines.packageManager`.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

- [d5fc4b74eff89d5a71bdcc78d0cb871f82c71187](https://git.cafe/gitcafe/zed/commit/d5fc4b74eff89d5a71bdcc78d0cb871f82c71187?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/0cb2b616f93a7dd76fa069c85ecd73500019d8aa?format=markdown)
