@shapeshift-labs/frontier-lang-compiler 0.2.166 → 0.2.168
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.
|
@@ -14,9 +14,11 @@ function maybeMergeHtmlCssProjectFile(options) {
|
|
|
14
14
|
if (!merge) return undefined;
|
|
15
15
|
const resultId = `${projectId}_${safeId(file.sourcePath)}`;
|
|
16
16
|
const mergeOptions = htmlCssMergeOptionsForProjectFile(input, file.sourcePath, language);
|
|
17
|
-
const
|
|
17
|
+
const runtimeBoundaryProofs = language === 'html' ? htmlRuntimeBoundaryProofCandidates(input, file.sourcePath, mergeOptions) : [];
|
|
18
|
+
const runtimeBoundaryMergeOptions = runtimeBoundaryProofs.length ? { htmlRuntimeBoundaryProofs: runtimeBoundaryProofs, htmlSourceBoundRuntimeBoundaryProofs: runtimeBoundaryProofs } : {};
|
|
19
|
+
const result = merge({ ...sourceInput, ...mergeOptions, ...context, ...runtimeBoundaryMergeOptions, id: resultId, baseSourceText: base, workerSourceText: worker, headSourceText: head });
|
|
18
20
|
const admittedResult = language === 'html' && result.status === 'merged'
|
|
19
|
-
? blockHtmlProofGapChanges({ result, id: resultId, sourcePath: file.sourcePath, base, worker, head, runtimeBoundaryProofs
|
|
21
|
+
? blockHtmlProofGapChanges({ result, id: resultId, sourcePath: file.sourcePath, base, worker, head, runtimeBoundaryProofs }) ?? result
|
|
20
22
|
: result;
|
|
21
23
|
return admittedResult.status === 'merged' ? mergedHtmlCssFile(file, context, admittedResult, language) : blockedHtmlCssFile(file, context, admittedResult);
|
|
22
24
|
}
|
|
@@ -291,9 +293,23 @@ function mergedHtmlCssFile(file, context, result, language) {
|
|
|
291
293
|
}
|
|
292
294
|
|
|
293
295
|
function blockedHtmlCssFile(file, context, result) {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
296
|
+
const conflicts = normalizeHtmlCssConflicts(result.conflicts ?? [], context.language);
|
|
297
|
+
const admission = blockedHtmlCssAdmission(result.admission, context.language);
|
|
298
|
+
const normalizedResult = compactRecord({ ...result, conflicts, admission });
|
|
299
|
+
return compactRecord({ kind: 'frontier.lang.jsTsProjectSafeMergeFile', version: 1, sourcePath: file.sourcePath, language: context.language, status: 'blocked', operation: 'blocked-merge', result: normalizedResult, conflicts, admission, summary: result.summary, conflictKeys: [`source#${file.sourcePath}`] });
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function blockedHtmlCssAdmission(admission = {}, language) {
|
|
303
|
+
return compactRecord({ ...admission, browserRuntimeEquivalenceClaim: language === 'html' ? false : admission.browserRuntimeEquivalenceClaim, browserCascadeEquivalenceClaim: language === 'css' ? false : admission.browserCascadeEquivalenceClaim, browserRenderEquivalenceClaim: language === 'css' ? false : admission.browserRenderEquivalenceClaim });
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function normalizeHtmlCssConflicts(conflicts, language) {
|
|
307
|
+
if (language !== 'html') return conflicts;
|
|
308
|
+
return conflicts.map((conflict) => {
|
|
309
|
+
const reasonCode = conflict.details?.reasonCode;
|
|
310
|
+
if (conflict.code !== 'html-proof-gap-blocked' || !reasonCode) return conflict;
|
|
311
|
+
const proofGap = { ...(conflict.details?.proofGap ?? {}), summary: conflict.details?.proofGap?.summary ?? htmlProofGapSummary(reasonCode), nextProof: conflict.details?.proofGap?.nextProof ?? htmlProofGapNextProof(reasonCode) };
|
|
312
|
+
return { ...conflict, details: { ...(conflict.details ?? {}), proofGap } };
|
|
297
313
|
});
|
|
298
314
|
}
|
|
299
315
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshift-labs/frontier-lang-compiler",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.168",
|
|
4
4
|
"description": "Compiler facade for Frontier Lang source documents and language projection adapters.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@shapeshift-labs/frontier-lang-c": "0.2.9",
|
|
65
65
|
"@shapeshift-labs/frontier-lang-checker": "0.3.8",
|
|
66
|
-
"@shapeshift-labs/frontier-lang-css": "^0.1.
|
|
67
|
-
"@shapeshift-labs/frontier-lang-html": "^0.1.
|
|
66
|
+
"@shapeshift-labs/frontier-lang-css": "^0.1.11",
|
|
67
|
+
"@shapeshift-labs/frontier-lang-html": "^0.1.8",
|
|
68
68
|
"@shapeshift-labs/frontier-lang-javascript": "0.2.9",
|
|
69
69
|
"@shapeshift-labs/frontier-lang-kernel": "0.3.12",
|
|
70
70
|
"@shapeshift-labs/frontier-lang-parser": "0.3.8",
|