@teambit/snapping 1.0.187 → 1.0.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +2 -2
- package/artifacts/schema.json +1057 -593
- package/dist/components-have-issues.js.map +1 -1
- package/dist/flattened-edges.js.map +1 -1
- package/dist/generate-comp-from-scope.d.ts +1 -1
- package/dist/generate-comp-from-scope.js +23 -9
- package/dist/generate-comp-from-scope.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/reset-cmd.js.map +1 -1
- package/dist/reset-component.js.map +1 -1
- package/dist/snap-cmd.js.map +1 -1
- package/dist/snap-distance-cmd.js.map +1 -1
- package/dist/snap-from-scope.cmd.js +1 -1
- package/dist/snap-from-scope.cmd.js.map +1 -1
- package/dist/snapping.aspect.js.map +1 -1
- package/dist/snapping.main.runtime.d.ts +1 -1
- package/dist/snapping.main.runtime.js +7 -12
- package/dist/snapping.main.runtime.js.map +1 -1
- package/dist/snapping.spec.js.map +1 -1
- package/dist/tag-cmd.js.map +1 -1
- package/dist/tag-from-scope.cmd.js.map +1 -1
- package/dist/tag-model-component.js.map +1 -1
- package/package.json +20 -20
- /package/dist/{preview-1709867881461.js → preview-1710224484125.js} +0 -0
|
@@ -574,15 +574,10 @@ if you're willing to lose the history from the head to the specified version, us
|
|
|
574
574
|
this.scope.legacyScope.scopeImporter.shouldOnlyFetchFromCurrentLane = true;
|
|
575
575
|
}
|
|
576
576
|
const laneCompIds = lane?.toComponentIds();
|
|
577
|
-
const resolveDepVer = dep => {
|
|
578
|
-
if (dep.hasVersion()) return dep;
|
|
579
|
-
const fromLane = laneCompIds?.searchWithoutVersion(dep);
|
|
580
|
-
return fromLane || dep;
|
|
581
|
-
};
|
|
582
577
|
const snapDataPerComp = snapDataPerCompRaw.map(snapData => {
|
|
583
578
|
return {
|
|
584
579
|
componentId: _componentId().ComponentID.fromString(snapData.componentId),
|
|
585
|
-
dependencies: snapData.dependencies
|
|
580
|
+
dependencies: snapData.dependencies || [],
|
|
586
581
|
aspects: snapData.aspects,
|
|
587
582
|
message: snapData.message,
|
|
588
583
|
files: snapData.files,
|
|
@@ -629,20 +624,16 @@ if you're willing to lose the history from the head to the specified version, us
|
|
|
629
624
|
deps.forEach(dep => {
|
|
630
625
|
const fromLane = laneCompIds.searchWithoutVersion(dep.componentId);
|
|
631
626
|
if (fromLane) {
|
|
632
|
-
snapData.dependencies.push(fromLane);
|
|
627
|
+
snapData.dependencies.push(fromLane.toString());
|
|
633
628
|
}
|
|
634
629
|
});
|
|
635
630
|
});
|
|
636
631
|
}
|
|
637
632
|
const components = [...existingComponents, ...newComponents];
|
|
638
633
|
// for new components these are not needed. coz when generating them we already add the aspects and the files.
|
|
639
|
-
// the dependencies are calculated later and they're provided by "newDependencies" prop (not "dependencies").
|
|
640
634
|
await Promise.all(existingComponents.map(async comp => {
|
|
641
635
|
const snapData = getSnapData(comp.id);
|
|
642
636
|
if (snapData.aspects) await this.scope.addAspectsFromConfigObject(comp, snapData.aspects);
|
|
643
|
-
if (snapData.dependencies.length) {
|
|
644
|
-
await this.updateDependenciesVersionsOfComponent(comp, snapData.dependencies, componentIds);
|
|
645
|
-
}
|
|
646
637
|
if (snapData.files?.length) {
|
|
647
638
|
await this.updateSourceFiles(comp, snapData.files);
|
|
648
639
|
}
|
|
@@ -666,7 +657,11 @@ if you're willing to lose the history from the head to the specified version, us
|
|
|
666
657
|
const results = await (0, _tagModelComponent().tagModelComponent)(_objectSpread(_objectSpread({}, params), {}, {
|
|
667
658
|
scope: this.scope,
|
|
668
659
|
consumerComponents,
|
|
669
|
-
tagDataPerComp: snapDataPerComp
|
|
660
|
+
tagDataPerComp: snapDataPerComp.map(s => ({
|
|
661
|
+
componentId: s.componentId,
|
|
662
|
+
message: s.message,
|
|
663
|
+
dependencies: []
|
|
664
|
+
})),
|
|
670
665
|
snapping: this,
|
|
671
666
|
builder: this.builder,
|
|
672
667
|
dependencyResolver: this.dependencyResolver,
|