Repository navigation
fix(cli): classify pnpm sibling workspace links as workspace packages [RED-1312] [ship] - #1586
Merged
Merged
Conversation
… [RED-1312] pnpm writes importer link: targets relative to the importer's directory, so a member linking a sibling (link:../design-system from packages/e2e) was treated as a link outside the workspace. Embed patterns matching such a member then warned that it was skipped, or failed validation with an "outside the workspace" error. Resolve the target against the importer path before the escape check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Linear: RED-1312
Summary
In a pnpm workspace,
bundle.packages.embedmisclassified a workspace member that another member depends on as a directory link outside the workspace. A wildcard pattern such asembed: ['@acme/*']then warned on every run that the member "cannot be embedded as a registry tarball and was skipped", and a pattern matching only that member failed validation with "is a local directory link outside the workspace". The member is inside the workspace and is bundled as source code, so both messages were wrong.pnpm writes
link:targets underimportersrelative to the importer's directory: frompackages/e2e, a sibling islink:../design-system. The parser checked that target for a../prefix as if it were relative to the workspace root. It now resolves the target against the importer path first, solink:../design-systemfrompackages/e2ebecomespackages/design-system(a workspace package), while targets that really leave the workspace, and absolute targets, are still reported as outside it.Tests
lockfile-packages.spec.tswith a sibling-member link and a link escaping the workspace from a nested importer. It fails without the fix.🤖 Generated with Claude Code