Skip to content

fix(cli): classify pnpm sibling workspace links as workspace packages [RED-1312] [ship] - #1586

Merged
sorccu merged 2 commits into
mainfrom
simo/red-1312-0f6fac
Oct 29, 2026
Merged

sorccu merged 2 commits into
mainfrom
simo/red-1312-0f6fac

Conversation

@sorccu

@sorccu sorccu commented Oct 29, 2026

Copy link
Copy Markdown
Member

Linear: RED-1312

Summary

In a pnpm workspace, bundle.packages.embed misclassified a workspace member that another member depends on as a directory link outside the workspace. A wildcard pattern such as embed: ['@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 under importers relative to the importer's directory: from packages/e2e, a sibling is link:../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, so link:../design-system from packages/e2e becomes packages/design-system (a workspace package), while targets that really leave the workspace, and absolute targets, are still reported as outside it.

Tests

  • New spec in lockfile-packages.spec.ts with a sibling-member link and a link escaping the workspace from a nested importer. It fails without the fix.

🤖 Generated with Claude Code

sorccu and others added 2 commits October 29, 2026 20:08
… [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>
@sorccu sorccu changed the title fix(cli): classify pnpm sibling workspace links as workspace packages [RED-1312] fix(cli): classify pnpm sibling workspace links as workspace packages [RED-1312] [ship] Oct 29, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: ship/show PR from a same-repo branch.

@sorccu
sorccu merged commit 5fefce8 into main Oct 29, 2026
16 checks passed
@sorccu
sorccu deleted the simo/red-1312-0f6fac branch October 29, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant