@teambit/merging 1.0.244 → 1.0.246
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 +1 -1
- package/artifacts/schema.json +46 -198
- package/dist/merging.main.runtime.d.ts +3 -3
- package/dist/merging.main.runtime.js +1 -1
- package/dist/merging.main.runtime.js.map +1 -1
- package/package.json +12 -12
- /package/dist/{preview-1713496942811.js → preview-1713669572180.js} +0 -0
|
@@ -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/merging@1.0.
|
|
3
|
+
<testsuite name="teambit.component/merging@1.0.246" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
|
@@ -1447,7 +1447,7 @@
|
|
|
1447
1447
|
"raw": "/**\n * merge multiple components according to the \"allComponentsStatus\".\n */",
|
|
1448
1448
|
"comment": "merge multiple components according to the \"allComponentsStatus\"."
|
|
1449
1449
|
},
|
|
1450
|
-
"signature": "(method) MergingMain.mergeSnaps({ mergeStrategy, allComponentsStatus, otherLaneId, currentLane, noSnap, tag, snapMessage, build, skipDependencyInstallation, }: {\n mergeStrategy: MergeStrategy;\n allComponentsStatus: ComponentMergeStatus[];\n otherLaneId: LaneId;\n currentLane
|
|
1450
|
+
"signature": "(method) MergingMain.mergeSnaps({ mergeStrategy, allComponentsStatus, otherLaneId, currentLane, noSnap, tag, snapMessage, build, skipDependencyInstallation, }: {\n mergeStrategy: MergeStrategy;\n allComponentsStatus: ComponentMergeStatus[];\n otherLaneId: LaneId;\n currentLane?: Lane;\n noSnap: boolean;\n tag?: boolean;\n snapMessage: string;\n build: boolean;\n skipDependencyInstallation?: boolean;\n}): Promise<ApplyVersionResults>",
|
|
1451
1451
|
"name": "mergeSnaps",
|
|
1452
1452
|
"params": [
|
|
1453
1453
|
{
|
|
@@ -1547,38 +1547,19 @@
|
|
|
1547
1547
|
"line": 221,
|
|
1548
1548
|
"character": 5
|
|
1549
1549
|
},
|
|
1550
|
-
"signature": "(property) currentLane
|
|
1550
|
+
"signature": "(property) currentLane?: Lane | undefined",
|
|
1551
1551
|
"name": "currentLane",
|
|
1552
1552
|
"type": {
|
|
1553
|
-
"__schema": "
|
|
1553
|
+
"__schema": "TypeRefSchema",
|
|
1554
1554
|
"location": {
|
|
1555
1555
|
"filePath": "merging.main.runtime.ts",
|
|
1556
1556
|
"line": 221,
|
|
1557
|
-
"character":
|
|
1557
|
+
"character": 19
|
|
1558
1558
|
},
|
|
1559
|
-
"
|
|
1560
|
-
|
|
1561
|
-
"__schema": "TypeRefSchema",
|
|
1562
|
-
"location": {
|
|
1563
|
-
"filePath": "merging.main.runtime.ts",
|
|
1564
|
-
"line": 221,
|
|
1565
|
-
"character": 18
|
|
1566
|
-
},
|
|
1567
|
-
"name": "Lane",
|
|
1568
|
-
"packageName": "@teambit/legacy/dist/scope/models"
|
|
1569
|
-
},
|
|
1570
|
-
{
|
|
1571
|
-
"__schema": "LiteralTypeSchema",
|
|
1572
|
-
"location": {
|
|
1573
|
-
"filePath": "merging.main.runtime.ts",
|
|
1574
|
-
"line": 221,
|
|
1575
|
-
"character": 25
|
|
1576
|
-
},
|
|
1577
|
-
"name": "null"
|
|
1578
|
-
}
|
|
1579
|
-
]
|
|
1559
|
+
"name": "Lane",
|
|
1560
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
1580
1561
|
},
|
|
1581
|
-
"isOptional":
|
|
1562
|
+
"isOptional": true
|
|
1582
1563
|
},
|
|
1583
1564
|
{
|
|
1584
1565
|
"__schema": "VariableLikeSchema",
|
|
@@ -1765,38 +1746,19 @@
|
|
|
1765
1746
|
"line": 221,
|
|
1766
1747
|
"character": 5
|
|
1767
1748
|
},
|
|
1768
|
-
"signature": "(property) currentLane
|
|
1749
|
+
"signature": "(property) currentLane?: Lane | undefined",
|
|
1769
1750
|
"name": "currentLane",
|
|
1770
1751
|
"type": {
|
|
1771
|
-
"__schema": "
|
|
1752
|
+
"__schema": "TypeRefSchema",
|
|
1772
1753
|
"location": {
|
|
1773
1754
|
"filePath": "merging.main.runtime.ts",
|
|
1774
1755
|
"line": 221,
|
|
1775
|
-
"character":
|
|
1756
|
+
"character": 19
|
|
1776
1757
|
},
|
|
1777
|
-
"
|
|
1778
|
-
|
|
1779
|
-
"__schema": "TypeRefSchema",
|
|
1780
|
-
"location": {
|
|
1781
|
-
"filePath": "merging.main.runtime.ts",
|
|
1782
|
-
"line": 221,
|
|
1783
|
-
"character": 18
|
|
1784
|
-
},
|
|
1785
|
-
"name": "Lane",
|
|
1786
|
-
"packageName": "@teambit/legacy/dist/scope/models"
|
|
1787
|
-
},
|
|
1788
|
-
{
|
|
1789
|
-
"__schema": "LiteralTypeSchema",
|
|
1790
|
-
"location": {
|
|
1791
|
-
"filePath": "merging.main.runtime.ts",
|
|
1792
|
-
"line": 221,
|
|
1793
|
-
"character": 25
|
|
1794
|
-
},
|
|
1795
|
-
"name": "null"
|
|
1796
|
-
}
|
|
1797
|
-
]
|
|
1758
|
+
"name": "Lane",
|
|
1759
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
1798
1760
|
},
|
|
1799
|
-
"isOptional":
|
|
1761
|
+
"isOptional": true
|
|
1800
1762
|
},
|
|
1801
1763
|
{
|
|
1802
1764
|
"__schema": "VariableLikeSchema",
|
|
@@ -1943,7 +1905,7 @@
|
|
|
1943
1905
|
"raw": "/**\n * this function gets called from two different commands:\n * 1. \"bit merge <ids...>\", when merging a component from a remote to the local.\n * in this case, the remote and local are on the same lane or both on main.\n * 2. \"bit lane merge\", when merging from one lane to another.\n */",
|
|
1944
1906
|
"comment": "this function gets called from two different commands:\n1. \"bit merge <ids...>\", when merging a component from a remote to the local.\nin this case, the remote and local are on the same lane or both on main.\n2. \"bit lane merge\", when merging from one lane to another."
|
|
1945
1907
|
},
|
|
1946
|
-
"signature": "(method) MergingMain.getMergeStatus(bitIds: ComponentID[], options: MergeStatusProviderOptions, currentLane
|
|
1908
|
+
"signature": "(method) MergingMain.getMergeStatus(bitIds: ComponentID[], options: MergeStatusProviderOptions, currentLane?: Lane, otherLane?: Lane): Promise<ComponentMergeStatus[]>",
|
|
1947
1909
|
"name": "getMergeStatus",
|
|
1948
1910
|
"params": [
|
|
1949
1911
|
{
|
|
@@ -2009,35 +1971,16 @@
|
|
|
2009
1971
|
},
|
|
2010
1972
|
"name": "currentLane",
|
|
2011
1973
|
"type": {
|
|
2012
|
-
"__schema": "
|
|
1974
|
+
"__schema": "TypeRefSchema",
|
|
2013
1975
|
"location": {
|
|
2014
1976
|
"filePath": "merging.main.runtime.ts",
|
|
2015
1977
|
"line": 353,
|
|
2016
|
-
"character":
|
|
1978
|
+
"character": 19
|
|
2017
1979
|
},
|
|
2018
|
-
"
|
|
2019
|
-
|
|
2020
|
-
"__schema": "TypeRefSchema",
|
|
2021
|
-
"location": {
|
|
2022
|
-
"filePath": "merging.main.runtime.ts",
|
|
2023
|
-
"line": 353,
|
|
2024
|
-
"character": 18
|
|
2025
|
-
},
|
|
2026
|
-
"name": "Lane",
|
|
2027
|
-
"packageName": "@teambit/legacy/dist/scope/models"
|
|
2028
|
-
},
|
|
2029
|
-
{
|
|
2030
|
-
"__schema": "LiteralTypeSchema",
|
|
2031
|
-
"location": {
|
|
2032
|
-
"filePath": "merging.main.runtime.ts",
|
|
2033
|
-
"line": 353,
|
|
2034
|
-
"character": 25
|
|
2035
|
-
},
|
|
2036
|
-
"name": "null"
|
|
2037
|
-
}
|
|
2038
|
-
]
|
|
1980
|
+
"name": "Lane",
|
|
1981
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
2039
1982
|
},
|
|
2040
|
-
"isOptional":
|
|
1983
|
+
"isOptional": true,
|
|
2041
1984
|
"isSpread": false
|
|
2042
1985
|
},
|
|
2043
1986
|
{
|
|
@@ -2049,33 +1992,14 @@
|
|
|
2049
1992
|
},
|
|
2050
1993
|
"name": "otherLane",
|
|
2051
1994
|
"type": {
|
|
2052
|
-
"__schema": "
|
|
1995
|
+
"__schema": "TypeRefSchema",
|
|
2053
1996
|
"location": {
|
|
2054
1997
|
"filePath": "merging.main.runtime.ts",
|
|
2055
1998
|
"line": 354,
|
|
2056
1999
|
"character": 17
|
|
2057
2000
|
},
|
|
2058
|
-
"
|
|
2059
|
-
|
|
2060
|
-
"__schema": "TypeRefSchema",
|
|
2061
|
-
"location": {
|
|
2062
|
-
"filePath": "merging.main.runtime.ts",
|
|
2063
|
-
"line": 354,
|
|
2064
|
-
"character": 17
|
|
2065
|
-
},
|
|
2066
|
-
"name": "Lane",
|
|
2067
|
-
"packageName": "@teambit/legacy/dist/scope/models"
|
|
2068
|
-
},
|
|
2069
|
-
{
|
|
2070
|
-
"__schema": "LiteralTypeSchema",
|
|
2071
|
-
"location": {
|
|
2072
|
-
"filePath": "merging.main.runtime.ts",
|
|
2073
|
-
"line": 354,
|
|
2074
|
-
"character": 24
|
|
2075
|
-
},
|
|
2076
|
-
"name": "null"
|
|
2077
|
-
}
|
|
2078
|
-
]
|
|
2001
|
+
"name": "Lane",
|
|
2002
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
2079
2003
|
},
|
|
2080
2004
|
"isOptional": true,
|
|
2081
2005
|
"isSpread": false
|
|
@@ -4029,7 +3953,7 @@
|
|
|
4029
3953
|
"_legacy": {
|
|
4030
3954
|
"scope": "teambit.component",
|
|
4031
3955
|
"name": "merging",
|
|
4032
|
-
"version": "1.0.
|
|
3956
|
+
"version": "1.0.246"
|
|
4033
3957
|
},
|
|
4034
3958
|
"_scope": "teambit.component"
|
|
4035
3959
|
}
|
|
@@ -6623,7 +6547,7 @@
|
|
|
6623
6547
|
"raw": "/**\n * merge multiple components according to the \"allComponentsStatus\".\n */",
|
|
6624
6548
|
"comment": "merge multiple components according to the \"allComponentsStatus\"."
|
|
6625
6549
|
},
|
|
6626
|
-
"signature": "(method) MergingMain.mergeSnaps({ mergeStrategy, allComponentsStatus, otherLaneId, currentLane, noSnap, tag, snapMessage, build, skipDependencyInstallation, }: {\n mergeStrategy: MergeStrategy;\n allComponentsStatus: ComponentMergeStatus[];\n otherLaneId: LaneId;\n currentLane
|
|
6550
|
+
"signature": "(method) MergingMain.mergeSnaps({ mergeStrategy, allComponentsStatus, otherLaneId, currentLane, noSnap, tag, snapMessage, build, skipDependencyInstallation, }: {\n mergeStrategy: MergeStrategy;\n allComponentsStatus: ComponentMergeStatus[];\n otherLaneId: LaneId;\n currentLane?: Lane;\n noSnap: boolean;\n tag?: boolean;\n snapMessage: string;\n build: boolean;\n skipDependencyInstallation?: boolean;\n}): Promise<ApplyVersionResults>",
|
|
6627
6551
|
"name": "mergeSnaps",
|
|
6628
6552
|
"params": [
|
|
6629
6553
|
{
|
|
@@ -6723,38 +6647,19 @@
|
|
|
6723
6647
|
"line": 221,
|
|
6724
6648
|
"character": 5
|
|
6725
6649
|
},
|
|
6726
|
-
"signature": "(property) currentLane
|
|
6650
|
+
"signature": "(property) currentLane?: Lane | undefined",
|
|
6727
6651
|
"name": "currentLane",
|
|
6728
6652
|
"type": {
|
|
6729
|
-
"__schema": "
|
|
6653
|
+
"__schema": "TypeRefSchema",
|
|
6730
6654
|
"location": {
|
|
6731
6655
|
"filePath": "merging.main.runtime.ts",
|
|
6732
6656
|
"line": 221,
|
|
6733
|
-
"character":
|
|
6657
|
+
"character": 19
|
|
6734
6658
|
},
|
|
6735
|
-
"
|
|
6736
|
-
|
|
6737
|
-
"__schema": "TypeRefSchema",
|
|
6738
|
-
"location": {
|
|
6739
|
-
"filePath": "merging.main.runtime.ts",
|
|
6740
|
-
"line": 221,
|
|
6741
|
-
"character": 18
|
|
6742
|
-
},
|
|
6743
|
-
"name": "Lane",
|
|
6744
|
-
"packageName": "@teambit/legacy/dist/scope/models"
|
|
6745
|
-
},
|
|
6746
|
-
{
|
|
6747
|
-
"__schema": "LiteralTypeSchema",
|
|
6748
|
-
"location": {
|
|
6749
|
-
"filePath": "merging.main.runtime.ts",
|
|
6750
|
-
"line": 221,
|
|
6751
|
-
"character": 25
|
|
6752
|
-
},
|
|
6753
|
-
"name": "null"
|
|
6754
|
-
}
|
|
6755
|
-
]
|
|
6659
|
+
"name": "Lane",
|
|
6660
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
6756
6661
|
},
|
|
6757
|
-
"isOptional":
|
|
6662
|
+
"isOptional": true
|
|
6758
6663
|
},
|
|
6759
6664
|
{
|
|
6760
6665
|
"__schema": "VariableLikeSchema",
|
|
@@ -6941,38 +6846,19 @@
|
|
|
6941
6846
|
"line": 221,
|
|
6942
6847
|
"character": 5
|
|
6943
6848
|
},
|
|
6944
|
-
"signature": "(property) currentLane
|
|
6849
|
+
"signature": "(property) currentLane?: Lane | undefined",
|
|
6945
6850
|
"name": "currentLane",
|
|
6946
6851
|
"type": {
|
|
6947
|
-
"__schema": "
|
|
6852
|
+
"__schema": "TypeRefSchema",
|
|
6948
6853
|
"location": {
|
|
6949
6854
|
"filePath": "merging.main.runtime.ts",
|
|
6950
6855
|
"line": 221,
|
|
6951
|
-
"character":
|
|
6856
|
+
"character": 19
|
|
6952
6857
|
},
|
|
6953
|
-
"
|
|
6954
|
-
|
|
6955
|
-
"__schema": "TypeRefSchema",
|
|
6956
|
-
"location": {
|
|
6957
|
-
"filePath": "merging.main.runtime.ts",
|
|
6958
|
-
"line": 221,
|
|
6959
|
-
"character": 18
|
|
6960
|
-
},
|
|
6961
|
-
"name": "Lane",
|
|
6962
|
-
"packageName": "@teambit/legacy/dist/scope/models"
|
|
6963
|
-
},
|
|
6964
|
-
{
|
|
6965
|
-
"__schema": "LiteralTypeSchema",
|
|
6966
|
-
"location": {
|
|
6967
|
-
"filePath": "merging.main.runtime.ts",
|
|
6968
|
-
"line": 221,
|
|
6969
|
-
"character": 25
|
|
6970
|
-
},
|
|
6971
|
-
"name": "null"
|
|
6972
|
-
}
|
|
6973
|
-
]
|
|
6858
|
+
"name": "Lane",
|
|
6859
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
6974
6860
|
},
|
|
6975
|
-
"isOptional":
|
|
6861
|
+
"isOptional": true
|
|
6976
6862
|
},
|
|
6977
6863
|
{
|
|
6978
6864
|
"__schema": "VariableLikeSchema",
|
|
@@ -7119,7 +7005,7 @@
|
|
|
7119
7005
|
"raw": "/**\n * this function gets called from two different commands:\n * 1. \"bit merge <ids...>\", when merging a component from a remote to the local.\n * in this case, the remote and local are on the same lane or both on main.\n * 2. \"bit lane merge\", when merging from one lane to another.\n */",
|
|
7120
7006
|
"comment": "this function gets called from two different commands:\n1. \"bit merge <ids...>\", when merging a component from a remote to the local.\nin this case, the remote and local are on the same lane or both on main.\n2. \"bit lane merge\", when merging from one lane to another."
|
|
7121
7007
|
},
|
|
7122
|
-
"signature": "(method) MergingMain.getMergeStatus(bitIds: ComponentID[], options: MergeStatusProviderOptions, currentLane
|
|
7008
|
+
"signature": "(method) MergingMain.getMergeStatus(bitIds: ComponentID[], options: MergeStatusProviderOptions, currentLane?: Lane, otherLane?: Lane): Promise<ComponentMergeStatus[]>",
|
|
7123
7009
|
"name": "getMergeStatus",
|
|
7124
7010
|
"params": [
|
|
7125
7011
|
{
|
|
@@ -7185,35 +7071,16 @@
|
|
|
7185
7071
|
},
|
|
7186
7072
|
"name": "currentLane",
|
|
7187
7073
|
"type": {
|
|
7188
|
-
"__schema": "
|
|
7074
|
+
"__schema": "TypeRefSchema",
|
|
7189
7075
|
"location": {
|
|
7190
7076
|
"filePath": "merging.main.runtime.ts",
|
|
7191
7077
|
"line": 353,
|
|
7192
|
-
"character":
|
|
7078
|
+
"character": 19
|
|
7193
7079
|
},
|
|
7194
|
-
"
|
|
7195
|
-
|
|
7196
|
-
"__schema": "TypeRefSchema",
|
|
7197
|
-
"location": {
|
|
7198
|
-
"filePath": "merging.main.runtime.ts",
|
|
7199
|
-
"line": 353,
|
|
7200
|
-
"character": 18
|
|
7201
|
-
},
|
|
7202
|
-
"name": "Lane",
|
|
7203
|
-
"packageName": "@teambit/legacy/dist/scope/models"
|
|
7204
|
-
},
|
|
7205
|
-
{
|
|
7206
|
-
"__schema": "LiteralTypeSchema",
|
|
7207
|
-
"location": {
|
|
7208
|
-
"filePath": "merging.main.runtime.ts",
|
|
7209
|
-
"line": 353,
|
|
7210
|
-
"character": 25
|
|
7211
|
-
},
|
|
7212
|
-
"name": "null"
|
|
7213
|
-
}
|
|
7214
|
-
]
|
|
7080
|
+
"name": "Lane",
|
|
7081
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
7215
7082
|
},
|
|
7216
|
-
"isOptional":
|
|
7083
|
+
"isOptional": true,
|
|
7217
7084
|
"isSpread": false
|
|
7218
7085
|
},
|
|
7219
7086
|
{
|
|
@@ -7225,33 +7092,14 @@
|
|
|
7225
7092
|
},
|
|
7226
7093
|
"name": "otherLane",
|
|
7227
7094
|
"type": {
|
|
7228
|
-
"__schema": "
|
|
7095
|
+
"__schema": "TypeRefSchema",
|
|
7229
7096
|
"location": {
|
|
7230
7097
|
"filePath": "merging.main.runtime.ts",
|
|
7231
7098
|
"line": 354,
|
|
7232
7099
|
"character": 17
|
|
7233
7100
|
},
|
|
7234
|
-
"
|
|
7235
|
-
|
|
7236
|
-
"__schema": "TypeRefSchema",
|
|
7237
|
-
"location": {
|
|
7238
|
-
"filePath": "merging.main.runtime.ts",
|
|
7239
|
-
"line": 354,
|
|
7240
|
-
"character": 17
|
|
7241
|
-
},
|
|
7242
|
-
"name": "Lane",
|
|
7243
|
-
"packageName": "@teambit/legacy/dist/scope/models"
|
|
7244
|
-
},
|
|
7245
|
-
{
|
|
7246
|
-
"__schema": "LiteralTypeSchema",
|
|
7247
|
-
"location": {
|
|
7248
|
-
"filePath": "merging.main.runtime.ts",
|
|
7249
|
-
"line": 354,
|
|
7250
|
-
"character": 24
|
|
7251
|
-
},
|
|
7252
|
-
"name": "null"
|
|
7253
|
-
}
|
|
7254
|
-
]
|
|
7101
|
+
"name": "Lane",
|
|
7102
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
7255
7103
|
},
|
|
7256
7104
|
"isOptional": true,
|
|
7257
7105
|
"isSpread": false
|
|
@@ -7734,7 +7582,7 @@
|
|
|
7734
7582
|
"componentId": {
|
|
7735
7583
|
"scope": "teambit.component",
|
|
7736
7584
|
"name": "merging",
|
|
7737
|
-
"version": "1.0.
|
|
7585
|
+
"version": "1.0.246"
|
|
7738
7586
|
},
|
|
7739
7587
|
"taggedModuleExports": []
|
|
7740
7588
|
}
|
|
@@ -105,7 +105,7 @@ export declare class MergingMain {
|
|
|
105
105
|
mergeStrategy: MergeStrategy;
|
|
106
106
|
allComponentsStatus: ComponentMergeStatus[];
|
|
107
107
|
otherLaneId: LaneId;
|
|
108
|
-
currentLane
|
|
108
|
+
currentLane?: Lane;
|
|
109
109
|
noSnap: boolean;
|
|
110
110
|
tag?: boolean;
|
|
111
111
|
snapMessage: string;
|
|
@@ -119,8 +119,8 @@ export declare class MergingMain {
|
|
|
119
119
|
* 2. "bit lane merge", when merging from one lane to another.
|
|
120
120
|
*/
|
|
121
121
|
getMergeStatus(bitIds: ComponentID[], // the id.version is the version we want to merge to the current component
|
|
122
|
-
options: MergeStatusProviderOptions, currentLane
|
|
123
|
-
otherLane?: Lane
|
|
122
|
+
options: MergeStatusProviderOptions, currentLane?: Lane, // currently checked out lane. if on main, then it's null.
|
|
123
|
+
otherLane?: Lane): Promise<ComponentMergeStatus[]>;
|
|
124
124
|
private applyVersionMultiple;
|
|
125
125
|
private applyVersion;
|
|
126
126
|
private abortMerge;
|
|
@@ -380,7 +380,7 @@ class MergingMain {
|
|
|
380
380
|
options, currentLane,
|
|
381
381
|
// currently checked out lane. if on main, then it's null.
|
|
382
382
|
otherLane) {
|
|
383
|
-
const mergeStatusProvider = new (_mergeStatusProvider().MergeStatusProvider)(this.scope, this.logger, this.importer, options, this.workspace, currentLane
|
|
383
|
+
const mergeStatusProvider = new (_mergeStatusProvider().MergeStatusProvider)(this.scope, this.logger, this.importer, options, this.workspace, currentLane, otherLane);
|
|
384
384
|
return mergeStatusProvider.getStatus(bitIds);
|
|
385
385
|
}
|
|
386
386
|
async applyVersionMultiple(succeededComponents, otherLaneId, mergeStrategy, currentLane) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_workspace","_componentsList","_interopRequireDefault","_mergeVersion","_snapping","_hasWildcard","_pMapSeries","_componentId","_bitError","_laneId","_chalk","_config","_remove","_utils","_componentWriter","_importer","_logger","_globalConfig","_lodash","_checkout","_deleteComponentFiles","_configMerger","_install","_scope","_mergeCmd","_merging","_mergeStatusProvider","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MergingMain","constructor","workspace","scope","install","snapping","checkout","logger","componentWriter","importer","config","remove","configMerger","merge","ids","mergeStrategy","abort","resolve","noSnap","message","build","skipDependencyInstallation","OutsideWorkspaceError","consumer","mergeResults","resolveMerge","abortMerge","bitIds","getComponentsToMerge","mergeComponentsFromRemote","onDestroy","snapMessage","currentLaneId","getCurrentLaneId","currentLaneObject","getCurrentLaneObject","allComponentsStatus","getAllComponentsStatus","failedComponents","c","unchangedMessage","unchangedLegitimately","failureMsgs","map","failedComponent","chalk","bold","id","toString","red","join","BitError","mergeSnaps","otherLaneId","currentLane","tag","legacyScope","componentWithConflict","find","component","hasConflicts","getMergeStrategyInteractive","componentStatus","shouldBeRemoved","componentIdsToRemove","changeVersion","undefined","succeededComponents","componentsResults","applyVersionMultiple","allConfigMerge","compact","configMergeResult","workspaceDepsUpdates","workspaceDepsConflicts","updateWorkspaceJsoncWithDepsIfNeeded","workspaceConfigConflictWriteError","writeWorkspaceJsoncWithConflictsGracefully","generateConfigMergeConflictFileForAll","objects","add","persist","unmergedComponents","write","writeBitMap","compBitIdsToRemove","ComponentIdList","fromArray","deleteComponentsFiles","cleanFromBitMap","componentsHasConfigMergeConflicts","some","leftUnresolvedConflicts","dedupe","updateExisting","import","err","error","consoleFailure","getSnapOrTagResults","idsToTag","results","tagAllLaneComponent","taggedComponents","autoTaggedResults","removedComponents","snappedComponents","autoSnappedResults","snapResolvedComponents","toLaneId","mergeSnapResults","mergeSnapError","bitMapSnapshot","bitMap","takeSnapshot","restoreFromSnapshot","components","applyVersionResult","workspaceConfigUpdateResult","getMergeStatus","options","otherLane","mergeStatusProvider","MergeStatusProvider","getStatus","mapSeries","currentComponent","resolvedUnrelated","modelComponent","getModelComponent","updatedLaneId","isDefault","LaneId","from","name","applyVersion","remoteHead","getRef","version","compsToWrite","legacyCompToWrite","manyComponentsWriterOpts","writeConfig","reasonForBitmapChange","writeMany","filesStatus","unmergedComponent","fullName","head","laneId","addToCurrentLane","Error","isPartOfLane","isEqualWithoutVersion","addComponent","handleResolveUnrelated","headOnCurrentLane","unrelated","unrelatedHead","unrelatedLaneId","addEntry","markAllFilesAsUnchanged","files","file","pathNormalizeToLinux","relative","FileStatus","unchanged","MergeOptions","ours","strategy","remoteId","idToLoad","theirs","legacyComponent","loadComponentFromModelImportIfNeeded","getConsumerComponent","updateFileStatus","modifiedStatus","modifiedFiles","applyModifiedVersion","removeFilesIfNeeded","successfullyMergedConfig","getSuccessfullyMergedConfig","mergedConfig","manual","unmergedPaths","f","conflict","filePath","setHead","markVersionAsLocal","values","getIdsForUnmerged","reset","removeComponent","abortedComponents","snap","legacyBitIds","resolvedComponents","localLaneObject","Promise","all","bitId","remoteScopeName","remoteLaneId","remoteLanes","laneIdStr","toStringWithoutVersion","shouldSquash","getComponents","debug","ComponentID","fromObject","snapFromScope","componentId","lane","tagMessage","unmodified","idsStr","componentIds","resolveMultipleComponentIds","entry","getEntry","unresolvedComponents","u","componentsList","ComponentsList","mergePending","listMergePendingComponents","hasWildcard","listComponentsByIdsWithWildcard","getParsedId","provider","cli","loggerMain","compWriter","globalConfig","createLogger","MergingAspect","merging","register","MergeCmd","exports","CLIAspect","WorkspaceAspect","ScopeAspect","SnappingAspect","CheckoutAspect","InstallAspect","LoggerAspect","ComponentWriterAspect","ImporterAspect","ConfigAspect","RemoveAspect","GlobalConfigAspect","ConfigMergerAspect","MainRuntime","addRuntime"],"sources":["merging.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport {\n MergeStrategy,\n FileStatus,\n getMergeStrategyInteractive,\n MergeOptions,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { SnappingAspect, SnappingMain, TagResults } from '@teambit/snapping';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport mapSeries from 'p-map-series';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport { AutoTagResult } from '@teambit/legacy/dist/scope/component-ops/auto-tag';\nimport { UnmergedComponent } from '@teambit/legacy/dist/scope/lanes/unmerged-components';\nimport { Lane, ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport chalk from 'chalk';\nimport { ConfigAspect, ConfigMain } from '@teambit/config';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { pathNormalizeToLinux } from '@teambit/legacy/dist/utils';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { GlobalConfigAspect, GlobalConfigMain } from '@teambit/global-config';\nimport { compact } from 'lodash';\nimport { MergeResultsThreeWay } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/three-way-merge';\nimport {\n ApplyVersionWithComps,\n CheckoutAspect,\n CheckoutMain,\n ComponentStatusBase,\n applyModifiedVersion,\n removeFilesIfNeeded,\n updateFileStatus,\n} from '@teambit/checkout';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport {\n ConfigMergerAspect,\n ConfigMergerMain,\n ConfigMergeResult,\n WorkspaceConfigUpdateResult,\n} from '@teambit/config-merger';\nimport { SnapsDistance } from '@teambit/legacy/dist/scope/component-ops/snaps-distance';\nimport { InstallMain, InstallAspect } from '@teambit/install';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { MergeCmd } from './merge-cmd';\nimport { MergingAspect } from './merging.aspect';\nimport { MergeStatusProvider, MergeStatusProviderOptions } from './merge-status-provider';\n\ntype ResolveUnrelatedData = {\n strategy: MergeStrategy;\n headOnCurrentLane: Ref;\n unrelatedHead: Ref;\n unrelatedLaneId: LaneId;\n};\n\nexport type ComponentMergeStatus = ComponentStatusBase & {\n mergeResults?: MergeResultsThreeWay | null;\n divergeData?: SnapsDistance;\n resolvedUnrelated?: ResolveUnrelatedData;\n configMergeResult?: ConfigMergeResult;\n};\n\nexport type ComponentMergeStatusBeforeMergeAttempt = ComponentStatusBase & {\n divergeData?: SnapsDistance;\n resolvedUnrelated?: ResolveUnrelatedData;\n mergeProps?: {\n otherLaneHead: Ref;\n currentId: ComponentID;\n modelComponent: ModelComponent;\n };\n};\n\nexport type FailedComponents = { id: ComponentID; unchangedMessage: string; unchangedLegitimately?: boolean };\n\n// fileName is PathLinux. TS doesn't let anything else in the keys other than string and number\nexport type FilesStatus = { [fileName: string]: keyof typeof FileStatus };\n\nexport type MergeSnapResults = {\n snappedComponents: ConsumerComponent[];\n autoSnappedResults: AutoTagResult[];\n removedComponents?: ComponentIdList;\n exportedIds?: ComponentID[];\n} | null;\n\nexport type ApplyVersionResult = { id: ComponentID; filesStatus: FilesStatus };\n\nexport type ApplyVersionResults = {\n components?: ApplyVersionResult[];\n version?: string;\n failedComponents?: FailedComponents[];\n removedComponents?: ComponentID[];\n addedComponents?: ComponentID[]; // relevant when restoreMissingComponents is true (e.g. bit lane merge-abort)\n resolvedComponents?: ConsumerComponent[]; // relevant for bit merge --resolve\n abortedComponents?: ApplyVersionResult[]; // relevant for bit merge --abort\n mergeSnapResults?: MergeSnapResults;\n mergeSnapError?: Error;\n leftUnresolvedConflicts?: boolean;\n verbose?: boolean;\n newFromLane?: string[];\n newFromLaneAdded?: boolean;\n installationError?: Error; // in case the package manager failed, it won't throw, instead, it'll return error here\n compilationError?: Error; // in case the compiler failed, it won't throw, instead, it'll return error here\n workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult;\n};\n\nexport class MergingMain {\n constructor(\n private workspace: Workspace,\n private scope: ScopeMain,\n private install: InstallMain,\n private snapping: SnappingMain,\n private checkout: CheckoutMain,\n private logger: Logger,\n private componentWriter: ComponentWriterMain,\n private importer: ImporterMain,\n private config: ConfigMain,\n private remove: RemoveMain,\n private configMerger: ConfigMergerMain\n ) {}\n\n async merge(\n ids: string[],\n mergeStrategy: MergeStrategy,\n abort: boolean,\n resolve: boolean,\n noSnap: boolean,\n message: string,\n build: boolean,\n skipDependencyInstallation: boolean\n ): Promise<ApplyVersionResults> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer: Consumer = this.workspace.consumer;\n let mergeResults;\n if (resolve) {\n mergeResults = await this.resolveMerge(ids, message, build);\n } else if (abort) {\n mergeResults = await this.abortMerge(ids);\n } else {\n const bitIds = await this.getComponentsToMerge(consumer, ids);\n mergeResults = await this.mergeComponentsFromRemote(\n consumer,\n bitIds,\n mergeStrategy,\n noSnap,\n message,\n build,\n skipDependencyInstallation\n );\n }\n await consumer.onDestroy('merge');\n return mergeResults;\n }\n\n /**\n * when user is on main, it merges the remote main components into local.\n * when user is on a lane, it merges the remote lane components into the local lane.\n */\n async mergeComponentsFromRemote(\n consumer: Consumer,\n bitIds: ComponentID[],\n mergeStrategy: MergeStrategy,\n noSnap: boolean,\n snapMessage: string,\n build: boolean,\n skipDependencyInstallation: boolean\n ): Promise<ApplyVersionResults> {\n const currentLaneId = consumer.getCurrentLaneId();\n const currentLaneObject = await consumer.getCurrentLaneObject();\n const allComponentsStatus = await this.getAllComponentsStatus(\n bitIds,\n currentLaneId,\n currentLaneObject,\n mergeStrategy\n );\n const failedComponents = allComponentsStatus.filter((c) => c.unchangedMessage && !c.unchangedLegitimately);\n if (failedComponents.length) {\n const failureMsgs = failedComponents\n .map(\n (failedComponent) =>\n `${chalk.bold(failedComponent.id.toString())} - ${chalk.red(failedComponent.unchangedMessage as string)}`\n )\n .join('\\n');\n throw new BitError(`unable to merge due to the following failures:\\n${failureMsgs}`);\n }\n\n return this.mergeSnaps({\n mergeStrategy,\n allComponentsStatus,\n otherLaneId: currentLaneId,\n currentLane: currentLaneObject,\n noSnap,\n snapMessage,\n build,\n skipDependencyInstallation,\n });\n }\n\n /**\n * merge multiple components according to the \"allComponentsStatus\".\n */\n async mergeSnaps({\n mergeStrategy,\n allComponentsStatus,\n otherLaneId,\n currentLane,\n noSnap,\n tag,\n snapMessage,\n build,\n skipDependencyInstallation,\n }: {\n mergeStrategy: MergeStrategy;\n allComponentsStatus: ComponentMergeStatus[];\n otherLaneId: LaneId;\n currentLane: Lane | null;\n noSnap: boolean;\n tag?: boolean;\n snapMessage: string;\n build: boolean;\n skipDependencyInstallation?: boolean;\n }): Promise<ApplyVersionResults> {\n const consumer = this.workspace?.consumer;\n const legacyScope = this.scope.legacyScope;\n const componentWithConflict = allComponentsStatus.find(\n (component) => component.mergeResults && component.mergeResults.hasConflicts\n );\n if (componentWithConflict && !mergeStrategy) {\n mergeStrategy = await getMergeStrategyInteractive();\n }\n const failedComponents: FailedComponents[] = allComponentsStatus\n .filter((componentStatus) => componentStatus.unchangedMessage)\n .filter((componentStatus) => !componentStatus.shouldBeRemoved)\n .map((componentStatus) => ({\n id: componentStatus.id,\n unchangedMessage: componentStatus.unchangedMessage as string,\n unchangedLegitimately: componentStatus.unchangedLegitimately,\n }));\n\n const componentIdsToRemove = allComponentsStatus\n .filter((componentStatus) => componentStatus.shouldBeRemoved)\n .map((c) => c.id.changeVersion(undefined));\n\n const succeededComponents = allComponentsStatus.filter((componentStatus) => !componentStatus.unchangedMessage);\n\n const componentsResults = await this.applyVersionMultiple(\n succeededComponents,\n otherLaneId,\n mergeStrategy,\n currentLane\n );\n\n const allConfigMerge = compact(succeededComponents.map((c) => c.configMergeResult));\n\n const { workspaceDepsUpdates, workspaceDepsConflicts } = this.workspace\n ? await this.configMerger.updateWorkspaceJsoncWithDepsIfNeeded(allConfigMerge)\n : { workspaceDepsUpdates: undefined, workspaceDepsConflicts: undefined };\n\n let workspaceConfigConflictWriteError: Error | undefined;\n if (workspaceDepsConflicts) {\n workspaceConfigConflictWriteError = await this.configMerger.writeWorkspaceJsoncWithConflictsGracefully(\n workspaceDepsConflicts\n );\n }\n if (this.workspace) await this.configMerger.generateConfigMergeConflictFileForAll(allConfigMerge);\n\n if (currentLane) legacyScope.objects.add(currentLane);\n\n await legacyScope.objects.persist(); // persist anyway, if currentLane is null it should save all main heads\n\n await legacyScope.objects.unmergedComponents.write();\n\n if (this.workspace) await consumer.writeBitMap(`merge ${otherLaneId.toString()}`);\n\n if (componentIdsToRemove.length && this.workspace) {\n const compBitIdsToRemove = ComponentIdList.fromArray(componentIdsToRemove);\n await deleteComponentsFiles(consumer, compBitIdsToRemove);\n await consumer.cleanFromBitMap(compBitIdsToRemove);\n }\n\n const componentsHasConfigMergeConflicts = allComponentsStatus.some((c) => c.configMergeResult?.hasConflicts());\n const leftUnresolvedConflicts = componentWithConflict && mergeStrategy === 'manual';\n if (!skipDependencyInstallation && !leftUnresolvedConflicts && !componentsHasConfigMergeConflicts) {\n try {\n await this.install.install(undefined, {\n dedupe: true,\n updateExisting: false,\n import: false,\n });\n } catch (err: any) {\n this.logger.error(`failed installing packages`, err);\n this.logger.consoleFailure(\n `failed installing packages, see the log for full stacktrace. error: ${err.message}`\n );\n }\n }\n\n const getSnapOrTagResults = async (): Promise<MergeSnapResults> => {\n // if one of the component has conflict, don't snap-merge. otherwise, some of the components would be snap-merged\n // and some not. besides the fact that it could by mistake tag dependent, it's a confusing state. better not snap.\n if (noSnap || leftUnresolvedConflicts || componentsHasConfigMergeConflicts) {\n return null;\n }\n if (tag) {\n const idsToTag = allComponentsStatus.map((c) => c.id);\n const results = await this.tagAllLaneComponent(idsToTag, snapMessage, build);\n if (!results) return null;\n const { taggedComponents, autoTaggedResults, removedComponents } = results;\n return { snappedComponents: taggedComponents, autoSnappedResults: autoTaggedResults, removedComponents };\n }\n return this.snapResolvedComponents(snapMessage, build, currentLane?.toLaneId());\n };\n let mergeSnapResults: MergeSnapResults = null;\n let mergeSnapError: Error | undefined;\n const bitMapSnapshot = this.workspace ? this.workspace.bitMap.takeSnapshot() : null;\n try {\n mergeSnapResults = await getSnapOrTagResults();\n } catch (err: any) {\n this.logger.error('failed running snap. mergeSnapError:', err);\n mergeSnapError = err;\n if (bitMapSnapshot) this.workspace.bitMap.restoreFromSnapshot(bitMapSnapshot);\n }\n\n return {\n components: componentsResults.map((c) => c.applyVersionResult),\n failedComponents,\n removedComponents: [...componentIdsToRemove, ...(mergeSnapResults?.removedComponents || [])],\n mergeSnapResults,\n mergeSnapError,\n workspaceConfigUpdateResult: {\n workspaceDepsUpdates,\n workspaceDepsConflicts,\n workspaceConfigConflictWriteError,\n },\n leftUnresolvedConflicts,\n };\n }\n\n /**\n * this function gets called from two different commands:\n * 1. \"bit merge <ids...>\", when merging a component from a remote to the local.\n * in this case, the remote and local are on the same lane or both on main.\n * 2. \"bit lane merge\", when merging from one lane to another.\n */\n async getMergeStatus(\n bitIds: ComponentID[], // the id.version is the version we want to merge to the current component\n options: MergeStatusProviderOptions,\n currentLane: Lane | null, // currently checked out lane. if on main, then it's null.\n otherLane?: Lane | null // the lane we want to merged to our lane. (null if it's \"main\").\n ): Promise<ComponentMergeStatus[]> {\n const mergeStatusProvider = new MergeStatusProvider(\n this.scope,\n this.logger,\n this.importer,\n options,\n this.workspace,\n currentLane || undefined,\n otherLane || undefined\n );\n return mergeStatusProvider.getStatus(bitIds);\n }\n\n private async applyVersionMultiple(\n succeededComponents: ComponentMergeStatus[],\n otherLaneId: LaneId,\n mergeStrategy: MergeStrategy,\n currentLane: Lane | null\n ): Promise<ApplyVersionWithComps[]> {\n const componentsResults = await mapSeries(\n succeededComponents,\n async ({ currentComponent, id, mergeResults, resolvedUnrelated, configMergeResult }) => {\n const modelComponent = await this.scope.legacyScope.getModelComponent(id);\n const updatedLaneId = otherLaneId.isDefault() ? LaneId.from(otherLaneId.name, id.scope as string) : otherLaneId;\n return this.applyVersion({\n currentComponent,\n id,\n mergeResults,\n mergeStrategy,\n remoteHead: modelComponent.getRef(id.version as string) as Ref,\n otherLaneId: updatedLaneId,\n currentLane,\n resolvedUnrelated,\n configMergeResult,\n });\n }\n );\n\n if (this.workspace) {\n const compsToWrite = compact(componentsResults.map((c) => c.legacyCompToWrite));\n const manyComponentsWriterOpts = {\n consumer: this.workspace.consumer,\n components: compsToWrite,\n skipDependencyInstallation: true,\n writeConfig: false, // @todo: should write if config exists before, needs to figure out how to do it.\n reasonForBitmapChange: 'merge',\n };\n await this.componentWriter.writeMany(manyComponentsWriterOpts);\n }\n\n return componentsResults;\n }\n\n private async applyVersion({\n currentComponent,\n id,\n mergeResults,\n mergeStrategy,\n remoteHead,\n otherLaneId,\n currentLane,\n resolvedUnrelated,\n configMergeResult,\n }: {\n currentComponent: ConsumerComponent | null | undefined;\n id: ComponentID;\n mergeResults: MergeResultsThreeWay | null | undefined;\n mergeStrategy: MergeStrategy;\n remoteHead: Ref;\n otherLaneId: LaneId;\n currentLane: Lane | null;\n resolvedUnrelated?: ResolveUnrelatedData;\n configMergeResult?: ConfigMergeResult;\n }): Promise<ApplyVersionWithComps> {\n const legacyScope = this.scope.legacyScope;\n let filesStatus = {};\n const unmergedComponent: UnmergedComponent = {\n id: { name: id.fullName, scope: id.scope },\n head: remoteHead,\n laneId: otherLaneId,\n };\n id = currentComponent ? currentComponent.id : id;\n const modelComponent = await legacyScope.getModelComponent(id);\n\n const addToCurrentLane = (head: Ref) => {\n if (!currentLane) throw new Error('currentLane must be defined when adding to the lane');\n if (otherLaneId.isDefault()) {\n const isPartOfLane = currentLane.components.find((c) => c.id.isEqualWithoutVersion(id));\n if (!isPartOfLane) return;\n }\n currentLane.addComponent({ id, head });\n };\n\n const handleResolveUnrelated = (legacyCompToWrite?: ConsumerComponent) => {\n if (!currentComponent) throw new Error('currentComponent must be defined when resolvedUnrelated');\n // because when on a main, we don't allow merging lanes with unrelated. we asks users to switch to the lane\n // first and then merge with --resolve-unrelated\n if (!currentLane) throw new Error('currentLane must be defined when resolvedUnrelated');\n if (!resolvedUnrelated) throw new Error('resolvedUnrelated must be populated');\n addToCurrentLane(resolvedUnrelated.headOnCurrentLane);\n unmergedComponent.unrelated = {\n unrelatedHead: resolvedUnrelated.unrelatedHead,\n headOnCurrentLane: resolvedUnrelated.headOnCurrentLane,\n unrelatedLaneId: resolvedUnrelated.unrelatedLaneId,\n };\n legacyScope.objects.unmergedComponents.addEntry(unmergedComponent);\n return { applyVersionResult: { id, filesStatus }, component: currentComponent, legacyCompToWrite };\n };\n\n const markAllFilesAsUnchanged = () => {\n if (!currentComponent) throw new Error(`applyVersion expect to get currentComponent for ${id.toString()}`);\n currentComponent.files.forEach((file) => {\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.unchanged;\n });\n };\n if (mergeResults && mergeResults.hasConflicts && mergeStrategy === MergeOptions.ours) {\n markAllFilesAsUnchanged();\n legacyScope.objects.unmergedComponents.addEntry(unmergedComponent);\n return { applyVersionResult: { id, filesStatus }, component: currentComponent || undefined };\n }\n if (resolvedUnrelated?.strategy === 'ours') {\n markAllFilesAsUnchanged();\n return handleResolveUnrelated();\n }\n const remoteId = id.changeVersion(remoteHead.toString());\n const idToLoad = !mergeResults || mergeStrategy === MergeOptions.theirs ? remoteId : id;\n const legacyComponent = this.workspace\n ? await this.workspace.consumer.loadComponentFromModelImportIfNeeded(idToLoad)\n : await legacyScope.getConsumerComponent(idToLoad); // when loading from the scope, we import all needed components first, so it should be fine. otherwise, change the code to import it here\n if (mergeResults && mergeStrategy === MergeOptions.theirs) {\n // in this case, we don't want to update .bitmap with the version of the remote. we want to keep the same version\n legacyComponent.version = id.version;\n }\n const files = legacyComponent.files;\n updateFileStatus(files, filesStatus, currentComponent || undefined);\n\n if (mergeResults) {\n // update files according to the merge results\n const { filesStatus: modifiedStatus, modifiedFiles } = applyModifiedVersion(files, mergeResults, mergeStrategy);\n legacyComponent.files = modifiedFiles;\n filesStatus = { ...filesStatus, ...modifiedStatus };\n }\n\n if (this.workspace) await removeFilesIfNeeded(filesStatus, this.workspace.consumer, currentComponent || undefined);\n\n if (configMergeResult) {\n const successfullyMergedConfig = configMergeResult.getSuccessfullyMergedConfig();\n if (successfullyMergedConfig) {\n unmergedComponent.mergedConfig = successfullyMergedConfig;\n // no need to `unmergedComponents.addEntry` here. it'll be added in the next lines inside `if (mergeResults)`.\n // because if `configMergeResult` is set, `mergeResults` must be set as well. both happen on diverge.\n }\n }\n\n // if mergeResults, the head snap is going to be updated on a later phase when snapping with two parents\n // otherwise, update the head of the current lane or main\n if (mergeResults) {\n if (mergeResults.hasConflicts && mergeStrategy === MergeOptions.manual) {\n unmergedComponent.unmergedPaths = mergeResults.modifiedFiles.filter((f) => f.conflict).map((f) => f.filePath);\n }\n legacyScope.objects.unmergedComponents.addEntry(unmergedComponent);\n } else if (currentLane) {\n if (resolvedUnrelated) {\n // must be \"theirs\"\n return handleResolveUnrelated(legacyComponent);\n }\n addToCurrentLane(remoteHead);\n } else {\n // this is main\n modelComponent.setHead(remoteHead);\n // mark it as local, otherwise, when importing this component from a remote, it'll override it.\n modelComponent.markVersionAsLocal(remoteHead.toString());\n legacyScope.objects.add(modelComponent);\n }\n\n return {\n applyVersionResult: { id: idToLoad, filesStatus },\n component: currentComponent || undefined,\n legacyCompToWrite: legacyComponent,\n };\n }\n\n private async abortMerge(values: string[]): Promise<ApplyVersionResults> {\n const consumer = this.workspace.consumer;\n const ids = await this.getIdsForUnmerged(values);\n const results = await this.checkout.checkout({ ids, reset: true });\n ids.forEach((id) => consumer.scope.objects.unmergedComponents.removeComponent(id));\n await consumer.scope.objects.unmergedComponents.write();\n return { abortedComponents: results.components };\n }\n\n private async resolveMerge(values: string[], snapMessage: string, build: boolean): Promise<ApplyVersionResults> {\n const ids = await this.getIdsForUnmerged(values);\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const { snappedComponents } = await this.snapping.snap({\n legacyBitIds: ComponentIdList.fromArray(ids.map((id) => id)),\n build,\n message: snapMessage,\n });\n return { resolvedComponents: snappedComponents };\n }\n\n private async getAllComponentsStatus(\n bitIds: ComponentID[],\n laneId: LaneId,\n localLaneObject: Lane | null,\n mergeStrategy: MergeStrategy\n ): Promise<ComponentMergeStatus[]> {\n const ids = await Promise.all(\n bitIds.map(async (bitId) => {\n const remoteScopeName = laneId.isDefault() ? bitId.scope : laneId.scope;\n const remoteLaneId = LaneId.from(laneId.name, remoteScopeName as string);\n const remoteHead = await this.workspace.consumer.scope.objects.remoteLanes.getRef(remoteLaneId, bitId);\n const laneIdStr = remoteLaneId.toString();\n if (!remoteHead) {\n throw new BitError(`unable to find a remote head of \"${bitId.toStringWithoutVersion()}\" in \"${laneIdStr}\"`);\n }\n return bitId.changeVersion(remoteHead.toString());\n })\n );\n\n return this.getMergeStatus(ids, { shouldSquash: false, mergeStrategy }, localLaneObject, localLaneObject);\n }\n\n private async snapResolvedComponents(\n snapMessage: string,\n build: boolean,\n laneId?: LaneId\n ): Promise<MergeSnapResults> {\n const unmergedComponents = this.scope.legacyScope.objects.unmergedComponents.getComponents();\n this.logger.debug(`merge-snaps, snapResolvedComponents, total ${unmergedComponents.length.toString()} components`);\n if (!unmergedComponents.length) return null;\n const ids = ComponentIdList.fromArray(unmergedComponents.map((r) => ComponentID.fromObject(r.id)));\n if (!this.workspace) {\n const results = await this.snapping.snapFromScope(\n ids.map((id) => ({ componentId: id.toString() })),\n {\n message: snapMessage,\n build,\n lane: laneId?.toString(),\n }\n );\n return { ...results, autoSnappedResults: [] };\n }\n return this.snapping.snap({\n legacyBitIds: ids,\n build,\n message: snapMessage,\n });\n }\n\n private async tagAllLaneComponent(\n idsToTag: ComponentID[],\n tagMessage: string,\n build: boolean\n ): Promise<TagResults | null> {\n const ids = idsToTag.map((id) => {\n return id.toStringWithoutVersion();\n });\n this.logger.debug(`merge-snaps, tagResolvedComponents, total ${idsToTag.length.toString()} components`);\n return this.snapping.tag({\n ids,\n build,\n message: tagMessage,\n unmodified: true,\n });\n }\n\n private async getIdsForUnmerged(idsStr?: string[]): Promise<ComponentID[]> {\n if (idsStr && idsStr.length) {\n const componentIds = await this.workspace.resolveMultipleComponentIds(idsStr);\n componentIds.forEach((id) => {\n const entry = this.workspace.consumer.scope.objects.unmergedComponents.getEntry(id);\n if (!entry) {\n throw new BitError(`unable to merge-resolve ${id.toString()}, it is not marked as unresolved`);\n }\n });\n return componentIds;\n }\n const unresolvedComponents = this.workspace.consumer.scope.objects.unmergedComponents.getComponents();\n if (!unresolvedComponents.length) throw new BitError(`all components are resolved already, nothing to do`);\n return unresolvedComponents.map((u) => ComponentID.fromObject(u.id));\n }\n\n private async getComponentsToMerge(consumer: Consumer, ids: string[]): Promise<ComponentID[]> {\n const componentsList = new ComponentsList(consumer);\n if (!ids.length) {\n const mergePending = await componentsList.listMergePendingComponents();\n return mergePending.map((c) => c.id);\n }\n if (hasWildcard(ids)) {\n return componentsList.listComponentsByIdsWithWildcard(ids);\n }\n return ids.map((id) => consumer.getParsedId(id));\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n ScopeAspect,\n SnappingAspect,\n CheckoutAspect,\n InstallAspect,\n LoggerAspect,\n ComponentWriterAspect,\n ImporterAspect,\n ConfigAspect,\n RemoveAspect,\n GlobalConfigAspect,\n ConfigMergerAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n workspace,\n scope,\n snapping,\n checkout,\n install,\n loggerMain,\n compWriter,\n importer,\n config,\n remove,\n globalConfig,\n configMerger,\n ]: [\n CLIMain,\n Workspace,\n ScopeMain,\n SnappingMain,\n CheckoutMain,\n InstallMain,\n LoggerMain,\n ComponentWriterMain,\n ImporterMain,\n ConfigMain,\n RemoveMain,\n GlobalConfigMain,\n ConfigMergerMain\n ]) {\n const logger = loggerMain.createLogger(MergingAspect.id);\n const merging = new MergingMain(\n workspace,\n scope,\n install,\n snapping,\n checkout,\n logger,\n compWriter,\n importer,\n config,\n remove,\n configMerger\n );\n cli.register(new MergeCmd(merging, globalConfig));\n return merging;\n }\n}\n\nMergingAspect.addRuntime(MergingMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,gBAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAA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,OAAOA,GAAG,CAAC6B,GAAG,CAAEI,EAAE,IAAKxB,QAAQ,CAACiN,WAAW,CAACzL,EAAE,CAAC,CAAC;EAClD;EAmBA,aAAa0L,QAAQA,CAAC,CACpBC,GAAG,EACHxO,SAAS,EACTC,KAAK,EACLE,QAAQ,EACRC,QAAQ,EACRF,OAAO,EACPuO,UAAU,EACVC,UAAU,EACVnO,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNkO,YAAY,EACZjO,YAAY,CAeb,EAAE;IACD,MAAML,MAAM,GAAGoO,UAAU,CAACG,YAAY,CAACC,wBAAa,CAAChM,EAAE,CAAC;IACxD,MAAMiM,OAAO,GAAG,IAAIhP,WAAW,CAC7BE,SAAS,EACTC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRC,MAAM,EACNqO,UAAU,EACVnO,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,YACF,CAAC;IACD8N,GAAG,CAACO,QAAQ,CAAC,KAAIC,oBAAQ,EAACF,OAAO,EAAEH,YAAY,CAAC,CAAC;IACjD,OAAOG,OAAO;EAChB;AACF;AAACG,OAAA,CAAAnP,WAAA,GAAAA,WAAA;AAAAjB,eAAA,CA1lBYiB,WAAW,WA2hBP,EAAE;AAAAjB,eAAA,CA3hBNiB,WAAW,kBA4hBA,CACpBoP,gBAAS,EACTC,4BAAe,EACfC,oBAAW,EACXC,0BAAc,EACdC,0BAAc,EACdC,wBAAa,EACbC,sBAAY,EACZC,wCAAqB,EACrBC,0BAAc,EACdC,sBAAY,EACZC,sBAAY,EACZC,kCAAkB,EAClBC,kCAAkB,CACnB;AAAAjR,eAAA,CA1iBUiB,WAAW,aA2iBLiQ,kBAAW;AAiD9BlB,wBAAa,CAACmB,UAAU,CAAClQ,WAAW,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_workspace","_componentsList","_interopRequireDefault","_mergeVersion","_snapping","_hasWildcard","_pMapSeries","_componentId","_bitError","_laneId","_chalk","_config","_remove","_utils","_componentWriter","_importer","_logger","_globalConfig","_lodash","_checkout","_deleteComponentFiles","_configMerger","_install","_scope","_mergeCmd","_merging","_mergeStatusProvider","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MergingMain","constructor","workspace","scope","install","snapping","checkout","logger","componentWriter","importer","config","remove","configMerger","merge","ids","mergeStrategy","abort","resolve","noSnap","message","build","skipDependencyInstallation","OutsideWorkspaceError","consumer","mergeResults","resolveMerge","abortMerge","bitIds","getComponentsToMerge","mergeComponentsFromRemote","onDestroy","snapMessage","currentLaneId","getCurrentLaneId","currentLaneObject","getCurrentLaneObject","allComponentsStatus","getAllComponentsStatus","failedComponents","c","unchangedMessage","unchangedLegitimately","failureMsgs","map","failedComponent","chalk","bold","id","toString","red","join","BitError","mergeSnaps","otherLaneId","currentLane","tag","legacyScope","componentWithConflict","find","component","hasConflicts","getMergeStrategyInteractive","componentStatus","shouldBeRemoved","componentIdsToRemove","changeVersion","undefined","succeededComponents","componentsResults","applyVersionMultiple","allConfigMerge","compact","configMergeResult","workspaceDepsUpdates","workspaceDepsConflicts","updateWorkspaceJsoncWithDepsIfNeeded","workspaceConfigConflictWriteError","writeWorkspaceJsoncWithConflictsGracefully","generateConfigMergeConflictFileForAll","objects","add","persist","unmergedComponents","write","writeBitMap","compBitIdsToRemove","ComponentIdList","fromArray","deleteComponentsFiles","cleanFromBitMap","componentsHasConfigMergeConflicts","some","leftUnresolvedConflicts","dedupe","updateExisting","import","err","error","consoleFailure","getSnapOrTagResults","idsToTag","results","tagAllLaneComponent","taggedComponents","autoTaggedResults","removedComponents","snappedComponents","autoSnappedResults","snapResolvedComponents","toLaneId","mergeSnapResults","mergeSnapError","bitMapSnapshot","bitMap","takeSnapshot","restoreFromSnapshot","components","applyVersionResult","workspaceConfigUpdateResult","getMergeStatus","options","otherLane","mergeStatusProvider","MergeStatusProvider","getStatus","mapSeries","currentComponent","resolvedUnrelated","modelComponent","getModelComponent","updatedLaneId","isDefault","LaneId","from","name","applyVersion","remoteHead","getRef","version","compsToWrite","legacyCompToWrite","manyComponentsWriterOpts","writeConfig","reasonForBitmapChange","writeMany","filesStatus","unmergedComponent","fullName","head","laneId","addToCurrentLane","Error","isPartOfLane","isEqualWithoutVersion","addComponent","handleResolveUnrelated","headOnCurrentLane","unrelated","unrelatedHead","unrelatedLaneId","addEntry","markAllFilesAsUnchanged","files","file","pathNormalizeToLinux","relative","FileStatus","unchanged","MergeOptions","ours","strategy","remoteId","idToLoad","theirs","legacyComponent","loadComponentFromModelImportIfNeeded","getConsumerComponent","updateFileStatus","modifiedStatus","modifiedFiles","applyModifiedVersion","removeFilesIfNeeded","successfullyMergedConfig","getSuccessfullyMergedConfig","mergedConfig","manual","unmergedPaths","f","conflict","filePath","setHead","markVersionAsLocal","values","getIdsForUnmerged","reset","removeComponent","abortedComponents","snap","legacyBitIds","resolvedComponents","localLaneObject","Promise","all","bitId","remoteScopeName","remoteLaneId","remoteLanes","laneIdStr","toStringWithoutVersion","shouldSquash","getComponents","debug","ComponentID","fromObject","snapFromScope","componentId","lane","tagMessage","unmodified","idsStr","componentIds","resolveMultipleComponentIds","entry","getEntry","unresolvedComponents","u","componentsList","ComponentsList","mergePending","listMergePendingComponents","hasWildcard","listComponentsByIdsWithWildcard","getParsedId","provider","cli","loggerMain","compWriter","globalConfig","createLogger","MergingAspect","merging","register","MergeCmd","exports","CLIAspect","WorkspaceAspect","ScopeAspect","SnappingAspect","CheckoutAspect","InstallAspect","LoggerAspect","ComponentWriterAspect","ImporterAspect","ConfigAspect","RemoveAspect","GlobalConfigAspect","ConfigMergerAspect","MainRuntime","addRuntime"],"sources":["merging.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport ComponentsList from '@teambit/legacy/dist/consumer/component/components-list';\nimport {\n MergeStrategy,\n FileStatus,\n getMergeStrategyInteractive,\n MergeOptions,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { SnappingAspect, SnappingMain, TagResults } from '@teambit/snapping';\nimport hasWildcard from '@teambit/legacy/dist/utils/string/has-wildcard';\nimport mapSeries from 'p-map-series';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport { AutoTagResult } from '@teambit/legacy/dist/scope/component-ops/auto-tag';\nimport { UnmergedComponent } from '@teambit/legacy/dist/scope/lanes/unmerged-components';\nimport { Lane, ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport chalk from 'chalk';\nimport { ConfigAspect, ConfigMain } from '@teambit/config';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { pathNormalizeToLinux } from '@teambit/legacy/dist/utils';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { GlobalConfigAspect, GlobalConfigMain } from '@teambit/global-config';\nimport { compact } from 'lodash';\nimport { MergeResultsThreeWay } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/three-way-merge';\nimport {\n ApplyVersionWithComps,\n CheckoutAspect,\n CheckoutMain,\n ComponentStatusBase,\n applyModifiedVersion,\n removeFilesIfNeeded,\n updateFileStatus,\n} from '@teambit/checkout';\nimport deleteComponentsFiles from '@teambit/legacy/dist/consumer/component-ops/delete-component-files';\nimport {\n ConfigMergerAspect,\n ConfigMergerMain,\n ConfigMergeResult,\n WorkspaceConfigUpdateResult,\n} from '@teambit/config-merger';\nimport { SnapsDistance } from '@teambit/legacy/dist/scope/component-ops/snaps-distance';\nimport { InstallMain, InstallAspect } from '@teambit/install';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { MergeCmd } from './merge-cmd';\nimport { MergingAspect } from './merging.aspect';\nimport { MergeStatusProvider, MergeStatusProviderOptions } from './merge-status-provider';\n\ntype ResolveUnrelatedData = {\n strategy: MergeStrategy;\n headOnCurrentLane: Ref;\n unrelatedHead: Ref;\n unrelatedLaneId: LaneId;\n};\n\nexport type ComponentMergeStatus = ComponentStatusBase & {\n mergeResults?: MergeResultsThreeWay | null;\n divergeData?: SnapsDistance;\n resolvedUnrelated?: ResolveUnrelatedData;\n configMergeResult?: ConfigMergeResult;\n};\n\nexport type ComponentMergeStatusBeforeMergeAttempt = ComponentStatusBase & {\n divergeData?: SnapsDistance;\n resolvedUnrelated?: ResolveUnrelatedData;\n mergeProps?: {\n otherLaneHead: Ref;\n currentId: ComponentID;\n modelComponent: ModelComponent;\n };\n};\n\nexport type FailedComponents = { id: ComponentID; unchangedMessage: string; unchangedLegitimately?: boolean };\n\n// fileName is PathLinux. TS doesn't let anything else in the keys other than string and number\nexport type FilesStatus = { [fileName: string]: keyof typeof FileStatus };\n\nexport type MergeSnapResults = {\n snappedComponents: ConsumerComponent[];\n autoSnappedResults: AutoTagResult[];\n removedComponents?: ComponentIdList;\n exportedIds?: ComponentID[];\n} | null;\n\nexport type ApplyVersionResult = { id: ComponentID; filesStatus: FilesStatus };\n\nexport type ApplyVersionResults = {\n components?: ApplyVersionResult[];\n version?: string;\n failedComponents?: FailedComponents[];\n removedComponents?: ComponentID[];\n addedComponents?: ComponentID[]; // relevant when restoreMissingComponents is true (e.g. bit lane merge-abort)\n resolvedComponents?: ConsumerComponent[]; // relevant for bit merge --resolve\n abortedComponents?: ApplyVersionResult[]; // relevant for bit merge --abort\n mergeSnapResults?: MergeSnapResults;\n mergeSnapError?: Error;\n leftUnresolvedConflicts?: boolean;\n verbose?: boolean;\n newFromLane?: string[];\n newFromLaneAdded?: boolean;\n installationError?: Error; // in case the package manager failed, it won't throw, instead, it'll return error here\n compilationError?: Error; // in case the compiler failed, it won't throw, instead, it'll return error here\n workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult;\n};\n\nexport class MergingMain {\n constructor(\n private workspace: Workspace,\n private scope: ScopeMain,\n private install: InstallMain,\n private snapping: SnappingMain,\n private checkout: CheckoutMain,\n private logger: Logger,\n private componentWriter: ComponentWriterMain,\n private importer: ImporterMain,\n private config: ConfigMain,\n private remove: RemoveMain,\n private configMerger: ConfigMergerMain\n ) {}\n\n async merge(\n ids: string[],\n mergeStrategy: MergeStrategy,\n abort: boolean,\n resolve: boolean,\n noSnap: boolean,\n message: string,\n build: boolean,\n skipDependencyInstallation: boolean\n ): Promise<ApplyVersionResults> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer: Consumer = this.workspace.consumer;\n let mergeResults;\n if (resolve) {\n mergeResults = await this.resolveMerge(ids, message, build);\n } else if (abort) {\n mergeResults = await this.abortMerge(ids);\n } else {\n const bitIds = await this.getComponentsToMerge(consumer, ids);\n mergeResults = await this.mergeComponentsFromRemote(\n consumer,\n bitIds,\n mergeStrategy,\n noSnap,\n message,\n build,\n skipDependencyInstallation\n );\n }\n await consumer.onDestroy('merge');\n return mergeResults;\n }\n\n /**\n * when user is on main, it merges the remote main components into local.\n * when user is on a lane, it merges the remote lane components into the local lane.\n */\n async mergeComponentsFromRemote(\n consumer: Consumer,\n bitIds: ComponentID[],\n mergeStrategy: MergeStrategy,\n noSnap: boolean,\n snapMessage: string,\n build: boolean,\n skipDependencyInstallation: boolean\n ): Promise<ApplyVersionResults> {\n const currentLaneId = consumer.getCurrentLaneId();\n const currentLaneObject = await consumer.getCurrentLaneObject();\n const allComponentsStatus = await this.getAllComponentsStatus(\n bitIds,\n currentLaneId,\n currentLaneObject,\n mergeStrategy\n );\n const failedComponents = allComponentsStatus.filter((c) => c.unchangedMessage && !c.unchangedLegitimately);\n if (failedComponents.length) {\n const failureMsgs = failedComponents\n .map(\n (failedComponent) =>\n `${chalk.bold(failedComponent.id.toString())} - ${chalk.red(failedComponent.unchangedMessage as string)}`\n )\n .join('\\n');\n throw new BitError(`unable to merge due to the following failures:\\n${failureMsgs}`);\n }\n\n return this.mergeSnaps({\n mergeStrategy,\n allComponentsStatus,\n otherLaneId: currentLaneId,\n currentLane: currentLaneObject,\n noSnap,\n snapMessage,\n build,\n skipDependencyInstallation,\n });\n }\n\n /**\n * merge multiple components according to the \"allComponentsStatus\".\n */\n async mergeSnaps({\n mergeStrategy,\n allComponentsStatus,\n otherLaneId,\n currentLane,\n noSnap,\n tag,\n snapMessage,\n build,\n skipDependencyInstallation,\n }: {\n mergeStrategy: MergeStrategy;\n allComponentsStatus: ComponentMergeStatus[];\n otherLaneId: LaneId;\n currentLane?: Lane;\n noSnap: boolean;\n tag?: boolean;\n snapMessage: string;\n build: boolean;\n skipDependencyInstallation?: boolean;\n }): Promise<ApplyVersionResults> {\n const consumer = this.workspace?.consumer;\n const legacyScope = this.scope.legacyScope;\n const componentWithConflict = allComponentsStatus.find(\n (component) => component.mergeResults && component.mergeResults.hasConflicts\n );\n if (componentWithConflict && !mergeStrategy) {\n mergeStrategy = await getMergeStrategyInteractive();\n }\n const failedComponents: FailedComponents[] = allComponentsStatus\n .filter((componentStatus) => componentStatus.unchangedMessage)\n .filter((componentStatus) => !componentStatus.shouldBeRemoved)\n .map((componentStatus) => ({\n id: componentStatus.id,\n unchangedMessage: componentStatus.unchangedMessage as string,\n unchangedLegitimately: componentStatus.unchangedLegitimately,\n }));\n\n const componentIdsToRemove = allComponentsStatus\n .filter((componentStatus) => componentStatus.shouldBeRemoved)\n .map((c) => c.id.changeVersion(undefined));\n\n const succeededComponents = allComponentsStatus.filter((componentStatus) => !componentStatus.unchangedMessage);\n\n const componentsResults = await this.applyVersionMultiple(\n succeededComponents,\n otherLaneId,\n mergeStrategy,\n currentLane\n );\n\n const allConfigMerge = compact(succeededComponents.map((c) => c.configMergeResult));\n\n const { workspaceDepsUpdates, workspaceDepsConflicts } = this.workspace\n ? await this.configMerger.updateWorkspaceJsoncWithDepsIfNeeded(allConfigMerge)\n : { workspaceDepsUpdates: undefined, workspaceDepsConflicts: undefined };\n\n let workspaceConfigConflictWriteError: Error | undefined;\n if (workspaceDepsConflicts) {\n workspaceConfigConflictWriteError = await this.configMerger.writeWorkspaceJsoncWithConflictsGracefully(\n workspaceDepsConflicts\n );\n }\n if (this.workspace) await this.configMerger.generateConfigMergeConflictFileForAll(allConfigMerge);\n\n if (currentLane) legacyScope.objects.add(currentLane);\n\n await legacyScope.objects.persist(); // persist anyway, if currentLane is null it should save all main heads\n\n await legacyScope.objects.unmergedComponents.write();\n\n if (this.workspace) await consumer.writeBitMap(`merge ${otherLaneId.toString()}`);\n\n if (componentIdsToRemove.length && this.workspace) {\n const compBitIdsToRemove = ComponentIdList.fromArray(componentIdsToRemove);\n await deleteComponentsFiles(consumer, compBitIdsToRemove);\n await consumer.cleanFromBitMap(compBitIdsToRemove);\n }\n\n const componentsHasConfigMergeConflicts = allComponentsStatus.some((c) => c.configMergeResult?.hasConflicts());\n const leftUnresolvedConflicts = componentWithConflict && mergeStrategy === 'manual';\n if (!skipDependencyInstallation && !leftUnresolvedConflicts && !componentsHasConfigMergeConflicts) {\n try {\n await this.install.install(undefined, {\n dedupe: true,\n updateExisting: false,\n import: false,\n });\n } catch (err: any) {\n this.logger.error(`failed installing packages`, err);\n this.logger.consoleFailure(\n `failed installing packages, see the log for full stacktrace. error: ${err.message}`\n );\n }\n }\n\n const getSnapOrTagResults = async (): Promise<MergeSnapResults> => {\n // if one of the component has conflict, don't snap-merge. otherwise, some of the components would be snap-merged\n // and some not. besides the fact that it could by mistake tag dependent, it's a confusing state. better not snap.\n if (noSnap || leftUnresolvedConflicts || componentsHasConfigMergeConflicts) {\n return null;\n }\n if (tag) {\n const idsToTag = allComponentsStatus.map((c) => c.id);\n const results = await this.tagAllLaneComponent(idsToTag, snapMessage, build);\n if (!results) return null;\n const { taggedComponents, autoTaggedResults, removedComponents } = results;\n return { snappedComponents: taggedComponents, autoSnappedResults: autoTaggedResults, removedComponents };\n }\n return this.snapResolvedComponents(snapMessage, build, currentLane?.toLaneId());\n };\n let mergeSnapResults: MergeSnapResults = null;\n let mergeSnapError: Error | undefined;\n const bitMapSnapshot = this.workspace ? this.workspace.bitMap.takeSnapshot() : null;\n try {\n mergeSnapResults = await getSnapOrTagResults();\n } catch (err: any) {\n this.logger.error('failed running snap. mergeSnapError:', err);\n mergeSnapError = err;\n if (bitMapSnapshot) this.workspace.bitMap.restoreFromSnapshot(bitMapSnapshot);\n }\n\n return {\n components: componentsResults.map((c) => c.applyVersionResult),\n failedComponents,\n removedComponents: [...componentIdsToRemove, ...(mergeSnapResults?.removedComponents || [])],\n mergeSnapResults,\n mergeSnapError,\n workspaceConfigUpdateResult: {\n workspaceDepsUpdates,\n workspaceDepsConflicts,\n workspaceConfigConflictWriteError,\n },\n leftUnresolvedConflicts,\n };\n }\n\n /**\n * this function gets called from two different commands:\n * 1. \"bit merge <ids...>\", when merging a component from a remote to the local.\n * in this case, the remote and local are on the same lane or both on main.\n * 2. \"bit lane merge\", when merging from one lane to another.\n */\n async getMergeStatus(\n bitIds: ComponentID[], // the id.version is the version we want to merge to the current component\n options: MergeStatusProviderOptions,\n currentLane?: Lane, // currently checked out lane. if on main, then it's null.\n otherLane?: Lane // the lane we want to merged to our lane. (null if it's \"main\").\n ): Promise<ComponentMergeStatus[]> {\n const mergeStatusProvider = new MergeStatusProvider(\n this.scope,\n this.logger,\n this.importer,\n options,\n this.workspace,\n currentLane,\n otherLane\n );\n return mergeStatusProvider.getStatus(bitIds);\n }\n\n private async applyVersionMultiple(\n succeededComponents: ComponentMergeStatus[],\n otherLaneId: LaneId,\n mergeStrategy: MergeStrategy,\n currentLane?: Lane\n ): Promise<ApplyVersionWithComps[]> {\n const componentsResults = await mapSeries(\n succeededComponents,\n async ({ currentComponent, id, mergeResults, resolvedUnrelated, configMergeResult }) => {\n const modelComponent = await this.scope.legacyScope.getModelComponent(id);\n const updatedLaneId = otherLaneId.isDefault() ? LaneId.from(otherLaneId.name, id.scope as string) : otherLaneId;\n return this.applyVersion({\n currentComponent,\n id,\n mergeResults,\n mergeStrategy,\n remoteHead: modelComponent.getRef(id.version as string) as Ref,\n otherLaneId: updatedLaneId,\n currentLane,\n resolvedUnrelated,\n configMergeResult,\n });\n }\n );\n\n if (this.workspace) {\n const compsToWrite = compact(componentsResults.map((c) => c.legacyCompToWrite));\n const manyComponentsWriterOpts = {\n consumer: this.workspace.consumer,\n components: compsToWrite,\n skipDependencyInstallation: true,\n writeConfig: false, // @todo: should write if config exists before, needs to figure out how to do it.\n reasonForBitmapChange: 'merge',\n };\n await this.componentWriter.writeMany(manyComponentsWriterOpts);\n }\n\n return componentsResults;\n }\n\n private async applyVersion({\n currentComponent,\n id,\n mergeResults,\n mergeStrategy,\n remoteHead,\n otherLaneId,\n currentLane,\n resolvedUnrelated,\n configMergeResult,\n }: {\n currentComponent: ConsumerComponent | null | undefined;\n id: ComponentID;\n mergeResults: MergeResultsThreeWay | null | undefined;\n mergeStrategy: MergeStrategy;\n remoteHead: Ref;\n otherLaneId: LaneId;\n currentLane?: Lane;\n resolvedUnrelated?: ResolveUnrelatedData;\n configMergeResult?: ConfigMergeResult;\n }): Promise<ApplyVersionWithComps> {\n const legacyScope = this.scope.legacyScope;\n let filesStatus = {};\n const unmergedComponent: UnmergedComponent = {\n id: { name: id.fullName, scope: id.scope },\n head: remoteHead,\n laneId: otherLaneId,\n };\n id = currentComponent ? currentComponent.id : id;\n const modelComponent = await legacyScope.getModelComponent(id);\n\n const addToCurrentLane = (head: Ref) => {\n if (!currentLane) throw new Error('currentLane must be defined when adding to the lane');\n if (otherLaneId.isDefault()) {\n const isPartOfLane = currentLane.components.find((c) => c.id.isEqualWithoutVersion(id));\n if (!isPartOfLane) return;\n }\n currentLane.addComponent({ id, head });\n };\n\n const handleResolveUnrelated = (legacyCompToWrite?: ConsumerComponent) => {\n if (!currentComponent) throw new Error('currentComponent must be defined when resolvedUnrelated');\n // because when on a main, we don't allow merging lanes with unrelated. we asks users to switch to the lane\n // first and then merge with --resolve-unrelated\n if (!currentLane) throw new Error('currentLane must be defined when resolvedUnrelated');\n if (!resolvedUnrelated) throw new Error('resolvedUnrelated must be populated');\n addToCurrentLane(resolvedUnrelated.headOnCurrentLane);\n unmergedComponent.unrelated = {\n unrelatedHead: resolvedUnrelated.unrelatedHead,\n headOnCurrentLane: resolvedUnrelated.headOnCurrentLane,\n unrelatedLaneId: resolvedUnrelated.unrelatedLaneId,\n };\n legacyScope.objects.unmergedComponents.addEntry(unmergedComponent);\n return { applyVersionResult: { id, filesStatus }, component: currentComponent, legacyCompToWrite };\n };\n\n const markAllFilesAsUnchanged = () => {\n if (!currentComponent) throw new Error(`applyVersion expect to get currentComponent for ${id.toString()}`);\n currentComponent.files.forEach((file) => {\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.unchanged;\n });\n };\n if (mergeResults && mergeResults.hasConflicts && mergeStrategy === MergeOptions.ours) {\n markAllFilesAsUnchanged();\n legacyScope.objects.unmergedComponents.addEntry(unmergedComponent);\n return { applyVersionResult: { id, filesStatus }, component: currentComponent || undefined };\n }\n if (resolvedUnrelated?.strategy === 'ours') {\n markAllFilesAsUnchanged();\n return handleResolveUnrelated();\n }\n const remoteId = id.changeVersion(remoteHead.toString());\n const idToLoad = !mergeResults || mergeStrategy === MergeOptions.theirs ? remoteId : id;\n const legacyComponent = this.workspace\n ? await this.workspace.consumer.loadComponentFromModelImportIfNeeded(idToLoad)\n : await legacyScope.getConsumerComponent(idToLoad); // when loading from the scope, we import all needed components first, so it should be fine. otherwise, change the code to import it here\n if (mergeResults && mergeStrategy === MergeOptions.theirs) {\n // in this case, we don't want to update .bitmap with the version of the remote. we want to keep the same version\n legacyComponent.version = id.version;\n }\n const files = legacyComponent.files;\n updateFileStatus(files, filesStatus, currentComponent || undefined);\n\n if (mergeResults) {\n // update files according to the merge results\n const { filesStatus: modifiedStatus, modifiedFiles } = applyModifiedVersion(files, mergeResults, mergeStrategy);\n legacyComponent.files = modifiedFiles;\n filesStatus = { ...filesStatus, ...modifiedStatus };\n }\n\n if (this.workspace) await removeFilesIfNeeded(filesStatus, this.workspace.consumer, currentComponent || undefined);\n\n if (configMergeResult) {\n const successfullyMergedConfig = configMergeResult.getSuccessfullyMergedConfig();\n if (successfullyMergedConfig) {\n unmergedComponent.mergedConfig = successfullyMergedConfig;\n // no need to `unmergedComponents.addEntry` here. it'll be added in the next lines inside `if (mergeResults)`.\n // because if `configMergeResult` is set, `mergeResults` must be set as well. both happen on diverge.\n }\n }\n\n // if mergeResults, the head snap is going to be updated on a later phase when snapping with two parents\n // otherwise, update the head of the current lane or main\n if (mergeResults) {\n if (mergeResults.hasConflicts && mergeStrategy === MergeOptions.manual) {\n unmergedComponent.unmergedPaths = mergeResults.modifiedFiles.filter((f) => f.conflict).map((f) => f.filePath);\n }\n legacyScope.objects.unmergedComponents.addEntry(unmergedComponent);\n } else if (currentLane) {\n if (resolvedUnrelated) {\n // must be \"theirs\"\n return handleResolveUnrelated(legacyComponent);\n }\n addToCurrentLane(remoteHead);\n } else {\n // this is main\n modelComponent.setHead(remoteHead);\n // mark it as local, otherwise, when importing this component from a remote, it'll override it.\n modelComponent.markVersionAsLocal(remoteHead.toString());\n legacyScope.objects.add(modelComponent);\n }\n\n return {\n applyVersionResult: { id: idToLoad, filesStatus },\n component: currentComponent || undefined,\n legacyCompToWrite: legacyComponent,\n };\n }\n\n private async abortMerge(values: string[]): Promise<ApplyVersionResults> {\n const consumer = this.workspace.consumer;\n const ids = await this.getIdsForUnmerged(values);\n const results = await this.checkout.checkout({ ids, reset: true });\n ids.forEach((id) => consumer.scope.objects.unmergedComponents.removeComponent(id));\n await consumer.scope.objects.unmergedComponents.write();\n return { abortedComponents: results.components };\n }\n\n private async resolveMerge(values: string[], snapMessage: string, build: boolean): Promise<ApplyVersionResults> {\n const ids = await this.getIdsForUnmerged(values);\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const { snappedComponents } = await this.snapping.snap({\n legacyBitIds: ComponentIdList.fromArray(ids.map((id) => id)),\n build,\n message: snapMessage,\n });\n return { resolvedComponents: snappedComponents };\n }\n\n private async getAllComponentsStatus(\n bitIds: ComponentID[],\n laneId: LaneId,\n localLaneObject: Lane | undefined,\n mergeStrategy: MergeStrategy\n ): Promise<ComponentMergeStatus[]> {\n const ids = await Promise.all(\n bitIds.map(async (bitId) => {\n const remoteScopeName = laneId.isDefault() ? bitId.scope : laneId.scope;\n const remoteLaneId = LaneId.from(laneId.name, remoteScopeName as string);\n const remoteHead = await this.workspace.consumer.scope.objects.remoteLanes.getRef(remoteLaneId, bitId);\n const laneIdStr = remoteLaneId.toString();\n if (!remoteHead) {\n throw new BitError(`unable to find a remote head of \"${bitId.toStringWithoutVersion()}\" in \"${laneIdStr}\"`);\n }\n return bitId.changeVersion(remoteHead.toString());\n })\n );\n\n return this.getMergeStatus(ids, { shouldSquash: false, mergeStrategy }, localLaneObject, localLaneObject);\n }\n\n private async snapResolvedComponents(\n snapMessage: string,\n build: boolean,\n laneId?: LaneId\n ): Promise<MergeSnapResults> {\n const unmergedComponents = this.scope.legacyScope.objects.unmergedComponents.getComponents();\n this.logger.debug(`merge-snaps, snapResolvedComponents, total ${unmergedComponents.length.toString()} components`);\n if (!unmergedComponents.length) return null;\n const ids = ComponentIdList.fromArray(unmergedComponents.map((r) => ComponentID.fromObject(r.id)));\n if (!this.workspace) {\n const results = await this.snapping.snapFromScope(\n ids.map((id) => ({ componentId: id.toString() })),\n {\n message: snapMessage,\n build,\n lane: laneId?.toString(),\n }\n );\n return { ...results, autoSnappedResults: [] };\n }\n return this.snapping.snap({\n legacyBitIds: ids,\n build,\n message: snapMessage,\n });\n }\n\n private async tagAllLaneComponent(\n idsToTag: ComponentID[],\n tagMessage: string,\n build: boolean\n ): Promise<TagResults | null> {\n const ids = idsToTag.map((id) => {\n return id.toStringWithoutVersion();\n });\n this.logger.debug(`merge-snaps, tagResolvedComponents, total ${idsToTag.length.toString()} components`);\n return this.snapping.tag({\n ids,\n build,\n message: tagMessage,\n unmodified: true,\n });\n }\n\n private async getIdsForUnmerged(idsStr?: string[]): Promise<ComponentID[]> {\n if (idsStr && idsStr.length) {\n const componentIds = await this.workspace.resolveMultipleComponentIds(idsStr);\n componentIds.forEach((id) => {\n const entry = this.workspace.consumer.scope.objects.unmergedComponents.getEntry(id);\n if (!entry) {\n throw new BitError(`unable to merge-resolve ${id.toString()}, it is not marked as unresolved`);\n }\n });\n return componentIds;\n }\n const unresolvedComponents = this.workspace.consumer.scope.objects.unmergedComponents.getComponents();\n if (!unresolvedComponents.length) throw new BitError(`all components are resolved already, nothing to do`);\n return unresolvedComponents.map((u) => ComponentID.fromObject(u.id));\n }\n\n private async getComponentsToMerge(consumer: Consumer, ids: string[]): Promise<ComponentID[]> {\n const componentsList = new ComponentsList(consumer);\n if (!ids.length) {\n const mergePending = await componentsList.listMergePendingComponents();\n return mergePending.map((c) => c.id);\n }\n if (hasWildcard(ids)) {\n return componentsList.listComponentsByIdsWithWildcard(ids);\n }\n return ids.map((id) => consumer.getParsedId(id));\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n ScopeAspect,\n SnappingAspect,\n CheckoutAspect,\n InstallAspect,\n LoggerAspect,\n ComponentWriterAspect,\n ImporterAspect,\n ConfigAspect,\n RemoveAspect,\n GlobalConfigAspect,\n ConfigMergerAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n workspace,\n scope,\n snapping,\n checkout,\n install,\n loggerMain,\n compWriter,\n importer,\n config,\n remove,\n globalConfig,\n configMerger,\n ]: [\n CLIMain,\n Workspace,\n ScopeMain,\n SnappingMain,\n CheckoutMain,\n InstallMain,\n LoggerMain,\n ComponentWriterMain,\n ImporterMain,\n ConfigMain,\n RemoveMain,\n GlobalConfigMain,\n ConfigMergerMain\n ]) {\n const logger = loggerMain.createLogger(MergingAspect.id);\n const merging = new MergingMain(\n workspace,\n scope,\n install,\n snapping,\n checkout,\n logger,\n compWriter,\n importer,\n config,\n remove,\n configMerger\n );\n cli.register(new MergeCmd(merging, globalConfig));\n return merging;\n }\n}\n\nMergingAspect.addRuntime(MergingMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,gBAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAM,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,YAAA;EAAA,MAAAR,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAO,WAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;A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ACG,YAAY,CAACC,wBAAa,CAAChM,EAAE,CAAC;IACxD,MAAMiM,OAAO,GAAG,IAAIhP,WAAW,CAC7BE,SAAS,EACTC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,QAAQ,EACRC,MAAM,EACNqO,UAAU,EACVnO,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,YACF,CAAC;IACD8N,GAAG,CAACO,QAAQ,CAAC,KAAIC,oBAAQ,EAACF,OAAO,EAAEH,YAAY,CAAC,CAAC;IACjD,OAAOG,OAAO;EAChB;AACF;AAACG,OAAA,CAAAnP,WAAA,GAAAA,WAAA;AAAAjB,eAAA,CA1lBYiB,WAAW,WA2hBP,EAAE;AAAAjB,eAAA,CA3hBNiB,WAAW,kBA4hBA,CACpBoP,gBAAS,EACTC,4BAAe,EACfC,oBAAW,EACXC,0BAAc,EACdC,0BAAc,EACdC,wBAAa,EACbC,sBAAY,EACZC,wCAAqB,EACrBC,0BAAc,EACdC,sBAAY,EACZC,sBAAY,EACZC,kCAAkB,EAClBC,kCAAkB,CACnB;AAAAjR,eAAA,CA1iBUiB,WAAW,aA2iBLiQ,kBAAW;AAiD9BlB,wBAAa,CAACmB,UAAU,CAAClQ,WAAW,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/merging",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.246",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/merging",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "merging",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.246"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"@teambit/lane-id": "0.0.311",
|
|
18
18
|
"@teambit/harmony": "0.4.6",
|
|
19
19
|
"@teambit/cli": "0.0.862",
|
|
20
|
-
"@teambit/config-merger": "0.0.
|
|
20
|
+
"@teambit/config-merger": "0.0.113",
|
|
21
21
|
"@teambit/global-config": "0.0.865",
|
|
22
|
-
"@teambit/importer": "1.0.
|
|
22
|
+
"@teambit/importer": "1.0.246",
|
|
23
23
|
"@teambit/logger": "0.0.955",
|
|
24
|
-
"@teambit/scope": "1.0.
|
|
25
|
-
"@teambit/workspace": "1.0.
|
|
26
|
-
"@teambit/checkout": "1.0.
|
|
27
|
-
"@teambit/component-writer": "1.0.
|
|
28
|
-
"@teambit/config": "0.0.
|
|
29
|
-
"@teambit/install": "1.0.
|
|
30
|
-
"@teambit/remove": "1.0.
|
|
31
|
-
"@teambit/snapping": "1.0.
|
|
24
|
+
"@teambit/scope": "1.0.246",
|
|
25
|
+
"@teambit/workspace": "1.0.246",
|
|
26
|
+
"@teambit/checkout": "1.0.246",
|
|
27
|
+
"@teambit/component-writer": "1.0.246",
|
|
28
|
+
"@teambit/config": "0.0.997",
|
|
29
|
+
"@teambit/install": "1.0.246",
|
|
30
|
+
"@teambit/remove": "1.0.246",
|
|
31
|
+
"@teambit/snapping": "1.0.246"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/lodash": "4.14.165",
|
|
File without changes
|