Fix package manager detection for nested package scripts - #62619
Open
Valley-15 wants to merge 1 commit into
Open
Fix package manager detection for nested package scripts#62619Valley-15 wants to merge 1 commit into
Valley-15 wants to merge 1 commit into
Conversation
Valley-15
force-pushed
the
fix-61902-package-manager-detection
branch
from
August 14, 2026 09:43
43542c4 to
edb1198
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Fixes #61902.
When a
package.jsonbelongs to a nested workspace package, Zed's generated package-script tasks can incorrectly fall back to npm even when the workspace root specifies pnpm or another package manager. This affects both the package-script task and the package.json gutter runnable.Solution
package.jsonthat declares a package manager.pnpm-lock.yamloryarn.lockwhen no package manager is declared.Testing
package.jsonpackage.jsoncargo test -p languages --libsuccessfully: 95 tests passed.cargo fmt -p languages --check.git diff --check.Reviewers can reproduce the issue using the workspace described in #61902: open a nested workspace
package.jsonwith a script while the rootpackage.jsondeclarespackageManager: "pnpm@11.17.0", then run the script from the gutter or task picker.Self-Review Checklist:
Release Notes: