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>
0cb2b616f9liam committed on 6/1/2026, 6:04:42 PM· committed by GitHubparentd5fc4b7
1 file changedLine totals unavailable