-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pnpm alias workspace deps (#5569)
### Description Fixes #5441 Adds support for [referencing workspaces through aliases](https://pnpm.io/workspaces#referencing-workspace-packages-through-aliases) by properly resolving them to the correct workspace. Before we would mark a package as being an external dependency (or if the alias was a valid workspace depend on the incorrect one). This PR now recognizes when `workspace:` dependency references a different package than the name that's used in the `package.json`. Note for reviewers: This probably isn't the cleanest solution in either Rust or Go, but while we need to maintain two codepaths this keeps the code roughly equivalent. ### Testing Instructions Added unit tests on the Go side. Tested manually with a repository where `web` specified it's dependency on `@scope/ui` as `"ui": "workspace:@scope/ui@*" and verified that: - `turbo run build`: `@scope/ui` finished building before building `web`, this hits the Go impl - `turbo prune --scope=web`: `@scope/ui` was included in the pruned repository, this hits the Rust impl --------- Co-authored-by: Chris Olszewski <Chris Olszewski>
- Loading branch information
1 parent
396bf45
commit e5f43a5
Showing
3 changed files
with
180 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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