@teambit/component-compare 1.0.242 → 1.0.243

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.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.component/component-compare@1.0.242" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/component-compare@1.0.243" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/component-compare-preview"]=t():e["teambit.component/component-compare-preview"]=t()}(self,(()=>(()=>{"use strict";var e={60488:(e,t,o)=>{var n={id:"teambit.component/component-compare@1.0.242",homepage:"https://bit.cloud/teambit/component/component-compare",exported:!0};function r(){const e=a(o(41594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,a.__bit_component=n;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/bit-icons/compare.svg"}));i.__bit_component=n,t.Logo=i},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>d,compositions_metadata:()=>u,overview:()=>l});var e={};o.r(e),o.d(e,{default:()=>s});var t=o(60488);o(41594);const r=MdxJsReact,a=TeambitMdxUiMdxScopeContext;var i=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var c={},m="wrapper";function s(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)o=a[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,i);return(0,r.mdx)(m,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("p",null,(0,r.mdx)("a",{parentName:"p",href:"https://bit.cloud/blog/introducing-a-new-feature-component-compare-l4qyxtoo?baseVersion=0.0.5"},"Introducing Component Compare")),(0,r.mdx)("p",null,"Component Compare allows users to compare two component versions. It provides a unified view of all the following differences,"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Code: Modifications made to the source code of the component."),(0,r.mdx)("li",{parentName:"ul"},"Composition: Changes made to how the component looks visually."),(0,r.mdx)("li",{parentName:"ul"},"Tests: Changes made to how the component is tested."),(0,r.mdx)("li",{parentName:"ul"},"Dependencies: Changes made to the component's dependency graph."),(0,r.mdx)("li",{parentName:"ul"},"Overview: Changes to the auto-generated documentation for the component."),(0,r.mdx)("li",{parentName:"ul"},"Aspects: Changes made to the extensions for the component."),(0,r.mdx)("li",{parentName:"ul"},"Changelog: Changes exported between the two selected versions"))))}s.isMDXComponent=!0;const d=[t],l=[e],u={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/component-compare-preview"]=t():e["teambit.component/component-compare-preview"]=t()}(self,(()=>(()=>{"use strict";var e={94999:(e,t,o)=>{var n={id:"teambit.component/component-compare@1.0.243",homepage:"https://bit.cloud/teambit/component/component-compare",exported:!0};function r(){const e=a(o(41594));return r=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,a.__bit_component=n;const i=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/bit-icons/compare.svg"}));i.__bit_component=n,t.Logo=i},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>d,compositions_metadata:()=>u,overview:()=>l});var e={};o.r(e),o.d(e,{default:()=>s});var t=o(94999);o(41594);const r=MdxJsReact,a=TeambitMdxUiMdxScopeContext;var i=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var c={},m="wrapper";function s(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)o=a[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,i);return(0,r.mdx)(m,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(a.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("p",null,(0,r.mdx)("a",{parentName:"p",href:"https://bit.cloud/blog/introducing-a-new-feature-component-compare-l4qyxtoo?baseVersion=0.0.5"},"Introducing Component Compare")),(0,r.mdx)("p",null,"Component Compare allows users to compare two component versions. It provides a unified view of all the following differences,"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Code: Modifications made to the source code of the component."),(0,r.mdx)("li",{parentName:"ul"},"Composition: Changes made to how the component looks visually."),(0,r.mdx)("li",{parentName:"ul"},"Tests: Changes made to how the component is tested."),(0,r.mdx)("li",{parentName:"ul"},"Dependencies: Changes made to the component's dependency graph."),(0,r.mdx)("li",{parentName:"ul"},"Overview: Changes to the auto-generated documentation for the component."),(0,r.mdx)("li",{parentName:"ul"},"Aspects: Changes made to the extensions for the component."),(0,r.mdx)("li",{parentName:"ul"},"Changelog: Changes exported between the two selected versions"))))}s.isMDXComponent=!0;const d=[t],l=[e],u={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
@@ -572,7 +572,7 @@
572
572
  "__schema": "FunctionLikeSchema",
573
573
  "location": {
574
574
  "filePath": "component-compare.main.runtime.ts",
575
- "line": 242,
575
+ "line": 249,
576
576
  "character": 3
577
577
  },
578
578
  "signature": "(method) ComponentCompareMain.diffBetweenVersionsObjects(modelComponent: ModelComponent, fromVersionObject: Version, toVersionObject: Version, fromVersion: string, toVersion: string, diffOpts: DiffOptions): Promise<DiffResults>",
@@ -582,7 +582,7 @@
582
582
  "__schema": "ParameterSchema",
583
583
  "location": {
584
584
  "filePath": "component-compare.main.runtime.ts",
585
- "line": 243,
585
+ "line": 250,
586
586
  "character": 5
587
587
  },
588
588
  "name": "modelComponent",
@@ -590,7 +590,7 @@
590
590
  "__schema": "TypeRefSchema",
591
591
  "location": {
592
592
  "filePath": "component-compare.main.runtime.ts",
593
- "line": 243,
593
+ "line": 250,
594
594
  "character": 21
595
595
  },
596
596
  "name": "ModelComponent",
@@ -603,7 +603,7 @@
603
603
  "__schema": "ParameterSchema",
604
604
  "location": {
605
605
  "filePath": "component-compare.main.runtime.ts",
606
- "line": 244,
606
+ "line": 251,
607
607
  "character": 5
608
608
  },
609
609
  "name": "fromVersionObject",
@@ -611,7 +611,7 @@
611
611
  "__schema": "TypeRefSchema",
612
612
  "location": {
613
613
  "filePath": "component-compare.main.runtime.ts",
614
- "line": 244,
614
+ "line": 251,
615
615
  "character": 24
616
616
  },
617
617
  "name": "Version",
@@ -624,7 +624,7 @@
624
624
  "__schema": "ParameterSchema",
625
625
  "location": {
626
626
  "filePath": "component-compare.main.runtime.ts",
627
- "line": 245,
627
+ "line": 252,
628
628
  "character": 5
629
629
  },
630
630
  "name": "toVersionObject",
@@ -632,7 +632,7 @@
632
632
  "__schema": "TypeRefSchema",
633
633
  "location": {
634
634
  "filePath": "component-compare.main.runtime.ts",
635
- "line": 245,
635
+ "line": 252,
636
636
  "character": 22
637
637
  },
638
638
  "name": "Version",
@@ -645,7 +645,7 @@
645
645
  "__schema": "ParameterSchema",
646
646
  "location": {
647
647
  "filePath": "component-compare.main.runtime.ts",
648
- "line": 246,
648
+ "line": 253,
649
649
  "character": 5
650
650
  },
651
651
  "name": "fromVersion",
@@ -653,7 +653,7 @@
653
653
  "__schema": "KeywordTypeSchema",
654
654
  "location": {
655
655
  "filePath": "component-compare.main.runtime.ts",
656
- "line": 246,
656
+ "line": 253,
657
657
  "character": 18
658
658
  },
659
659
  "name": "string"
@@ -665,7 +665,7 @@
665
665
  "__schema": "ParameterSchema",
666
666
  "location": {
667
667
  "filePath": "component-compare.main.runtime.ts",
668
- "line": 247,
668
+ "line": 254,
669
669
  "character": 5
670
670
  },
671
671
  "name": "toVersion",
@@ -673,7 +673,7 @@
673
673
  "__schema": "KeywordTypeSchema",
674
674
  "location": {
675
675
  "filePath": "component-compare.main.runtime.ts",
676
- "line": 247,
676
+ "line": 254,
677
677
  "character": 16
678
678
  },
679
679
  "name": "string"
