fix: ensure component dependencies are installed during import #10091
+25
−2
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
Fixes an issue where component dependencies were not installed during
bit importif their dependency detection hadn't completed before the install manifest was generated. This primarily affected Vue SFC files and other file types with delayed dependency analysis.Problem
When running
bit import learnbit-vue.graphql/user-app, the component@learnbit-vue/graphql.composables.userwas not installed even though it was a dependency in the model. Runningbit statusshowed it as missing, and a secondbit installwas required to install it.Root Cause
The issue occurred because:
Solution
Two changes were made:
Component Writer (
scopes/component/component-writer/component-writer.main.runtime.ts):Dependency List Factory (
scopes/dependencies/dependency-resolver/dependencies/dependency-list-factory.ts):Testing
Verified the fix by:
bit import learnbit-vue.graphql/user-appin a fresh workspace@learnbit-vue/graphql.composables.useris installed on first importbit statusshows no issuesbit installagainImpact