@teambit/config-merger 0.0.94 → 0.0.96
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 +158 -44
- package/dist/component-config-merger.d.ts +65 -0
- package/dist/config-merge-result.d.ts +21 -0
- package/dist/config-merger.aspect.d.ts +2 -0
- package/dist/config-merger.main.runtime.d.ts +52 -0
- package/dist/index.d.ts +6 -0
- package/package.json +10 -10
- package/tsconfig.json +1 -22
- /package/dist/{preview-1712719054377.js → preview-1712822929999.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.workspace/config-merger@0.0.
|
|
3
|
+
<testsuite name="teambit.workspace/config-merger@0.0.96" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
|
@@ -48,7 +48,11 @@
|
|
|
48
48
|
"line": 39,
|
|
49
49
|
"character": 24
|
|
50
50
|
},
|
|
51
|
-
"name": "Workspace"
|
|
51
|
+
"name": "Workspace",
|
|
52
|
+
"componentId": {
|
|
53
|
+
"scope": "teambit.workspace",
|
|
54
|
+
"name": "workspace"
|
|
55
|
+
}
|
|
52
56
|
},
|
|
53
57
|
"isOptional": false,
|
|
54
58
|
"isSpread": false
|
|
@@ -68,7 +72,11 @@
|
|
|
68
72
|
"line": 40,
|
|
69
73
|
"character": 21
|
|
70
74
|
},
|
|
71
|
-
"name": "Logger"
|
|
75
|
+
"name": "Logger",
|
|
76
|
+
"componentId": {
|
|
77
|
+
"scope": "teambit.harmony",
|
|
78
|
+
"name": "logger"
|
|
79
|
+
}
|
|
72
80
|
},
|
|
73
81
|
"isOptional": false,
|
|
74
82
|
"isSpread": false
|
|
@@ -88,7 +96,11 @@
|
|
|
88
96
|
"line": 41,
|
|
89
97
|
"character": 21
|
|
90
98
|
},
|
|
91
|
-
"name": "ConfigMain"
|
|
99
|
+
"name": "ConfigMain",
|
|
100
|
+
"componentId": {
|
|
101
|
+
"scope": "teambit.harmony",
|
|
102
|
+
"name": "config"
|
|
103
|
+
}
|
|
92
104
|
},
|
|
93
105
|
"isOptional": false,
|
|
94
106
|
"isSpread": false
|
|
@@ -108,7 +120,11 @@
|
|
|
108
120
|
"line": 42,
|
|
109
121
|
"character": 27
|
|
110
122
|
},
|
|
111
|
-
"name": "DependencyResolverMain"
|
|
123
|
+
"name": "DependencyResolverMain",
|
|
124
|
+
"componentId": {
|
|
125
|
+
"scope": "teambit.dependencies",
|
|
126
|
+
"name": "dependency-resolver"
|
|
127
|
+
}
|
|
112
128
|
},
|
|
113
129
|
"isOptional": false,
|
|
114
130
|
"isSpread": false
|
|
@@ -387,7 +403,8 @@
|
|
|
387
403
|
"line": 276,
|
|
388
404
|
"character": 49
|
|
389
405
|
},
|
|
390
|
-
"name": "ConsumerComponent"
|
|
406
|
+
"name": "ConsumerComponent",
|
|
407
|
+
"packageName": "@teambit/legacy/dist/consumer/component"
|
|
391
408
|
}
|
|
392
409
|
},
|
|
393
410
|
"isOptional": false,
|
|
@@ -533,7 +550,11 @@
|
|
|
533
550
|
"line": 494,
|
|
534
551
|
"character": 5
|
|
535
552
|
},
|
|
536
|
-
"name": "Workspace"
|
|
553
|
+
"name": "Workspace",
|
|
554
|
+
"componentId": {
|
|
555
|
+
"scope": "teambit.workspace",
|
|
556
|
+
"name": "workspace"
|
|
557
|
+
}
|
|
537
558
|
},
|
|
538
559
|
{
|
|
539
560
|
"__schema": "TypeRefSchema",
|
|
@@ -542,7 +563,11 @@
|
|
|
542
563
|
"line": 495,
|
|
543
564
|
"character": 5
|
|
544
565
|
},
|
|
545
|
-
"name": "ConfigMain"
|
|
566
|
+
"name": "ConfigMain",
|
|
567
|
+
"componentId": {
|
|
568
|
+
"scope": "teambit.harmony",
|
|
569
|
+
"name": "config"
|
|
570
|
+
}
|
|
546
571
|
},
|
|
547
572
|
{
|
|
548
573
|
"__schema": "TypeRefSchema",
|
|
@@ -551,7 +576,11 @@
|
|
|
551
576
|
"line": 496,
|
|
552
577
|
"character": 5
|
|
553
578
|
},
|
|
554
|
-
"name": "LoggerMain"
|
|
579
|
+
"name": "LoggerMain",
|
|
580
|
+
"componentId": {
|
|
581
|
+
"scope": "teambit.harmony",
|
|
582
|
+
"name": "logger"
|
|
583
|
+
}
|
|
555
584
|
},
|
|
556
585
|
{
|
|
557
586
|
"__schema": "TypeRefSchema",
|
|
@@ -560,7 +589,11 @@
|
|
|
560
589
|
"line": 497,
|
|
561
590
|
"character": 5
|
|
562
591
|
},
|
|
563
|
-
"name": "DependencyResolverMain"
|
|
592
|
+
"name": "DependencyResolverMain",
|
|
593
|
+
"componentId": {
|
|
594
|
+
"scope": "teambit.dependencies",
|
|
595
|
+
"name": "dependency-resolver"
|
|
596
|
+
}
|
|
564
597
|
}
|
|
565
598
|
]
|
|
566
599
|
},
|
|
@@ -687,7 +720,11 @@
|
|
|
687
720
|
"line": 29,
|
|
688
721
|
"character": 45
|
|
689
722
|
},
|
|
690
|
-
"name": "WorkspacePolicyConfigKeysNames"
|
|
723
|
+
"name": "WorkspacePolicyConfigKeysNames",
|
|
724
|
+
"componentId": {
|
|
725
|
+
"scope": "teambit.dependencies",
|
|
726
|
+
"name": "dependency-resolver"
|
|
727
|
+
}
|
|
691
728
|
},
|
|
692
729
|
{
|
|
693
730
|
"__schema": "TypeRefSchema",
|
|
@@ -963,7 +1000,8 @@
|
|
|
963
1000
|
"line": 13,
|
|
964
1001
|
"character": 22
|
|
965
1002
|
},
|
|
966
|
-
"name": "MergeStrategyResult"
|
|
1003
|
+
"name": "MergeStrategyResult",
|
|
1004
|
+
"internalFilePath": "component-config-merger.ts"
|
|
967
1005
|
}
|
|
968
1006
|
},
|
|
969
1007
|
"isOptional": false,
|
|
@@ -1108,7 +1146,8 @@
|
|
|
1108
1146
|
"line": 36,
|
|
1109
1147
|
"character": 28
|
|
1110
1148
|
},
|
|
1111
|
-
"name": "MergeStrategyResult"
|
|
1149
|
+
"name": "MergeStrategyResult",
|
|
1150
|
+
"internalFilePath": "component-config-merger.ts"
|
|
1112
1151
|
},
|
|
1113
1152
|
{
|
|
1114
1153
|
"__schema": "KeywordTypeSchema",
|
|
@@ -1199,7 +1238,12 @@
|
|
|
1199
1238
|
"line": 76,
|
|
1200
1239
|
"character": 27
|
|
1201
1240
|
},
|
|
1202
|
-
"name": "ComponentID"
|
|
1241
|
+
"name": "ComponentID",
|
|
1242
|
+
"componentId": {
|
|
1243
|
+
"scope": "teambit.component",
|
|
1244
|
+
"name": "component-id",
|
|
1245
|
+
"version": "1.2.0"
|
|
1246
|
+
}
|
|
1203
1247
|
}
|
|
1204
1248
|
},
|
|
1205
1249
|
"isOptional": false,
|
|
@@ -1228,7 +1272,8 @@
|
|
|
1228
1272
|
"line": 77,
|
|
1229
1273
|
"character": 16
|
|
1230
1274
|
},
|
|
1231
|
-
"name": "Lane"
|
|
1275
|
+
"name": "Lane",
|
|
1276
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
1232
1277
|
},
|
|
1233
1278
|
{
|
|
1234
1279
|
"__schema": "KeywordTypeSchema",
|
|
@@ -1259,7 +1304,8 @@
|
|
|
1259
1304
|
"line": 78,
|
|
1260
1305
|
"character": 29
|
|
1261
1306
|
},
|
|
1262
|
-
"name": "ExtensionDataList"
|
|
1307
|
+
"name": "ExtensionDataList",
|
|
1308
|
+
"packageName": "@teambit/legacy/dist/consumer/config/extension-data"
|
|
1263
1309
|
},
|
|
1264
1310
|
"isOptional": false,
|
|
1265
1311
|
"isSpread": false
|
|
@@ -1279,7 +1325,8 @@
|
|
|
1279
1325
|
"line": 79,
|
|
1280
1326
|
"character": 26
|
|
1281
1327
|
},
|
|
1282
|
-
"name": "ExtensionDataList"
|
|
1328
|
+
"name": "ExtensionDataList",
|
|
1329
|
+
"packageName": "@teambit/legacy/dist/consumer/config/extension-data"
|
|
1283
1330
|
},
|
|
1284
1331
|
"isOptional": false,
|
|
1285
1332
|
"isSpread": false
|
|
@@ -1299,7 +1346,8 @@
|
|
|
1299
1346
|
"line": 80,
|
|
1300
1347
|
"character": 27
|
|
1301
1348
|
},
|
|
1302
|
-
"name": "ExtensionDataList"
|
|
1349
|
+
"name": "ExtensionDataList",
|
|
1350
|
+
"packageName": "@teambit/legacy/dist/consumer/config/extension-data"
|
|
1303
1351
|
},
|
|
1304
1352
|
"isOptional": false,
|
|
1305
1353
|
"isSpread": false
|
|
@@ -1359,7 +1407,11 @@
|
|
|
1359
1407
|
"line": 83,
|
|
1360
1408
|
"character": 21
|
|
1361
1409
|
},
|
|
1362
|
-
"name": "Logger"
|
|
1410
|
+
"name": "Logger",
|
|
1411
|
+
"componentId": {
|
|
1412
|
+
"scope": "teambit.harmony",
|
|
1413
|
+
"name": "logger"
|
|
1414
|
+
}
|
|
1363
1415
|
},
|
|
1364
1416
|
"isOptional": false,
|
|
1365
1417
|
"isSpread": false
|
|
@@ -1379,7 +1431,8 @@
|
|
|
1379
1431
|
"line": 84,
|
|
1380
1432
|
"character": 28
|
|
1381
1433
|
},
|
|
1382
|
-
"name": "MergeStrategy"
|
|
1434
|
+
"name": "MergeStrategy",
|
|
1435
|
+
"packageName": "@teambit/legacy/dist/consumer/versions-ops/merge-version"
|
|
1383
1436
|
},
|
|
1384
1437
|
"isOptional": false,
|
|
1385
1438
|
"isSpread": false
|
|
@@ -1570,7 +1623,11 @@
|
|
|
1570
1623
|
"line": 29,
|
|
1571
1624
|
"character": 45
|
|
1572
1625
|
},
|
|
1573
|
-
"name": "WorkspacePolicyConfigKeysNames"
|
|
1626
|
+
"name": "WorkspacePolicyConfigKeysNames",
|
|
1627
|
+
"componentId": {
|
|
1628
|
+
"scope": "teambit.dependencies",
|
|
1629
|
+
"name": "dependency-resolver"
|
|
1630
|
+
}
|
|
1574
1631
|
},
|
|
1575
1632
|
{
|
|
1576
1633
|
"__schema": "TypeRefSchema",
|
|
@@ -1779,7 +1836,11 @@
|
|
|
1779
1836
|
"line": 39,
|
|
1780
1837
|
"character": 24
|
|
1781
1838
|
},
|
|
1782
|
-
"name": "Workspace"
|
|
1839
|
+
"name": "Workspace",
|
|
1840
|
+
"componentId": {
|
|
1841
|
+
"scope": "teambit.workspace",
|
|
1842
|
+
"name": "workspace"
|
|
1843
|
+
}
|
|
1783
1844
|
},
|
|
1784
1845
|
"isOptional": false,
|
|
1785
1846
|
"isSpread": false
|
|
@@ -1799,7 +1860,11 @@
|
|
|
1799
1860
|
"line": 40,
|
|
1800
1861
|
"character": 21
|
|
1801
1862
|
},
|
|
1802
|
-
"name": "Logger"
|
|
1863
|
+
"name": "Logger",
|
|
1864
|
+
"componentId": {
|
|
1865
|
+
"scope": "teambit.harmony",
|
|
1866
|
+
"name": "logger"
|
|
1867
|
+
}
|
|
1803
1868
|
},
|
|
1804
1869
|
"isOptional": false,
|
|
1805
1870
|
"isSpread": false
|
|
@@ -1819,7 +1884,11 @@
|
|
|
1819
1884
|
"line": 41,
|
|
1820
1885
|
"character": 21
|
|
1821
1886
|
},
|
|
1822
|
-
"name": "ConfigMain"
|
|
1887
|
+
"name": "ConfigMain",
|
|
1888
|
+
"componentId": {
|
|
1889
|
+
"scope": "teambit.harmony",
|
|
1890
|
+
"name": "config"
|
|
1891
|
+
}
|
|
1823
1892
|
},
|
|
1824
1893
|
"isOptional": false,
|
|
1825
1894
|
"isSpread": false
|
|
@@ -1839,7 +1908,11 @@
|
|
|
1839
1908
|
"line": 42,
|
|
1840
1909
|
"character": 27
|
|
1841
1910
|
},
|
|
1842
|
-
"name": "DependencyResolverMain"
|
|
1911
|
+
"name": "DependencyResolverMain",
|
|
1912
|
+
"componentId": {
|
|
1913
|
+
"scope": "teambit.dependencies",
|
|
1914
|
+
"name": "dependency-resolver"
|
|
1915
|
+
}
|
|
1843
1916
|
},
|
|
1844
1917
|
"isOptional": false,
|
|
1845
1918
|
"isSpread": false
|
|
@@ -2118,7 +2191,8 @@
|
|
|
2118
2191
|
"line": 276,
|
|
2119
2192
|
"character": 49
|
|
2120
2193
|
},
|
|
2121
|
-
"name": "ConsumerComponent"
|
|
2194
|
+
"name": "ConsumerComponent",
|
|
2195
|
+
"packageName": "@teambit/legacy/dist/consumer/component"
|
|
2122
2196
|
}
|
|
2123
2197
|
},
|
|
2124
2198
|
"isOptional": false,
|
|
@@ -2264,7 +2338,11 @@
|
|
|
2264
2338
|
"line": 494,
|
|
2265
2339
|
"character": 5
|
|
2266
2340
|
},
|
|
2267
|
-
"name": "Workspace"
|
|
2341
|
+
"name": "Workspace",
|
|
2342
|
+
"componentId": {
|
|
2343
|
+
"scope": "teambit.workspace",
|
|
2344
|
+
"name": "workspace"
|
|
2345
|
+
}
|
|
2268
2346
|
},
|
|
2269
2347
|
{
|
|
2270
2348
|
"__schema": "TypeRefSchema",
|
|
@@ -2273,7 +2351,11 @@
|
|
|
2273
2351
|
"line": 495,
|
|
2274
2352
|
"character": 5
|
|
2275
2353
|
},
|
|
2276
|
-
"name": "ConfigMain"
|
|
2354
|
+
"name": "ConfigMain",
|
|
2355
|
+
"componentId": {
|
|
2356
|
+
"scope": "teambit.harmony",
|
|
2357
|
+
"name": "config"
|
|
2358
|
+
}
|
|
2277
2359
|
},
|
|
2278
2360
|
{
|
|
2279
2361
|
"__schema": "TypeRefSchema",
|
|
@@ -2282,7 +2364,11 @@
|
|
|
2282
2364
|
"line": 496,
|
|
2283
2365
|
"character": 5
|
|
2284
2366
|
},
|
|
2285
|
-
"name": "LoggerMain"
|
|
2367
|
+
"name": "LoggerMain",
|
|
2368
|
+
"componentId": {
|
|
2369
|
+
"scope": "teambit.harmony",
|
|
2370
|
+
"name": "logger"
|
|
2371
|
+
}
|
|
2286
2372
|
},
|
|
2287
2373
|
{
|
|
2288
2374
|
"__schema": "TypeRefSchema",
|
|
@@ -2291,7 +2377,11 @@
|
|
|
2291
2377
|
"line": 497,
|
|
2292
2378
|
"character": 5
|
|
2293
2379
|
},
|
|
2294
|
-
"name": "DependencyResolverMain"
|
|
2380
|
+
"name": "DependencyResolverMain",
|
|
2381
|
+
"componentId": {
|
|
2382
|
+
"scope": "teambit.dependencies",
|
|
2383
|
+
"name": "dependency-resolver"
|
|
2384
|
+
}
|
|
2295
2385
|
}
|
|
2296
2386
|
]
|
|
2297
2387
|
},
|
|
@@ -2563,7 +2653,8 @@
|
|
|
2563
2653
|
"line": 13,
|
|
2564
2654
|
"character": 22
|
|
2565
2655
|
},
|
|
2566
|
-
"name": "MergeStrategyResult"
|
|
2656
|
+
"name": "MergeStrategyResult",
|
|
2657
|
+
"internalFilePath": "component-config-merger.ts"
|
|
2567
2658
|
}
|
|
2568
2659
|
},
|
|
2569
2660
|
"isOptional": false,
|
|
@@ -2708,7 +2799,8 @@
|
|
|
2708
2799
|
"line": 36,
|
|
2709
2800
|
"character": 28
|
|
2710
2801
|
},
|
|
2711
|
-
"name": "MergeStrategyResult"
|
|
2802
|
+
"name": "MergeStrategyResult",
|
|
2803
|
+
"internalFilePath": "component-config-merger.ts"
|
|
2712
2804
|
},
|
|
2713
2805
|
{
|
|
2714
2806
|
"__schema": "KeywordTypeSchema",
|
|
@@ -2979,7 +3071,8 @@
|
|
|
2979
3071
|
"line": 29,
|
|
2980
3072
|
"character": 18
|
|
2981
3073
|
},
|
|
2982
|
-
"name": "GenericConfigOrRemoved"
|
|
3074
|
+
"name": "GenericConfigOrRemoved",
|
|
3075
|
+
"internalFilePath": "component-config-merger.ts"
|
|
2983
3076
|
},
|
|
2984
3077
|
"isOptional": true
|
|
2985
3078
|
},
|
|
@@ -3098,7 +3191,12 @@
|
|
|
3098
3191
|
"line": 76,
|
|
3099
3192
|
"character": 27
|
|
3100
3193
|
},
|
|
3101
|
-
"name": "ComponentID"
|
|
3194
|
+
"name": "ComponentID",
|
|
3195
|
+
"componentId": {
|
|
3196
|
+
"scope": "teambit.component",
|
|
3197
|
+
"name": "component-id",
|
|
3198
|
+
"version": "1.2.0"
|
|
3199
|
+
}
|
|
3102
3200
|
}
|
|
3103
3201
|
},
|
|
3104
3202
|
"isOptional": false,
|
|
@@ -3127,7 +3225,8 @@
|
|
|
3127
3225
|
"line": 77,
|
|
3128
3226
|
"character": 16
|
|
3129
3227
|
},
|
|
3130
|
-
"name": "Lane"
|
|
3228
|
+
"name": "Lane",
|
|
3229
|
+
"packageName": "@teambit/legacy/dist/scope/models"
|
|
3131
3230
|
},
|
|
3132
3231
|
{
|
|
3133
3232
|
"__schema": "KeywordTypeSchema",
|
|
@@ -3158,7 +3257,8 @@
|
|
|
3158
3257
|
"line": 78,
|
|
3159
3258
|
"character": 29
|
|
3160
3259
|
},
|
|
3161
|
-
"name": "ExtensionDataList"
|
|
3260
|
+
"name": "ExtensionDataList",
|
|
3261
|
+
"packageName": "@teambit/legacy/dist/consumer/config/extension-data"
|
|
3162
3262
|
},
|
|
3163
3263
|
"isOptional": false,
|
|
3164
3264
|
"isSpread": false
|
|
@@ -3178,7 +3278,8 @@
|
|
|
3178
3278
|
"line": 79,
|
|
3179
3279
|
"character": 26
|
|
3180
3280
|
},
|
|
3181
|
-
"name": "ExtensionDataList"
|
|
3281
|
+
"name": "ExtensionDataList",
|
|
3282
|
+
"packageName": "@teambit/legacy/dist/consumer/config/extension-data"
|
|
3182
3283
|
},
|
|
3183
3284
|
"isOptional": false,
|
|
3184
3285
|
"isSpread": false
|
|
@@ -3198,7 +3299,8 @@
|
|
|
3198
3299
|
"line": 80,
|
|
3199
3300
|
"character": 27
|
|
3200
3301
|
},
|
|
3201
|
-
"name": "ExtensionDataList"
|
|
3302
|
+
"name": "ExtensionDataList",
|
|
3303
|
+
"packageName": "@teambit/legacy/dist/consumer/config/extension-data"
|
|
3202
3304
|
},
|
|
3203
3305
|
"isOptional": false,
|
|
3204
3306
|
"isSpread": false
|
|
@@ -3258,7 +3360,11 @@
|
|
|
3258
3360
|
"line": 83,
|
|
3259
3361
|
"character": 21
|
|
3260
3362
|
},
|
|
3261
|
-
"name": "Logger"
|
|
3363
|
+
"name": "Logger",
|
|
3364
|
+
"componentId": {
|
|
3365
|
+
"scope": "teambit.harmony",
|
|
3366
|
+
"name": "logger"
|
|
3367
|
+
}
|
|
3262
3368
|
},
|
|
3263
3369
|
"isOptional": false,
|
|
3264
3370
|
"isSpread": false
|
|
@@ -3278,7 +3384,8 @@
|
|
|
3278
3384
|
"line": 84,
|
|
3279
3385
|
"character": 28
|
|
3280
3386
|
},
|
|
3281
|
-
"name": "MergeStrategy"
|
|
3387
|
+
"name": "MergeStrategy",
|
|
3388
|
+
"packageName": "@teambit/legacy/dist/consumer/versions-ops/merge-version"
|
|
3282
3389
|
},
|
|
3283
3390
|
"isOptional": false,
|
|
3284
3391
|
"isSpread": false
|
|
@@ -3395,7 +3502,8 @@
|
|
|
3395
3502
|
"line": 21,
|
|
3396
3503
|
"character": 57
|
|
3397
3504
|
},
|
|
3398
|
-
"name": "GenericConfigOrRemoved"
|
|
3505
|
+
"name": "GenericConfigOrRemoved",
|
|
3506
|
+
"internalFilePath": "component-config-merger.ts"
|
|
3399
3507
|
},
|
|
3400
3508
|
"isOptional": true
|
|
3401
3509
|
}
|
|
@@ -3426,7 +3534,11 @@
|
|
|
3426
3534
|
"line": 23,
|
|
3427
3535
|
"character": 39
|
|
3428
3536
|
},
|
|
3429
|
-
"name": "SerializedDependency"
|
|
3537
|
+
"name": "SerializedDependency",
|
|
3538
|
+
"componentId": {
|
|
3539
|
+
"scope": "teambit.dependencies",
|
|
3540
|
+
"name": "dependency-resolver"
|
|
3541
|
+
}
|
|
3430
3542
|
},
|
|
3431
3543
|
{
|
|
3432
3544
|
"__schema": "TypeLiteralSchema",
|
|
@@ -3576,7 +3688,8 @@
|
|
|
3576
3688
|
"line": 36,
|
|
3577
3689
|
"character": 16
|
|
3578
3690
|
},
|
|
3579
|
-
"name": "GenericConfigOrRemoved"
|
|
3691
|
+
"name": "GenericConfigOrRemoved",
|
|
3692
|
+
"internalFilePath": "component-config-merger.ts"
|
|
3580
3693
|
},
|
|
3581
3694
|
"isOptional": true
|
|
3582
3695
|
}
|
|
@@ -3678,7 +3791,8 @@
|
|
|
3678
3791
|
"line": 42,
|
|
3679
3792
|
"character": 13
|
|
3680
3793
|
},
|
|
3681
|
-
"name": "ExtensionDataEntry"
|
|
3794
|
+
"name": "ExtensionDataEntry",
|
|
3795
|
+
"packageName": "@teambit/legacy/dist/consumer/config/extension-data"
|
|
3682
3796
|
},
|
|
3683
3797
|
"isOptional": true
|
|
3684
3798
|
}
|
|
@@ -3728,7 +3842,7 @@
|
|
|
3728
3842
|
"componentId": {
|
|
3729
3843
|
"scope": "teambit.workspace",
|
|
3730
3844
|
"name": "config-merger",
|
|
3731
|
-
"version": "0.0.
|
|
3845
|
+
"version": "0.0.96"
|
|
3732
3846
|
},
|
|
3733
3847
|
"taggedModuleExports": []
|
|
3734
3848
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ComponentID } from '@teambit/component-id';
|
|
2
|
+
import { Logger } from '@teambit/logger';
|
|
3
|
+
import { Lane } from '@teambit/legacy/dist/scope/models';
|
|
4
|
+
import { ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';
|
|
5
|
+
import { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version';
|
|
6
|
+
import { ConfigMergeResult } from './config-merge-result';
|
|
7
|
+
export type GenericConfigOrRemoved = Record<string, any> | '-';
|
|
8
|
+
export declare const conflictIndicator = "CONFLICT::";
|
|
9
|
+
export type MergeStrategyResult = {
|
|
10
|
+
id: string;
|
|
11
|
+
mergedConfig?: GenericConfigOrRemoved;
|
|
12
|
+
conflict?: Record<string, any>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* perform 3-way merge of component configuration (aspects).
|
|
16
|
+
* normally this is needed when merging one lane into another. the component may have different aspects config in each lane.
|
|
17
|
+
* the baseAspects are the aspects of the component in the diversion point (the common ancestor of the two lanes).
|
|
18
|
+
* the currentAspects are the aspects of the component in the current lane.
|
|
19
|
+
* the otherAspects are the aspects of the component in the other lane. this is the lane we merge into the current lane.
|
|
20
|
+
*
|
|
21
|
+
* the basic merging strategy is a simple comparison between the aspect-configs, if they're different, we have a conflict.
|
|
22
|
+
* we have two special cases:
|
|
23
|
+
*
|
|
24
|
+
* 1. dependency-resolver: we do a deeper check for the policy, we compare each dependency separately. also, we take
|
|
25
|
+
* into account not only the config, but also the data. this is needed because some dependencies are automatically
|
|
26
|
+
* added by Bit (from the import statements in the code) and they're not in the config. the final config has the deps
|
|
27
|
+
* from both sources, the config and the data. The way we know to differentiate between them is by the "force" prop.
|
|
28
|
+
* the config has always force: true.
|
|
29
|
+
*
|
|
30
|
+
* 2. envs: if we don't treat it specially, the user will need to make the change not only in the envs aspect, but also
|
|
31
|
+
* in the deps-resolver (because the env is added as a devDependency) and also in the aspect itself (because
|
|
32
|
+
* teambit.envs/env has only the id and not the version). to make it simpler, we ignore the envs in the deps-resolver
|
|
33
|
+
* we ignore the individual aspect that is the env itself. we only show teambit.envs/env and we put the env id and
|
|
34
|
+
* version. later, when the component is loaded, we split the id and the version and put them in the correct places.
|
|
35
|
+
* see workspace.componentExtension / adjustEnvsOnConfigMerge for more details.
|
|
36
|
+
*/
|
|
37
|
+
export declare class ComponentConfigMerger {
|
|
38
|
+
private compIdStr;
|
|
39
|
+
private workspaceIds;
|
|
40
|
+
private currentAspects;
|
|
41
|
+
private baseAspects;
|
|
42
|
+
private otherAspects;
|
|
43
|
+
private currentLabel;
|
|
44
|
+
private otherLabel;
|
|
45
|
+
private logger;
|
|
46
|
+
private mergeStrategy;
|
|
47
|
+
private currentEnv;
|
|
48
|
+
private otherEnv;
|
|
49
|
+
private baseEnv?;
|
|
50
|
+
private handledExtIds;
|
|
51
|
+
private otherLaneIdsStr;
|
|
52
|
+
constructor(compIdStr: string, workspaceIds: ComponentID[], otherLane: Lane | undefined, currentAspects: ExtensionDataList, baseAspects: ExtensionDataList, otherAspects: ExtensionDataList, currentLabel: string, otherLabel: string, logger: Logger, mergeStrategy: MergeStrategy);
|
|
53
|
+
merge(): ConfigMergeResult;
|
|
54
|
+
private populateEnvs;
|
|
55
|
+
private envStrategy;
|
|
56
|
+
private areConfigsEqual;
|
|
57
|
+
private mergePerStrategy;
|
|
58
|
+
private basicConfigMerge;
|
|
59
|
+
private depResolverStrategy;
|
|
60
|
+
private isIdInWorkspaceOrOtherLane;
|
|
61
|
+
private getIdFromWorkspace;
|
|
62
|
+
private isEnv;
|
|
63
|
+
private getConfig;
|
|
64
|
+
private getPolicy;
|
|
65
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MergeStrategyResult } from './component-config-merger';
|
|
2
|
+
export declare class ConfigMergeResult {
|
|
3
|
+
readonly compIdStr: string;
|
|
4
|
+
private currentLabel;
|
|
5
|
+
private otherLabel;
|
|
6
|
+
private results;
|
|
7
|
+
constructor(compIdStr: string, currentLabel: string, otherLabel: string, results: MergeStrategyResult[]);
|
|
8
|
+
hasConflicts(): boolean;
|
|
9
|
+
generateMergeConflictFile(): string | null;
|
|
10
|
+
getSuccessfullyMergedConfig(): Record<string, any>;
|
|
11
|
+
getDepsResolverResult(): MergeStrategyResult | undefined;
|
|
12
|
+
private generateConflictStringPerAspect;
|
|
13
|
+
private depsResolverConfigGenerator;
|
|
14
|
+
private basicConflictGenerator;
|
|
15
|
+
private formatConflict;
|
|
16
|
+
private concatenateConflicts;
|
|
17
|
+
}
|
|
18
|
+
export declare function parseVersionLineWithConflict(line: string): {
|
|
19
|
+
currentVal: string;
|
|
20
|
+
otherVal: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DependencyResolverMain, WorkspacePolicyConfigKeysNames } from '@teambit/dependency-resolver';
|
|
2
|
+
import { Workspace } from '@teambit/workspace';
|
|
3
|
+
import { Logger, LoggerMain } from '@teambit/logger';
|
|
4
|
+
import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
|
|
5
|
+
import { ConfigMain } from '@teambit/config';
|
|
6
|
+
import { ConfigMergeResult } from './config-merge-result';
|
|
7
|
+
export type WorkspaceDepsUpdates = {
|
|
8
|
+
[pkgName: string]: [string, string];
|
|
9
|
+
};
|
|
10
|
+
export type WorkspaceDepsConflicts = Record<WorkspacePolicyConfigKeysNames, Array<{
|
|
11
|
+
name: string;
|
|
12
|
+
version: string;
|
|
13
|
+
}>>;
|
|
14
|
+
export type WorkspaceConfigUpdateResult = {
|
|
15
|
+
workspaceDepsUpdates?: WorkspaceDepsUpdates;
|
|
16
|
+
workspaceDepsConflicts?: WorkspaceDepsConflicts;
|
|
17
|
+
workspaceConfigConflictWriteError?: Error;
|
|
18
|
+
logs?: string[];
|
|
19
|
+
};
|
|
20
|
+
export declare class ConfigMergerMain {
|
|
21
|
+
private workspace;
|
|
22
|
+
private logger;
|
|
23
|
+
private config;
|
|
24
|
+
private depsResolver;
|
|
25
|
+
constructor(workspace: Workspace, logger: Logger, config: ConfigMain, depsResolver: DependencyResolverMain);
|
|
26
|
+
generateConfigMergeConflictFileForAll(allConfigMerge: ConfigMergeResult[]): Promise<void>;
|
|
27
|
+
writeWorkspaceJsoncWithConflictsGracefully(workspaceDepsConflicts: WorkspaceDepsConflicts): Promise<Error | undefined>;
|
|
28
|
+
private writeWorkspaceJsoncWithConflicts;
|
|
29
|
+
updateWorkspaceJsoncWithDepsIfNeeded(allConfigMerge: ConfigMergeResult[]): Promise<{
|
|
30
|
+
workspaceDepsUpdates?: WorkspaceDepsUpdates;
|
|
31
|
+
workspaceDepsConflicts?: WorkspaceDepsConflicts;
|
|
32
|
+
}>;
|
|
33
|
+
updateDepsInWorkspaceConfig(components: ConsumerComponent[]): Promise<WorkspaceConfigUpdateResult | undefined>;
|
|
34
|
+
private updateWsConfigWithGivenChanges;
|
|
35
|
+
/**
|
|
36
|
+
* if both versions are ranges, it's hard to check which one is bigger. sometimes it's even impossible.
|
|
37
|
+
* remember that a range can be something like `1.2 <1.2.9 || >2.0.0`.
|
|
38
|
+
* this check is naive in a way that it assumes the range is simple, such as "^1.2.3" or "~1.2.3.
|
|
39
|
+
* in this case, it's possible to check for the minimum version and compare it.
|
|
40
|
+
*/
|
|
41
|
+
private isRange1GreaterThanRange2Naively;
|
|
42
|
+
static slots: never[];
|
|
43
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
44
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
45
|
+
static provider([workspace, config, loggerMain, depsResolver]: [
|
|
46
|
+
Workspace,
|
|
47
|
+
ConfigMain,
|
|
48
|
+
LoggerMain,
|
|
49
|
+
DependencyResolverMain
|
|
50
|
+
]): Promise<ConfigMergerMain>;
|
|
51
|
+
}
|
|
52
|
+
export default ConfigMergerMain;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ConfigMergerAspect } from './config-merger.aspect';
|
|
2
|
+
export type { ConfigMergerMain, WorkspaceDepsUpdates, WorkspaceDepsConflicts, WorkspaceConfigUpdateResult, } from './config-merger.main.runtime';
|
|
3
|
+
export type { ConfigMergeResult } from './config-merge-result';
|
|
4
|
+
export { ComponentConfigMerger } from './component-config-merger';
|
|
5
|
+
export default ConfigMergerAspect;
|
|
6
|
+
export { ConfigMergerAspect };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/config-merger",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.96",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/config-merger",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "config-merger",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.96"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"@teambit/component-version": "1.0.3",
|
|
18
18
|
"@teambit/harmony": "0.4.6",
|
|
19
19
|
"@teambit/bit-error": "0.0.404",
|
|
20
|
-
"@teambit/builder": "1.0.
|
|
21
|
-
"@teambit/dependency-resolver": "1.0.
|
|
22
|
-
"@teambit/envs": "1.0.
|
|
23
|
-
"@teambit/logger": "0.0.
|
|
24
|
-
"@teambit/cli": "0.0.
|
|
20
|
+
"@teambit/builder": "1.0.229",
|
|
21
|
+
"@teambit/dependency-resolver": "1.0.229",
|
|
22
|
+
"@teambit/envs": "1.0.229",
|
|
23
|
+
"@teambit/logger": "0.0.955",
|
|
24
|
+
"@teambit/cli": "0.0.862",
|
|
25
25
|
"@teambit/component-package-version": "0.0.433",
|
|
26
|
-
"@teambit/config": "0.0.
|
|
27
|
-
"@teambit/workspace": "1.0.
|
|
26
|
+
"@teambit/config": "0.0.980",
|
|
27
|
+
"@teambit/workspace": "1.0.229"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/lodash": "4.14.165",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@types/fs-extra": "9.0.7",
|
|
33
33
|
"@types/mocha": "10.0.1",
|
|
34
34
|
"chai": "4.3.0",
|
|
35
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
35
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.33"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@teambit/legacy": "1.0.682"
|
package/tsconfig.json
CHANGED
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
24
|
-
"composite": true
|
|
23
|
+
"noImplicitAny": false
|
|
25
24
|
},
|
|
26
25
|
"exclude": [
|
|
27
26
|
"artifacts",
|
|
@@ -36,25 +35,5 @@
|
|
|
36
35
|
"include": [
|
|
37
36
|
"**/*",
|
|
38
37
|
"**/*.json"
|
|
39
|
-
],
|
|
40
|
-
"references": [
|
|
41
|
-
{
|
|
42
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@1.0.227"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.227"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_config@0.0.978"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.227"
|
|
58
|
-
}
|
|
59
38
|
]
|
|
60
39
|
}
|
|
File without changes
|