turborepo
e5f43a5f - fix: pnpm alias workspace deps (#5569)

Commit
2 years ago
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>
Parents
Loading