@@ -685,7 +685,7 @@
685
685
  "__schema": "ParameterSchema",
686
686
  "location": {
687
687
  "filePath": "component-compare.main.runtime.ts",
688
- "line": 248,
688
+ "line": 255,
689
689
  "character": 5
690
690
  },
691
691
  "name": "diffOpts",
@@ -693,7 +693,7 @@
693
693
  "__schema": "TypeRefSchema",
694
694
  "location": {
695
695
  "filePath": "component-compare.main.runtime.ts",
696
- "line": 248,
696
+ "line": 255,
697
697
  "character": 15
698
698
  },
699
699
  "name": "DiffOptions",
@@ -707,7 +707,7 @@
707
707
  "__schema": "InferenceTypeSchema",
708
708
  "location": {
709
709
  "filePath": "component-compare.main.runtime.ts",
710
- "line": 242,
710
+ "line": 249,
711
711
  "character": 3
712
712
  },
713
713
  "type": "Promise<DiffResults>"
@@ -720,7 +720,7 @@
720
720
  "__schema": "VariableLikeSchema",
721
721
  "location": {
722
722
  "filePath": "component-compare.main.runtime.ts",
723
- "line": 278,
723
+ "line": 285,
724
724
  "character": 3
725
725
  },
726
726
  "signature": "(property) ComponentCompareMain.slots: never[]",
@@ -729,7 +729,7 @@
729
729
  "__schema": "InferenceTypeSchema",
730
730
  "location": {
731
731
  "filePath": "component-compare.main.runtime.ts",
732
- "line": 278,
732
+ "line": 285,
733
733
  "character": 3
734
734
  },
735
735
  "type": "never[]"
@@ -741,7 +741,7 @@
741
741
  "__schema": "VariableLikeSchema",
742
742
  "location": {
743
743
  "filePath": "component-compare.main.runtime.ts",
744
- "line": 279,
744
+ "line": 286,
745
745
  "character": 3
746
746
  },
747
747
  "signature": "(property) ComponentCompareMain.dependencies: Aspect[]",
@@ -750,7 +750,7 @@
750
750
  "__schema": "InferenceTypeSchema",
751
751
  "location": {
752
752
  "filePath": "component-compare.main.runtime.ts",
753
- "line": 279,
753
+ "line": 286,
754
754
  "character": 3
755
755
  },
756
756
  "type": "Aspect[]"
@@ -762,7 +762,7 @@
762
762
  "__schema": "VariableLikeSchema",
763
763
  "location": {
764
764
  "filePath": "component-compare.main.runtime.ts",
765
- "line": 289,
765
+ "line": 296,
766
766
  "character": 3
767
767
  },
768
768
  "signature": "(property) ComponentCompareMain.runtime: RuntimeDefinition",
@@ -771,7 +771,7 @@
771
771
  "__schema": "InferenceTypeSchema",
772
772
  "location": {
773
773
  "filePath": "component-compare.main.runtime.ts",
774
- "line": 289,
774
+ "line": 296,
775
775
  "character": 3
776
776
  },
777
777
  "type": "RuntimeDefinition"
@@ -783,7 +783,7 @@
783
783
  "__schema": "FunctionLikeSchema",
784
784
  "location": {
785
785
  "filePath": "component-compare.main.runtime.ts",
786
- "line": 290,
786
+ "line": 297,
787
787
  "character": 3
788
788
  },
789
789
  "signature": "(method) ComponentCompareMain.provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain\n]): Promise<ComponentCompareMain>",
@@ -793,7 +793,7 @@
793
793
  "__schema": "ParameterSchema",
794
794
  "location": {
795
795
  "filePath": "component-compare.main.runtime.ts",
796
- "line": 290,
796
+ "line": 297,
797
797
  "character": 25
798
798
  },
799
799
  "name": "[ graphql, component, scope, loggerMain, cli, workspace, tester, depResolver ]",
@@ -801,7 +801,7 @@
801
801
  "__schema": "TupleTypeSchema",
802
802
  "location": {
803
803
  "filePath": "component-compare.main.runtime.ts",
804
- "line": 290,
804
+ "line": 297,
805
805
  "character": 103
806
806
  },
