@shapeshift-labs/frontier-lang-compiler 0.2.136 → 0.2.137
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.
|
@@ -47,7 +47,9 @@ export function createSourceMergePlan(base, worker, head, workerPlan, headPlan,
|
|
|
47
47
|
label: 'import'
|
|
48
48
|
});
|
|
49
49
|
const headImportGroupsByAnchor = new Map(headImportInsertionGroups.map((group) => [insertionGroupKey(group), group]));
|
|
50
|
+
const countedImportInsertionGroups = new Set();
|
|
50
51
|
for (const group of importInsertionGroups) {
|
|
52
|
+
countedImportInsertionGroups.add(insertionGroupKey(group));
|
|
51
53
|
const anchor = headEntriesByBaseKey.get(group.anchorKey);
|
|
52
54
|
if (!anchor) {
|
|
53
55
|
addConflict(context, {
|
|
@@ -68,7 +70,10 @@ export function createSourceMergePlan(base, worker, head, workerPlan, headPlan,
|
|
|
68
70
|
end: insertionSpan.end,
|
|
69
71
|
text: importInsertionText(entries, detectLineEnding(head.sourceText))
|
|
70
72
|
});
|
|
71
|
-
importDeclarationAdditions +=
|
|
73
|
+
importDeclarationAdditions += entries.length;
|
|
74
|
+
}
|
|
75
|
+
for (const group of headImportInsertionGroups) {
|
|
76
|
+
if (!countedImportInsertionGroups.has(insertionGroupKey(group))) importDeclarationAdditions += group.entries.length;
|
|
72
77
|
}
|
|
73
78
|
|
|
74
79
|
const insertionGroups = variantInsertionGroups(worker, workerPlan.matchedVariantKeys, 'worker', context, {
|
|
@@ -83,7 +88,9 @@ export function createSourceMergePlan(base, worker, head, workerPlan, headPlan,
|
|
|
83
88
|
});
|
|
84
89
|
const headDeclarationGroupsByAnchor = new Map(headInsertionGroups.map((group) => [insertionGroupKey(group), group]));
|
|
85
90
|
let topLevelDeclarationAdditions = 0;
|
|
91
|
+
const countedDeclarationInsertionGroups = new Set();
|
|
86
92
|
for (const group of insertionGroups) {
|
|
93
|
+
countedDeclarationInsertionGroups.add(insertionGroupKey(group));
|
|
87
94
|
const anchor = headEntriesByBaseKey.get(group.anchorKey);
|
|
88
95
|
if (!anchor) {
|
|
89
96
|
addConflict(context, {
|
|
@@ -104,7 +111,10 @@ export function createSourceMergePlan(base, worker, head, workerPlan, headPlan,
|
|
|
104
111
|
end: insertionSpan.end,
|
|
105
112
|
text: declarationInsertionText(entries, detectLineEnding(head.sourceText))
|
|
106
113
|
});
|
|
107
|
-
topLevelDeclarationAdditions +=
|
|
114
|
+
topLevelDeclarationAdditions += entries.length;
|
|
115
|
+
}
|
|
116
|
+
for (const group of headInsertionGroups) {
|
|
117
|
+
if (!countedDeclarationInsertionGroups.has(insertionGroupKey(group))) topLevelDeclarationAdditions += group.entries.length;
|
|
108
118
|
}
|
|
109
119
|
|
|
110
120
|
return {
|
package/package.json
CHANGED