fix(deps): filter core aspects from component deps in capsules#10176
Closed
davidfirst wants to merge 1 commit intomasterfrom
Closed
fix(deps): filter core aspects from component deps in capsules#10176davidfirst wants to merge 1 commit intomasterfrom
davidfirst wants to merge 1 commit intomasterfrom
Conversation
Core aspects like @teambit/objects, @teambit/workspace, and @teambit/remove were being installed via pnpm in capsules instead of being linked. This caused TypeScript compilation errors due to multiple copies with different peer dependency hashes. Now all core aspects are filtered from component dependencies, ensuring they are only linked (not installed) in capsules.
Contributor
There was a problem hiding this comment.
Pull request overview
Filters Bit core aspects out of component dependency manifests so they’re linked into capsules (instead of installed by pnpm), avoiding duplicate core packages and resulting TS/peer-hash conflicts during bit ci merge.
Changes:
- Expand dependency filtering from only
@teambit/legacyto all core aspects (by core aspect IDs → package names). - Ensure core aspects are excluded from the per-component dependency list before optional
dependencyFilterFnruns.
Comment on lines
+182
to
+185
| // Remove core aspects from dep list - they should be linked, not installed | ||
| const coreAspectIds = this.aspectLoader.getCoreAspectIds(); | ||
| const coreAspectPkgNames = new Set(coreAspectIds.map((id) => getCoreAspectPackageName(id))); | ||
| coreAspectPkgNames.add('@teambit/legacy'); |
There was a problem hiding this comment.
coreAspectIds/coreAspectPkgNames are recomputed for every component iteration. Since core aspects are constant for the workspace, consider computing this Set once (e.g., as a memoized private helper or computed before components.map(...)) and reusing it here and in filterOutCoreAspects() to avoid repeated work/duplication.
zkochan
approved these changes
Feb 2, 2026
Member
Author
|
We ended up with a different approach: #10178 |
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.
Summary
@teambit/objects,@teambit/workspace,@teambit/remove) were being installed via pnpm in capsules instead of being linkedbit ci mergedue to multiple copies with different peer dependency hashesTest plan
@teambit/objectsis now linked to workspace instead of installed via pnpm.pnpmfolder