807
807
  "elements": [
@@ -809,7 +809,7 @@
809
809
  "__schema": "TypeRefSchema",
810
810
  "location": {
811
811
  "filePath": "component-compare.main.runtime.ts",
812
- "line": 291,
812
+ "line": 298,
813
813
  "character": 5
814
814
  },
815
815
  "name": "GraphqlMain",
@@ -822,7 +822,7 @@
822
822
  "__schema": "TypeRefSchema",
823
823
  "location": {
824
824
  "filePath": "component-compare.main.runtime.ts",
825
- "line": 292,
825
+ "line": 299,
826
826
  "character": 5
827
827
  },
828
828
  "name": "ComponentMain",
@@ -835,7 +835,7 @@
835
835
  "__schema": "TypeRefSchema",
836
836
  "location": {
837
837
  "filePath": "component-compare.main.runtime.ts",
838
- "line": 293,
838
+ "line": 300,
839
839
  "character": 5
840
840
  },
841
841
  "name": "ScopeMain",
@@ -848,7 +848,7 @@
848
848
  "__schema": "TypeRefSchema",
849
849
  "location": {
850
850
  "filePath": "component-compare.main.runtime.ts",
851
- "line": 294,
851
+ "line": 301,
852
852
  "character": 5
853
853
  },
854
854
  "name": "LoggerMain",
@@ -861,7 +861,7 @@
861
861
  "__schema": "TypeRefSchema",
862
862
  "location": {
863
863
  "filePath": "component-compare.main.runtime.ts",
864
- "line": 295,
864
+ "line": 302,
865
865
  "character": 5
866
866
  },
867
867
  "name": "CLIMain",
@@ -874,7 +874,7 @@
874
874
  "__schema": "TypeRefSchema",
875
875
  "location": {
876
876
  "filePath": "component-compare.main.runtime.ts",
877
- "line": 296,
877
+ "line": 303,
878
878
  "character": 5
879
879
  },
880
880
  "name": "Workspace",
@@ -887,7 +887,7 @@
887
887
  "__schema": "TypeRefSchema",
888
888
  "location": {
889
889
  "filePath": "component-compare.main.runtime.ts",
890
- "line": 297,
890
+ "line": 304,
891
891
  "character": 5
892
892
  },
893
893
  "name": "TesterMain",
@@ -900,7 +900,7 @@
900
900
  "__schema": "TypeRefSchema",
901
901
  "location": {
902
902
  "filePath": "component-compare.main.runtime.ts",
903
- "line": 298,
903
+ "line": 305,
904
904
  "character": 5
905
905
  },
906
906
  "name": "DependencyResolverMain",
@@ -919,7 +919,7 @@
919
919
  "__schema": "InferenceTypeSchema",
920
920
  "location": {
921
921
  "filePath": "component-compare.main.runtime.ts",
922
- "line": 290,
922
+ "line": 297,
923
923
  "character": 3
924
924
  },
925
925
  "type": "Promise<ComponentCompareMain>"
@@ -2292,7 +2292,7 @@
2292
2292
  "__schema": "FunctionLikeSchema",
2293
2293
  "location": {
2294
2294
  "filePath": "component-compare.main.runtime.ts",
2295
- "line": 242,
2295
+ "line": 249,
2296
2296
  "character": 3
2297
2297
  },
2298
2298
  "signature": "(method) ComponentCompareMain.diffBetweenVersionsObjects(modelComponent: ModelComponent, fromVersionObject: Version, toVersionObject: Version, fromVersion: string, toVersion: string, diffOpts: DiffOptions): Promise<DiffResults>",
@@ -2302,7 +2302,7 @@
2302
2302
  "__schema": "ParameterSchema",
2303
2303
  "location": {
2304
2304
  "filePath": "component-compare.main.runtime.ts",
2305
- "line": 243,
2305
+ "line": 250,
2306
2306
  "character": 5
2307
2307
  },
2308
2308
  "name": "modelComponent",
@@ -2310,7 +2310,7 @@
2310
2310
  "__schema": "TypeRefSchema",
2311
2311
  "location": {
2312
2312
  "filePath": "component-compare.main.runtime.ts",
2313
- "line": 243,
2313
+ "line": 250,
2314
2314
  "character": 21
2315
2315
  },
2316
2316
  "name": "ModelComponent",
@@ -2323,7 +2323,7 @@
2323
2323
  "__schema": "ParameterSchema",
2324
2324
  "location": {
2325
2325
  "filePath": "component-compare.main.runtime.ts",
2326
- "line": 244,
2326
+ "line": 251,
2327
2327
  "character": 5
2328
2328
  },
2329
2329
  "name": "fromVersionObject",
@@ -2331,7 +2331,7 @@
2331
2331
  "__schema": "TypeRefSchema",
2332
2332
  "location": {
2333
2333
  "filePath": "component-compare.main.runtime.ts",
2334
- "line": 244,
2334
+ "line": 251,
2335
2335
  "character": 24
2336
2336
  },
2337
2337
  "name": "Version",
@@ -2344,7 +2344,7 @@
2344
2344
  "__schema": "ParameterSchema",
2345
2345
  "location": {
2346
2346
  "filePath": "component-compare.main.runtime.ts",
2347
- "line": 245,
2347
+ "line": 252,
2348
2348
  "character": 5
2349
2349
  },
2350
2350
  "name": "toVersionObject",
@@ -2352,7 +2352,7 @@
2352
2352
  "__schema": "TypeRefSchema",
2353
2353
  "location": {
2354
2354
  "filePath": "component-compare.main.runtime.ts",
2355
- "line": 245,
2355
+ "line": 252,
2356
2356
  "character": 22
2357
2357
  },
2358
2358
  "name": "Version",
@@ -2365,7 +2365,7 @@
2365
2365
  "__schema": "ParameterSchema",
2366
2366
  "location": {
2367
2367
  "filePath": "component-compare.main.runtime.ts",
2368
- "line": 246,
2368
+ "line": 253,
2369
2369
  "character": 5
2370
2370
  },
2371
2371
  "name": "fromVersion",
@@ -2373,7 +2373,7 @@
2373
2373
  "__schema": "KeywordTypeSchema",
2374
2374
  "location": {
2375
2375
  "filePath": "component-compare.main.runtime.ts",
2376
- "line": 246,
2376
+ "line": 253,
2377
2377
  "character": 18
2378
2378
  },
2379
2379
  "name": "string"
@@ -2385,7 +2385,7 @@
2385
2385
  "__schema": "ParameterSchema",
2386
2386
  "location": {
2387
2387
  "filePath": "component-compare.main.runtime.ts",
2388
- "line": 247,
2388
+ "line": 254,
2389
2389
  "character": 5
2390
2390
  },
2391
2391
  "name": "toVersion",
@@ -2393,7 +2393,7 @@
2393
2393
  "__schema": "KeywordTypeSchema",
2394
2394
  "location": {
2395
2395
  "filePath": "component-compare.main.runtime.ts",
2396
- "line": 247,
2396
+ "line": 254,
2397
2397
  "character": 16
2398
2398
  },
2399
2399
  "name": "string"
@@ -2405,7 +2405,7 @@
2405
2405
  "__schema": "ParameterSchema",
2406
2406
  "location": {
2407
2407
  "filePath": "component-compare.main.runtime.ts",
2408
- "line": 248,
2408
+ "line": 255,
2409
2409
  "character": 5
2410
2410
  },
2411
2411
  "name": "diffOpts",
@@ -2413,7 +2413,7 @@
2413
2413
  "__schema": "TypeRefSchema",
2414
2414
  "location": {
2415
2415
  "filePath": "component-compare.main.runtime.ts",
2416
- "line": 248,
2416
+ "line": 255,
2417
2417
  "character": 15
2418
2418
  },
2419
2419
  "name": "DiffOptions",
@@ -2427,7 +2427,7 @@
2427
2427
  "__schema": "InferenceTypeSchema",
2428
2428
  "location": {
2429
2429
  "filePath": "component-compare.main.runtime.ts",
2430
- "line": 242,
2430
+ "line": 249,
2431
2431
  "character": 3
2432
2432
  },
2433
2433
  "type": "Promise<DiffResults>"
@@ -2440,7 +2440,7 @@
2440
2440
  "__schema": "VariableLikeSchema",
2441
2441
  "location": {
2442
2442
  "filePath": "component-compare.main.runtime.ts",
2443
- "line": 278,
2443
+ "line": 285,
2444
2444
  "character": 3
2445
2445
  },
2446
2446
  "signature": "(property) ComponentCompareMain.slots: never[]",
@@ -2449,7 +2449,7 @@
2449
2449
  "__schema": "InferenceTypeSchema",
2450
2450
  "location": {
2451
2451
  "filePath": "component-compare.main.runtime.ts",
2452
- "line": 278,
2452
+ "line": 285,
2453
2453
  "character": 3
2454
2454
  },
2455
2455
  "type": "never[]"
@@ -2461,7 +2461,7 @@
2461
2461
  "__schema": "VariableLikeSchema",
2462
2462
  "location": {
2463
2463
  "filePath": "component-compare.main.runtime.ts",
2464
- "line": 279,
2464
+ "line": 286,
2465
2465
  "character": 3
2466
2466
  },
2467
2467
  "signature": "(property) ComponentCompareMain.dependencies: Aspect[]",
@@ -2470,7 +2470,7 @@
2470
2470
  "__schema": "InferenceTypeSchema",
2471
2471
  "location": {
2472
2472
  "filePath": "component-compare.main.runtime.ts",
2473
- "line": 279,
2473
+ "line": 286,
2474
2474
  "character": 3
2475
2475
  },
2476
2476
  "type": "Aspect[]"
@@ -2482,7 +2482,7 @@
2482
2482
  "__schema": "VariableLikeSchema",
2483
2483
  "location": {
2484
2484
  "filePath": "component-compare.main.runtime.ts",
2485
- "line": 289,
2485
+ "line": 296,
2486
2486
  "character": 3
2487
2487
  },
2488
2488
  "signature": "(property) ComponentCompareMain.runtime: RuntimeDefinition",
@@ -2491,7 +2491,7 @@
2491
2491
  "__schema": "InferenceTypeSchema",
2492
2492
  "location": {
2493
2493
  "filePath": "component-compare.main.runtime.ts",
2494
- "line": 289,
2494
+ "line": 296,
2495
2495
  "character": 3
2496
2496
  },
2497
2497
  "type": "RuntimeDefinition"
@@ -2503,7 +2503,7 @@
2503
2503
  "__schema": "FunctionLikeSchema",
2504
2504
  "location": {
2505
2505
  "filePath": "component-compare.main.runtime.ts",
2506
- "line": 290,
2506
+ "line": 297,
2507
2507
  "character": 3
2508
2508
  },
2509
2509
  "signature": "(method) ComponentCompareMain.provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain\n]): Promise<ComponentCompareMain>",
@@ -2513,7 +2513,7 @@
2513
2513
  "__schema": "ParameterSchema",
2514
2514
  "location": {
2515
2515
  "filePath": "component-compare.main.runtime.ts",
2516
- "line": 290,
2516
+ "line": 297,
2517
2517
  "character": 25
2518
2518
  },
2519
2519
  "name": "[ graphql, component, scope, loggerMain, cli, workspace, tester, depResolver ]",
@@ -2521,7 +2521,7 @@
2521
2521
  "__schema": "TupleTypeSchema",
2522
2522
  "location": {
2523
2523
  "filePath": "component-compare.main.runtime.ts",
2524
- "line": 290,
2524
+ "line": 297,
2525
2525
  "character": 103
2526
2526
  },
2527
2527
  "elements": [
@@ -2529,7 +2529,7 @@
2529
2529
  "__schema": "TypeRefSchema",
2530
2530
  "location": {
2531
2531
  "filePath": "component-compare.main.runtime.ts",
2532
- "line": 291,
2532
+ "line": 298,
2533
2533
  "character": 5
2534
2534
  },
2535
2535
  "name": "GraphqlMain",
@@ -2542,7 +2542,7 @@
2542
2542
  "__schema": "TypeRefSchema",
2543
2543
  "location": {
2544
2544
  "filePath": "component-compare.main.runtime.ts",
2545
- "line": 292,
2545
+ "line": 299,
2546
2546
  "character": 5
2547
2547
  },
2548
2548
  "name": "ComponentMain",
@@ -2555,7 +2555,7 @@
2555
2555
  "__schema": "TypeRefSchema",
2556
2556
  "location": {
2557
2557
  "filePath": "component-compare.main.runtime.ts",
2558
- "line": 293,
2558
+ "line": 300,
2559
2559
  "character": 5
2560
2560
  },
2561
2561
  "name": "ScopeMain",
@@ -2568,7 +2568,7 @@
2568
2568
  "__schema": "TypeRefSchema",
2569
2569
  "location": {
2570
2570
  "filePath": "component-compare.main.runtime.ts",
2571
- "line": 294,
2571
+ "line": 301,
2572
2572
  "character": 5
2573
2573
  },
2574
2574
  "name": "LoggerMain",
@@ -2581,7 +2581,7 @@
2581
2581
  "__schema": "TypeRefSchema",
2582
2582
  "location": {
2583
2583
  "filePath": "component-compare.main.runtime.ts",
2584
- "line": 295,
2584
+ "line": 302,
2585
2585
  "character": 5
2586
2586
  },
2587
2587
  "name": "CLIMain",
@@ -2594,7 +2594,7 @@
2594
2594
  "__schema": "TypeRefSchema",
2595
2595
  "location": {
2596
2596
  "filePath": "component-compare.main.runtime.ts",
2597
- "line": 296,
2597
+ "line": 303,
2598
2598
  "character": 5
2599
2599
  },
2600
2600
  "name": "Workspace",
@@ -2607,7 +2607,7 @@
2607
2607
  "__schema": "TypeRefSchema",
2608
2608
  "location": {
2609
2609
  "filePath": "component-compare.main.runtime.ts",
2610
- "line": 297,
2610
+ "line": 304,
2611
2611
  "character": 5
2612
2612
  },
2613
2613
  "name": "TesterMain",
@@ -2620,7 +2620,7 @@
2620
2620
  "__schema": "TypeRefSchema",
2621
2621
  "location": {
2622
2622
  "filePath": "component-compare.main.runtime.ts",
2623
- "line": 298,
2623
+ "line": 305,
2624
2624
  "character": 5
2625
2625
  },
2626
2626
  "name": "DependencyResolverMain",
@@ -2639,7 +2639,7 @@
2639
2639
  "__schema": "InferenceTypeSchema",
2640
2640
  "location": {
2641
2641
  "filePath": "component-compare.main.runtime.ts",
2642
- "line": 290,
2642
+ "line": 297,
2643
2643
  "character": 3
2644
2644
  },
2645
2645
  "type": "Promise<ComponentCompareMain>"
@@ -2657,7 +2657,7 @@
2657
2657
  "__schema": "UnImplementedSchema",
2658
2658
  "location": {
2659
2659
  "filePath": "component-compare.main.runtime.ts",
2660
- "line": 324,
2660
+ "line": 331,
2661
2661
  "character": 16
2662
2662
  },
2663
2663
  "name": "ComponentCompareMain",
@@ -2777,7 +2777,7 @@
2777
2777
  "__schema": "FunctionLikeSchema",
2778
2778
  "location": {
2779
2779
  "filePath": "component-compare.main.runtime.ts",
2780
- "line": 308,
2780
+ "line": 315,
2781
2781
  "character": 1
2782
2782
  },
2783
2783
  "signature": "function hasDiff(diffResult: DiffResults): boolean",
@@ -2787,7 +2787,7 @@
2787
2787
  "__schema": "ParameterSchema",
2788
2788
  "location": {
2789
2789
  "filePath": "component-compare.main.runtime.ts",
2790
- "line": 308,
2790
+ "line": 315,
2791
2791
  "character": 18
2792
2792
  },
2793
2793
  "name": "diffResult",
@@ -2795,7 +2795,7 @@
2795
2795
  "__schema": "TypeRefSchema",
2796
2796
  "location": {
2797
2797
  "filePath": "component-compare.main.runtime.ts",
2798
- "line": 308,
2798
+ "line": 315,
2799
2799
  "character": 30
2800
2800
  },
2801
2801
  "name": "DiffResults",
@@ -2809,7 +2809,7 @@
2809
2809
  "__schema": "KeywordTypeSchema",
2810
2810
  "location": {
2811
2811
  "filePath": "component-compare.main.runtime.ts",
2812
- "line": 308,
2812
+ "line": 315,
2813
2813
  "character": 44
2814
2814
  },
2815
2815
  "name": "boolean"
@@ -2820,7 +2820,7 @@
2820
2820
  "__schema": "FunctionLikeSchema",
2821
2821
  "location": {
2822
2822
  "filePath": "component-compare.main.runtime.ts",
2823
- "line": 312,
2823
+ "line": 319,
2824
2824
  "character": 1
2825
2825
  },
2826
2826
  "signature": "function updateFieldsDiff(componentA: ConsumerComponent, componentB: ConsumerComponent, diffResult: DiffResults, diffOpts: DiffOptions): Promise<void>",
@@ -2830,7 +2830,7 @@
2830
2830
  "__schema": "ParameterSchema",
2831
2831
  "location": {
2832
2832
  "filePath": "component-compare.main.runtime.ts",
2833
- "line": 313,
2833
+ "line": 320,
2834
2834
  "character": 3
2835
2835
  },
2836
2836
  "name": "componentA",
@@ -2838,7 +2838,7 @@
2838
2838
  "__schema": "TypeRefSchema",
2839
2839
  "location": {
2840
2840
  "filePath": "component-compare.main.runtime.ts",
2841
- "line": 313,
2841
+ "line": 320,
2842
2842
  "character": 15
2843
2843
  },
2844
2844
  "name": "ConsumerComponent",
@@ -2851,7 +2851,7 @@
2851
2851
  "__schema": "ParameterSchema",
2852
2852
  "location": {
2853
2853
  "filePath": "component-compare.main.runtime.ts",
2854
- "line": 314,
2854
+ "line": 321,
2855
2855
  "character": 3
2856
2856
  },
2857
2857
  "name": "componentB",
@@ -2859,7 +2859,7 @@
2859
2859
  "__schema": "TypeRefSchema",
2860
2860
  "location": {
2861
2861
  "filePath": "component-compare.main.runtime.ts",
2862
- "line": 314,
2862
+ "line": 321,
2863
2863
  "character": 15
2864
2864
  },
2865
2865
  "name": "ConsumerComponent",
@@ -2872,7 +2872,7 @@
2872
2872
  "__schema": "ParameterSchema",
2873
2873
  "location": {
2874
2874
  "filePath": "component-compare.main.runtime.ts",
2875
- "line": 315,
2875
+ "line": 322,
2876
2876
  "character": 3
2877
2877
  },
2878
2878
  "name": "diffResult",
@@ -2880,7 +2880,7 @@
2880
2880
  "__schema": "TypeRefSchema",
2881
2881
  "location": {
2882
2882
  "filePath": "component-compare.main.runtime.ts",
2883
- "line": 315,
2883
+ "line": 322,
2884
2884
  "character": 15
2885
2885
  },
2886
2886
  "name": "DiffResults",
@@ -2893,7 +2893,7 @@
2893
2893
  "__schema": "ParameterSchema",
2894
2894
  "location": {
2895
2895
  "filePath": "component-compare.main.runtime.ts",
2896
- "line": 316,
2896
+ "line": 323,
2897
2897
  "character": 3
2898
2898
  },
2899
2899
  "name": "diffOpts",
@@ -2901,7 +2901,7 @@
2901
2901
  "__schema": "TypeRefSchema",
2902
2902
  "location": {
2903
2903
  "filePath": "component-compare.main.runtime.ts",
2904
- "line": 316,
2904
+ "line": 323,
2905
2905
  "character": 13
2906
2906
  },
2907
2907
  "name": "DiffOptions",
@@ -2915,7 +2915,7 @@
2915
2915
  "__schema": "InferenceTypeSchema",
2916
2916
  "location": {
2917
2917
  "filePath": "component-compare.main.runtime.ts",
2918
- "line": 312,
2918
+ "line": 319,
2919
2919
  "character": 1
2920
2920
  },
2921
2921
  "type": "Promise<void>"
@@ -2928,7 +2928,7 @@
2928
2928
  "__schema": "UnImplementedSchema",
2929
2929
  "location": {
2930
2930
  "filePath": "component-compare.main.runtime.ts",
2931
- "line": 322,
2931
+ "line": 329,
2932
2932
  "character": 1
2933
2933
  },
2934
2934
  "name": "ComponentCompareAspect.addRuntime(ComponentCompareMain);",
@@ -3669,7 +3669,7 @@
3669
3669
  "componentId": {
3670
3670
  "scope": "teambit.component",
3671
3671
  "name": "component-compare",
3672
- "version": "1.0.242"
3672
+ "version": "1.0.243"
3673
3673
  },
3674
3674
  "taggedModuleExports": []
3675
3675
  }
@@ -261,16 +261,23 @@ class ComponentCompareMain {
261
261
  };
262
262
  const consumerComponent = component.state._consumer;
263
263
  if (!consumerComponent.componentFromModel) {
264
+ if (component.isDeleted()) {
265
+ // component exists in the model but not in the filesystem, show all files as deleted
266
+ // the reason it is loaded without componentFromModel is because it was loaded from the scope, not workspace.
267
+ // as a proof, consumerComponent.loadedFromFileSystem is false.
268
+ const modelFiles = consumerComponent.files;
269
+ diffResult.filesDiff = await (0, _componentsDiff().getFilesDiff)(modelFiles, [], component.id.version, component.id.version);
270
+ if (hasDiff(diffResult)) diffResult.hasDiff = true;
271
+ return diffResult;
272
+ }
264
273
  // it's a new component. not modified. show all files as new.
265
274
  const fsFiles = consumerComponent.files;
266
- // @ts-ignore version must be defined as the component.componentFromModel do exist
267
275
  diffResult.filesDiff = await (0, _componentsDiff().getFilesDiff)([], fsFiles, component.id.version, component.id.version);
268
276
  if (hasDiff(diffResult)) diffResult.hasDiff = true;
269
277
  return diffResult;
270
278
  }
271
279
  const modelFiles = consumerComponent.componentFromModel.files;
272
280
  const fsFiles = consumerComponent.files;
273
- // @ts-ignore version must be defined as the component.componentFromModel do exist
274
281
  diffResult.filesDiff = await (0, _componentsDiff().getFilesDiff)(modelFiles, fsFiles, component.id.version, component.id.version);
275
282
  await updateFieldsDiff(consumerComponent.componentFromModel, consumerComponent, diffResult, diffOpts);
276
283
  return diffResult;
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_bitError","_workspace","_scope","_graphql","_builder","_dependencyResolver","_logger","_componentsDiff","_componentsObjectDiff","_tester","_component","_componentCompare","_componentCompare2","_diffCmd","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","workspace","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","BitError","toString","baseVersion","version","compareVersion","repository","objects","baseVersionObject","loadVersion","compareVersionObject","diff","diffBetweenVersionsObjects","baseComponent","get","compareComponent","baseTestFiles","getTestFiles","map","file","relative","compareTestFiles","allTestFiles","testFilesDiff","filesDiff","filter","fileDiff","includes","filePath","status","compareResult","id","code","fields","fieldsDiff","tests","diffByCLIValues","pattern","toVersion","verbose","table","OutsideWorkspaceError","ids","idsByPattern","listTagPendingIds","consumer","length","diffResults","componentsDiff","formatDepsAsTable","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","depData","getDependencies","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","diffOpts","components","getMany","getResults","Promise","all","getComponentDiffBetweenVersions","getComponentDiffOfVersion","getComponentDiff","componentsDiffResults","consumerComponent","_consumer","diffResult","hasDiff","fromVersionObject","versionFiles","modelFilesToSourceFiles","fsFiles","files","versionB","getFilesDiff","fromVersionComponent","toConsumerComponent","name","updateFieldsDiff","toVersionObject","fromVersionFiles","toVersionFiles","toVersionComponent","componentFromModel","modelFiles","fromVersion","toComponentId","color","undefined","hash","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","MainRuntime","find","diffOutput","componentA","componentB","diffBetweenComponentsObjects","addRuntime","_default","default"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { BuilderAspect } from '@teambit/builder';\nimport { ModelComponent, Version } from '@teambit/legacy/dist/scope/models';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport {\n DependencyResolverAspect,\n DependencyList,\n DependencyResolverMain,\n SerializedDependency,\n} from '@teambit/dependency-resolver';\nimport { LoggerAspect, LoggerMain, Logger } from '@teambit/logger';\nimport {\n DiffOptions,\n DiffResults,\n FieldsDiff,\n FileDiff,\n getFilesDiff,\n} from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { diffBetweenComponentsObjects } from '@teambit/legacy/dist/consumer/component-ops/components-object-diff';\nimport { TesterMain, TesterAspect } from '@teambit/tester';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { DiffCmd } from './diff-cmd';\n\nexport type ComponentCompareResult = {\n id: string;\n code: FileDiff[];\n fields: FieldsDiff[];\n tests: FileDiff[];\n};\n\ntype ConfigDiff = {\n version?: string;\n dependencies?: string[];\n aspects?: Record<string, any>;\n};\n\nexport class ComponentCompareMain {\n constructor(\n private componentAspect: ComponentMain,\n private scope: ScopeMain,\n private logger: Logger,\n private tester: TesterMain,\n private depResolver: DependencyResolverMain,\n private workspace?: Workspace\n ) {}\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId);\n\n if (!modelComponent) {\n throw new BitError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const repository = this.scope.legacyScope.objects;\n const baseVersionObject = await modelComponent.loadVersion(baseVersion, repository);\n const compareVersionObject = await modelComponent.loadVersion(compareVersion, repository);\n\n const diff: DiffResults = await this.diffBetweenVersionsObjects(\n modelComponent,\n baseVersionObject,\n compareVersionObject,\n baseVersion,\n compareVersion,\n {}\n );\n\n const baseComponent = await host.get(baseCompId);\n const compareComponent = await host.get(compareCompId);\n\n const baseTestFiles =\n (baseComponent && (await this.tester.getTestFiles(baseComponent).map((file) => file.relative))) || [];\n const compareTestFiles =\n (compareComponent && (await this.tester.getTestFiles(compareComponent).map((file) => file.relative))) || [];\n\n const allTestFiles = [...baseTestFiles, ...compareTestFiles];\n\n const testFilesDiff = (diff.filesDiff || []).filter(\n (fileDiff: FileDiff) => allTestFiles.includes(fileDiff.filePath) && fileDiff.status !== 'UNCHANGED'\n );\n\n const compareResult = {\n id: `${baseCompId}-${compareCompId}`,\n code: diff.filesDiff || [],\n fields: diff.fieldsDiff || [],\n tests: testFilesDiff,\n };\n\n return compareResult;\n }\n\n async diffByCLIValues(\n pattern?: string,\n version?: string,\n toVersion?: string,\n { verbose, table }: { verbose?: boolean; table?: boolean } = {}\n ): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const ids = pattern ? await this.workspace.idsByPattern(pattern) : await this.workspace.listTagPendingIds();\n const consumer = this.workspace.consumer;\n if (!ids.length) {\n return [];\n }\n const diffResults = await this.componentsDiff(ids, version, toVersion, {\n verbose,\n formatDepsAsTable: table,\n });\n await consumer.onDestroy('diff');\n return diffResults;\n }\n\n async getConfigForDiffById(id: string): Promise<ConfigDiff> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const component = await workspace.scope.get(componentId, false);\n if (!component) throw new Error(`getConfigForDiff: unable to find component ${id} in local scope`);\n return this.getConfigForDiffByCompObject(component);\n }\n\n async getConfigForDiffByCompObject(component: Component) {\n const depData = this.depResolver.getDependencies(component);\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n return `${idWithoutVersion}@${dep.version} (${dep.lifecycle}) ${dep.source ? `(${dep.source})` : ''}`;\n };\n const serializeAndSort = (deps: DependencyList) => {\n const serialized = deps.serialize().map(serializedToString);\n return serialized.sort();\n };\n const serializeAspect = (comp: Component) => {\n const aspects = comp.state.aspects.withoutEntries([BuilderAspect.id, DependencyResolverAspect.id]);\n // return aspects.serialize();\n return aspects.toLegacy().sortById().toConfigObject();\n };\n return {\n version: component.id.version,\n dependencies: serializeAndSort(depData),\n aspects: serializeAspect(component),\n };\n }\n\n private async componentsDiff(\n ids: ComponentID[],\n version: string | null | undefined,\n toVersion: string | null | undefined,\n diffOpts: DiffOptions\n ): Promise<DiffResults[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace?.consumer;\n const components = await this.workspace.getMany(ids);\n if (!components.length) throw new BitError('failed loading the components');\n\n const getResults = (): Promise<DiffResults[]> => {\n if (version && toVersion) {\n return Promise.all(ids.map((id) => getComponentDiffBetweenVersions(id)));\n }\n if (version) {\n return Promise.all(components.map((component) => getComponentDiffOfVersion(component)));\n }\n return Promise.all(components.map((component) => getComponentDiff(component)));\n };\n const componentsDiffResults = await getResults();\n return componentsDiffResults;\n\n async function getComponentDiffOfVersion(component: Component): Promise<DiffResults> {\n if (!version) throw new Error('getComponentDiffOfVersion expects to get version');\n const consumerComponent = component.state._consumer as ConsumerComponent;\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(component.id);\n if (!modelComponent) {\n throw new BitError(`component ${component.id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const versionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const fsFiles = consumerComponent.files;\n // version must be defined as the component.componentFromModel do exist\n const versionB: string = component.id.version;\n // this function gets called only when version is set\n diffResult.filesDiff = await getFilesDiff(versionFiles, fsFiles, version, versionB);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiffBetweenVersions(id: ComponentID): Promise<DiffResults> {\n if (!version || !toVersion)\n throw new Error('getComponentDiffBetweenVersions expects to get version and toVersion');\n const diffResult: DiffResults = { id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(id);\n if (!modelComponent) {\n throw new BitError(`component ${id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const toVersionObject: Version = await modelComponent.loadVersion(toVersion, repository);\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n diffResult.filesDiff = await getFilesDiff(fromVersionFiles, toVersionFiles, version, toVersion);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n const toVersionComponent = await modelComponent.toConsumerComponent(toVersion, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiff(component: Component): Promise<DiffResults> {\n const diffResult = { id: component.id, hasDiff: false };\n const consumerComponent = component.state._consumer as ConsumerComponent;\n if (!consumerComponent.componentFromModel) {\n // it's a new component. not modified. show all files as new.\n const fsFiles = consumerComponent.files;\n // @ts-ignore version must be defined as the component.componentFromModel do exist\n diffResult.filesDiff = await getFilesDiff([], fsFiles, component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n const modelFiles = consumerComponent.componentFromModel.files;\n const fsFiles = consumerComponent.files;\n // @ts-ignore version must be defined as the component.componentFromModel do exist\n diffResult.filesDiff = await getFilesDiff(modelFiles, fsFiles, component.id.version, component.id.version);\n await updateFieldsDiff(consumerComponent.componentFromModel, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n }\n\n async diffBetweenVersionsObjects(\n modelComponent: ModelComponent,\n fromVersionObject: Version,\n toVersionObject: Version,\n fromVersion: string,\n toVersion: string,\n diffOpts: DiffOptions\n ) {\n const diffResult: DiffResults = { id: modelComponent.toComponentId(), hasDiff: false };\n const scope = this.scope.legacyScope;\n const repository = scope.objects;\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n const color = diffOpts.color ?? true;\n diffResult.filesDiff = await getFilesDiff(\n fromVersionFiles,\n toVersionFiles,\n fromVersion,\n toVersion,\n undefined,\n color\n );\n const fromVersionComponent = await modelComponent.toConsumerComponent(\n fromVersionObject.hash().toString(),\n scope.name,\n repository\n );\n const toVersionComponent = await modelComponent.toConsumerComponent(\n toVersionObject.hash().toString(),\n scope.name,\n repository\n );\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n return diffResult;\n }\n\n static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(component, scope, logger, tester, depResolver, workspace);\n cli.register(new DiffCmd(componentCompareMain));\n graphql.register(componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nfunction hasDiff(diffResult: DiffResults): boolean {\n return !!((diffResult.filesDiff && diffResult.filesDiff.find((file) => file.diffOutput)) || diffResult.fieldsDiff);\n}\n\nasync function updateFieldsDiff(\n componentA: ConsumerComponent,\n componentB: ConsumerComponent,\n diffResult: DiffResults,\n diffOpts: DiffOptions\n) {\n diffResult.fieldsDiff = await diffBetweenComponentsObjects(componentA, componentB, diffOpts);\n diffResult.hasDiff = hasDiff(diffResult);\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain);\n\nexport default ComponentCompareMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;E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AY,UAAU,CAAC5D,UAAU,GAAG,MAAM,IAAA2G,oDAA4B,EAACF,UAAU,EAAEC,UAAU,EAAE1D,QAAQ,CAAC;EAC5FY,UAAU,CAACC,OAAO,GAAGA,OAAO,CAACD,UAAU,CAAC;AAC1C;AAEA6B,2CAAsB,CAACmB,UAAU,CAAChK,oBAAoB,CAAC;AAAC,IAAAiK,QAAA,GAAAf,OAAA,CAAAgB,OAAA,GAEzClK,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_bitError","_workspace","_scope","_graphql","_builder","_dependencyResolver","_logger","_componentsDiff","_componentsObjectDiff","_tester","_component","_componentCompare","_componentCompare2","_diffCmd","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","workspace","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","BitError","toString","baseVersion","version","compareVersion","repository","objects","baseVersionObject","loadVersion","compareVersionObject","diff","diffBetweenVersionsObjects","baseComponent","get","compareComponent","baseTestFiles","getTestFiles","map","file","relative","compareTestFiles","allTestFiles","testFilesDiff","filesDiff","filter","fileDiff","includes","filePath","status","compareResult","id","code","fields","fieldsDiff","tests","diffByCLIValues","pattern","toVersion","verbose","table","OutsideWorkspaceError","ids","idsByPattern","listTagPendingIds","consumer","length","diffResults","componentsDiff","formatDepsAsTable","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","depData","getDependencies","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","diffOpts","components","getMany","getResults","Promise","all","getComponentDiffBetweenVersions","getComponentDiffOfVersion","getComponentDiff","componentsDiffResults","consumerComponent","_consumer","diffResult","hasDiff","fromVersionObject","versionFiles","modelFilesToSourceFiles","fsFiles","files","versionB","getFilesDiff","fromVersionComponent","toConsumerComponent","name","updateFieldsDiff","toVersionObject","fromVersionFiles","toVersionFiles","toVersionComponent","componentFromModel","isDeleted","modelFiles","fromVersion","toComponentId","color","undefined","hash","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","MainRuntime","find","diffOutput","componentA","componentB","diffBetweenComponentsObjects","addRuntime","_default","default"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { BitError } from '@teambit/bit-error';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { ComponentID } from '@teambit/component-id';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { BuilderAspect } from '@teambit/builder';\nimport { ModelComponent, Version } from '@teambit/legacy/dist/scope/models';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport {\n DependencyResolverAspect,\n DependencyList,\n DependencyResolverMain,\n SerializedDependency,\n} from '@teambit/dependency-resolver';\nimport { LoggerAspect, LoggerMain, Logger } from '@teambit/logger';\nimport {\n DiffOptions,\n DiffResults,\n FieldsDiff,\n FileDiff,\n getFilesDiff,\n} from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport { diffBetweenComponentsObjects } from '@teambit/legacy/dist/consumer/component-ops/components-object-diff';\nimport { TesterMain, TesterAspect } from '@teambit/tester';\nimport { ComponentAspect, Component, ComponentMain } from '@teambit/component';\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { DiffCmd } from './diff-cmd';\n\nexport type ComponentCompareResult = {\n id: string;\n code: FileDiff[];\n fields: FieldsDiff[];\n tests: FileDiff[];\n};\n\ntype ConfigDiff = {\n version?: string;\n dependencies?: string[];\n aspects?: Record<string, any>;\n};\n\nexport class ComponentCompareMain {\n constructor(\n private componentAspect: ComponentMain,\n private scope: ScopeMain,\n private logger: Logger,\n private tester: TesterMain,\n private depResolver: DependencyResolverMain,\n private workspace?: Workspace\n ) {}\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId);\n\n if (!modelComponent) {\n throw new BitError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const repository = this.scope.legacyScope.objects;\n const baseVersionObject = await modelComponent.loadVersion(baseVersion, repository);\n const compareVersionObject = await modelComponent.loadVersion(compareVersion, repository);\n\n const diff: DiffResults = await this.diffBetweenVersionsObjects(\n modelComponent,\n baseVersionObject,\n compareVersionObject,\n baseVersion,\n compareVersion,\n {}\n );\n\n const baseComponent = await host.get(baseCompId);\n const compareComponent = await host.get(compareCompId);\n\n const baseTestFiles =\n (baseComponent && (await this.tester.getTestFiles(baseComponent).map((file) => file.relative))) || [];\n const compareTestFiles =\n (compareComponent && (await this.tester.getTestFiles(compareComponent).map((file) => file.relative))) || [];\n\n const allTestFiles = [...baseTestFiles, ...compareTestFiles];\n\n const testFilesDiff = (diff.filesDiff || []).filter(\n (fileDiff: FileDiff) => allTestFiles.includes(fileDiff.filePath) && fileDiff.status !== 'UNCHANGED'\n );\n\n const compareResult = {\n id: `${baseCompId}-${compareCompId}`,\n code: diff.filesDiff || [],\n fields: diff.fieldsDiff || [],\n tests: testFilesDiff,\n };\n\n return compareResult;\n }\n\n async diffByCLIValues(\n pattern?: string,\n version?: string,\n toVersion?: string,\n { verbose, table }: { verbose?: boolean; table?: boolean } = {}\n ): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const ids = pattern ? await this.workspace.idsByPattern(pattern) : await this.workspace.listTagPendingIds();\n const consumer = this.workspace.consumer;\n if (!ids.length) {\n return [];\n }\n const diffResults = await this.componentsDiff(ids, version, toVersion, {\n verbose,\n formatDepsAsTable: table,\n });\n await consumer.onDestroy('diff');\n return diffResults;\n }\n\n async getConfigForDiffById(id: string): Promise<ConfigDiff> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const component = await workspace.scope.get(componentId, false);\n if (!component) throw new Error(`getConfigForDiff: unable to find component ${id} in local scope`);\n return this.getConfigForDiffByCompObject(component);\n }\n\n async getConfigForDiffByCompObject(component: Component) {\n const depData = this.depResolver.getDependencies(component);\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n return `${idWithoutVersion}@${dep.version} (${dep.lifecycle}) ${dep.source ? `(${dep.source})` : ''}`;\n };\n const serializeAndSort = (deps: DependencyList) => {\n const serialized = deps.serialize().map(serializedToString);\n return serialized.sort();\n };\n const serializeAspect = (comp: Component) => {\n const aspects = comp.state.aspects.withoutEntries([BuilderAspect.id, DependencyResolverAspect.id]);\n // return aspects.serialize();\n return aspects.toLegacy().sortById().toConfigObject();\n };\n return {\n version: component.id.version,\n dependencies: serializeAndSort(depData),\n aspects: serializeAspect(component),\n };\n }\n\n private async componentsDiff(\n ids: ComponentID[],\n version: string | null | undefined,\n toVersion: string | null | undefined,\n diffOpts: DiffOptions\n ): Promise<DiffResults[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace?.consumer;\n const components = await this.workspace.getMany(ids);\n if (!components.length) throw new BitError('failed loading the components');\n\n const getResults = (): Promise<DiffResults[]> => {\n if (version && toVersion) {\n return Promise.all(ids.map((id) => getComponentDiffBetweenVersions(id)));\n }\n if (version) {\n return Promise.all(components.map((component) => getComponentDiffOfVersion(component)));\n }\n return Promise.all(components.map((component) => getComponentDiff(component)));\n };\n const componentsDiffResults = await getResults();\n return componentsDiffResults;\n\n async function getComponentDiffOfVersion(component: Component): Promise<DiffResults> {\n if (!version) throw new Error('getComponentDiffOfVersion expects to get version');\n const consumerComponent = component.state._consumer as ConsumerComponent;\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(component.id);\n if (!modelComponent) {\n throw new BitError(`component ${component.id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const versionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const fsFiles = consumerComponent.files;\n // version must be defined as the component.componentFromModel do exist\n const versionB: string = component.id.version;\n // this function gets called only when version is set\n diffResult.filesDiff = await getFilesDiff(versionFiles, fsFiles, version, versionB);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiffBetweenVersions(id: ComponentID): Promise<DiffResults> {\n if (!version || !toVersion)\n throw new Error('getComponentDiffBetweenVersions expects to get version and toVersion');\n const diffResult: DiffResults = { id, hasDiff: false };\n const modelComponent = await consumer.scope.getModelComponentIfExist(id);\n if (!modelComponent) {\n throw new BitError(`component ${id.toString()} doesn't have any version yet`);\n }\n const repository = consumer.scope.objects;\n\n const fromVersionObject: Version = await modelComponent.loadVersion(version, repository);\n const toVersionObject: Version = await modelComponent.loadVersion(toVersion, repository);\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n diffResult.filesDiff = await getFilesDiff(fromVersionFiles, toVersionFiles, version, toVersion);\n const fromVersionComponent = await modelComponent.toConsumerComponent(version, consumer.scope.name, repository);\n const toVersionComponent = await modelComponent.toConsumerComponent(toVersion, consumer.scope.name, repository);\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async function getComponentDiff(component: Component): Promise<DiffResults> {\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const consumerComponent = component.state._consumer as ConsumerComponent;\n if (!consumerComponent.componentFromModel) {\n if (component.isDeleted()) {\n // component exists in the model but not in the filesystem, show all files as deleted\n // the reason it is loaded without componentFromModel is because it was loaded from the scope, not workspace.\n // as a proof, consumerComponent.loadedFromFileSystem is false.\n const modelFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, [], component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n // it's a new component. not modified. show all files as new.\n const fsFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff([], fsFiles, component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n const modelFiles = consumerComponent.componentFromModel.files;\n const fsFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, fsFiles, component.id.version, component.id.version);\n await updateFieldsDiff(consumerComponent.componentFromModel, consumerComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n }\n\n async diffBetweenVersionsObjects(\n modelComponent: ModelComponent,\n fromVersionObject: Version,\n toVersionObject: Version,\n fromVersion: string,\n toVersion: string,\n diffOpts: DiffOptions\n ) {\n const diffResult: DiffResults = { id: modelComponent.toComponentId(), hasDiff: false };\n const scope = this.scope.legacyScope;\n const repository = scope.objects;\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n const color = diffOpts.color ?? true;\n diffResult.filesDiff = await getFilesDiff(\n fromVersionFiles,\n toVersionFiles,\n fromVersion,\n toVersion,\n undefined,\n color\n );\n const fromVersionComponent = await modelComponent.toConsumerComponent(\n fromVersionObject.hash().toString(),\n scope.name,\n repository\n );\n const toVersionComponent = await modelComponent.toConsumerComponent(\n toVersionObject.hash().toString(),\n scope.name,\n repository\n );\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n return diffResult;\n }\n\n static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(component, scope, logger, tester, depResolver, workspace);\n cli.register(new DiffCmd(componentCompareMain));\n graphql.register(componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nfunction hasDiff(diffResult: DiffResults): boolean {\n return !!((diffResult.filesDiff && diffResult.filesDiff.find((file) => file.diffOutput)) || diffResult.fieldsDiff);\n}\n\nasync function updateFieldsDiff(\n componentA: ConsumerComponent,\n componentB: ConsumerComponent,\n diffResult: DiffResults,\n diffOpts: DiffOptions\n) {\n diffResult.fieldsDiff = await diffBetweenComponentsObjects(componentA, componentB, diffOpts);\n diffResult.hasDiff = hasDiff(diffResult);\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain);\n\nexport default ComponentCompareMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;A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F,oBAAoB,CAAC,CAAC;IAC/CL,OAAO,CAACM,QAAQ,CAAC,IAAAE,0CAAsB,EAACH,oBAAoB,CAAC,CAAC;IAC9D,OAAOA,oBAAoB;EAC7B;AACF;AAACI,OAAA,CAAAnJ,oBAAA,GAAAA,oBAAA;AAAArB,eAAA,CA7QYqB,oBAAoB,WAiPhB,EAAE;AAAArB,eAAA,CAjPNqB,oBAAoB,kBAkPT,CACpBoJ,wBAAa,EACbC,4BAAe,EACfC,oBAAW,EACXC,sBAAY,EACZC,gBAAS,EACTC,4BAAe,EACfC,sBAAY,EACZ3D,8CAAwB,CACzB;AAAApH,eAAA,CA3PUqB,oBAAoB,aA4Pd2J,kBAAW;AAmB9B,SAAS1C,OAAOA,CAACD,UAAuB,EAAW;EACjD,OAAO,CAAC,EAAGA,UAAU,CAACtE,SAAS,IAAIsE,UAAU,CAACtE,SAAS,CAACkH,IAAI,CAAEvH,IAAI,IAAKA,IAAI,CAACwH,UAAU,CAAC,IAAK7C,UAAU,CAAC5D,UAAU,CAAC;AACpH;AAEA,eAAewE,gBAAgBA,CAC7BkC,UAA6B,EAC7BC,UAA6B,EAC7B/C,UAAuB,EACvBZ,QAAqB,EACrB;EACAY,UAAU,CAAC5D,UAAU,GAAG,MAAM,IAAA4G,oDAA4B,EAACF,UAAU,EAAEC,UAAU,EAAE3D,QAAQ,CAAC;EAC5FY,UAAU,CAACC,OAAO,GAAGA,OAAO,CAACD,UAAU,CAAC;AAC1C;AAEA8B,2CAAsB,CAACmB,UAAU,CAACjK,oBAAoB,CAAC;AAAC,IAAAkK,QAAA,GAAAf,OAAA,CAAAgB,OAAA,GAEzCnK,oBAAoB","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.242/dist/component-compare.compositions.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.242/dist/component-compare.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.243/dist/component-compare.compositions.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@1.0.243/dist/component-compare.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component-compare",
3
- "version": "1.0.242",
3
+ "version": "1.0.243",
4
4
  "homepage": "https://bit.cloud/teambit/component/component-compare",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "component-compare",
9
- "version": "1.0.242"
9
+ "version": "1.0.243"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -19,19 +19,19 @@
19
19
  "@teambit/component-id": "1.2.0",
20
20
  "@teambit/component.ui.component-compare.compare-aspects.compare-aspects": "0.0.146",
21
21
  "@teambit/component.ui.component-compare.models.component-compare-props": "0.0.105",
22
- "@teambit/component": "1.0.242",
23
- "@teambit/builder": "1.0.242",
22
+ "@teambit/component": "1.0.243",
23
+ "@teambit/builder": "1.0.243",
24
24
  "@teambit/cli": "0.0.862",
25
- "@teambit/dependency-resolver": "1.0.242",
26
- "@teambit/graphql": "1.0.242",
25
+ "@teambit/dependency-resolver": "1.0.243",
26
+ "@teambit/graphql": "1.0.243",
27
27
  "@teambit/logger": "0.0.955",
28
- "@teambit/scope": "1.0.242",
29
- "@teambit/tester": "1.0.242",
30
- "@teambit/workspace": "1.0.242",
28
+ "@teambit/scope": "1.0.243",
29
+ "@teambit/tester": "1.0.243",
30
+ "@teambit/workspace": "1.0.243",
31
31
  "@teambit/component.ui.component-compare.changelog": "0.0.180",
32
32
  "@teambit/component.ui.component-compare.component-compare": "0.0.181",
33
33
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.508",
34
- "@teambit/ui": "1.0.242"
34
+ "@teambit/ui": "1.0.243"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/lodash.flatten": "4.4.6",