fix(@angular/cli): introduce initial package manager workspace awareness - #33039
Conversation
a0a776e to
533cb9d
Compare
This change adds the getCurrentPackageName method to the package manager abstraction. When dealing with workspaces (such as npm workspaces), the parser uses the resolved identity of the active package to prioritize dependencies belonging directly to that subproject. It ensures that running ng update inside a subproject directory resolves the dependency versions declared for that subproject, while gracefully falling back to root hoisted versions for shared dependencies.
533cb9d to
2085fdb
Compare
There was a problem hiding this comment.
Code Review
This pull request adds support for identifying and parsing workspace-specific dependencies in monorepo setups for npm-like package managers. It introduces a getPackageNameCommand to the package manager descriptors and updates the dependency parsing logic to extract nested dependencies when a workspace package name is provided. Feedback was provided regarding the efficiency of the getCurrentPackageName method, suggesting that its result be cached to prevent unnecessary repeated executions or file reads.
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This change adds the getCurrentPackageName method to the package manager abstraction. When dealing with workspaces (such as npm workspaces), the parser uses the resolved identity of the active package to prioritize dependencies belonging directly to that subproject.
It ensures that running ng update inside a subproject directory resolves the dependency versions declared for that subproject, while gracefully falling back to root hoisted versions for shared dependencies.