mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 01:13:39 +00:00
fix(javascript): retain unresolved export iteration sources
This commit is contained in:
1 parent
27976a8fcb
commit
cc4f805541
3 files changed
+64
-12
No files matched your search
@@ -360,7 +360,10 @@ export const createSemanticElectronAppPathChangeQuery = (
|
||||
return true;
|
||||
const exported = commonJsRuntimeExportValues(node, state);
|
||||
if (
|
||||
!exported.some(({ value }) => value !== null) ||
|
||||
!exported.some(
|
||||
({ value, iterationSource }) =>
|
||||
value !== null || iterationSource !== undefined,
|
||||
) ||
|
||||
(!t.isAssignmentExpression(node) && !t.isCallExpression(node))
|
||||
)
|
||||
return false;
|
||||
@@ -368,11 +371,15 @@ export const createSemanticElectronAppPathChangeQuery = (
|
||||
indexCommonJsExportReceiversSteps(state),
|
||||
));
|
||||
return exported.some(
|
||||
({ exportedName, value, projection, ownEnumerable }) =>
|
||||
({ exportedName, value, projection, ownEnumerable, iterationSource }) =>
|
||||
commonJsExportApplicability(receivers.get(node), exportedName) !==
|
||||
"detached" &&
|
||||
value !== null &&
|
||||
possiblePath(value, true, projection, ownEnumerable),
|
||||
(value !== null
|
||||
? possiblePath(value, true, projection, ownEnumerable)
|
||||
: iterationSource !== undefined &&
|
||||
// Unknown iteration does not identify any yielded slot. Retain
|
||||
// only source reachability through the existing escape query.
|
||||
possiblePath(iterationSource, true)),
|
||||
);
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user