@shapeshift-labs/frontier-lang-compiler 0.2.126 → 0.2.127
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.
|
@@ -245,6 +245,7 @@ function publicContractRegionForDeclaration(declaration, ownershipRegion, module
|
|
|
245
245
|
function reExportIdentityForDeclaration(declaration, input, documentId, relationId, ownershipRegion, moduleEdge) {
|
|
246
246
|
if (!moduleEdge?.isReExport && !declaration.reExport) return undefined;
|
|
247
247
|
const bindingCount = Number(declaration.nativeNode?.metadata?.bindingCount ?? declaration.metadata?.bindingCount ?? 0);
|
|
248
|
+
if (declaration.symbolKind === 'module' && declaration.metadata?.namespaceReExport) return undefined;
|
|
248
249
|
if (declaration.symbolKind === 'module' && !declaration.exportStar && !declaration.metadata?.exportStar && bindingCount > 1) return undefined;
|
|
249
250
|
const identityId = hashSemanticValue([relationId, declaration.symbolId, declaration.exportedName ?? declaration.metadata?.exportedName, declaration.importedName ?? declaration.metadata?.importedName, declaration.localName ?? declaration.metadata?.localName]);
|
|
250
251
|
const stableId = bindingCount > 1 ? idFragment(identityId) : idFragment(relationId);
|
|
@@ -39,17 +39,20 @@ function exportDeclarationEntries(node, nativeNodeId, input) {
|
|
|
39
39
|
const typeOnly = Boolean(node.isTypeOnly);
|
|
40
40
|
const exportStar = moduleSpecifier && !node.exportClause;
|
|
41
41
|
const bindings = exportClauseBindings(node.exportClause, { typeOnly, reExport: Boolean(moduleSpecifier) });
|
|
42
|
+
const namespaceReExport = Boolean(moduleSpecifier && bindings.some((binding) => binding.exportKind === 'namespace-reexport'));
|
|
42
43
|
return [
|
|
43
44
|
...(moduleSpecifier ? importModuleEntries(input, nativeNodeId, moduleSpecifier, 'ExportFromDeclaration', reExportImportBindings(bindings, exportStar), {
|
|
44
45
|
typeOnly,
|
|
45
46
|
reexport: true,
|
|
46
47
|
exportStar,
|
|
48
|
+
namespaceReExport,
|
|
47
49
|
importKind: exportStar ? 'reexport' : 'reexport'
|
|
48
50
|
}) : []),
|
|
49
51
|
...exportModuleEntries(input, nativeNodeId, moduleSpecifier, bindings, {
|
|
50
52
|
typeOnly,
|
|
51
53
|
exportStar,
|
|
52
54
|
reExport: Boolean(moduleSpecifier),
|
|
55
|
+
namespaceReExport,
|
|
53
56
|
exportKind: exportStar ? 'export-star' : 'named'
|
|
54
57
|
})
|
|
55
58
|
];
|
|
@@ -269,6 +272,7 @@ function moduleMetadata(scan, bindings, metadata) {
|
|
|
269
272
|
sideEffectOnly: metadata.sideEffectOnly,
|
|
270
273
|
reexport: metadata.reexport,
|
|
271
274
|
reExport: metadata.reExport,
|
|
275
|
+
namespaceReExport: metadata.namespaceReExport,
|
|
272
276
|
exportStar: metadata.exportStar,
|
|
273
277
|
publicContract: metadata.reExport || metadata.exportKind
|
|
274
278
|
});
|
package/package.json
CHANGED