@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.
@@ -33,7 +33,7 @@ export type TagDataPerComp = {
33
33
  };
34
34
  export type SnapDataParsed = {
35
35
  componentId: ComponentID;
36
- dependencies: ComponentID[];
36
+ dependencies: string[];
37
37
  aspects?: Record<string, any>;
38
38
  message?: string;
39
39
  files?: FileData[];
@@ -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?.map(id => _componentId().ComponentID.fromString(id)).map(resolveDepVer) || [],
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,