mirror of
https://github.com/morluto/rea.git
synced 2026-10-30 03:15:54 +00:00
fix(javascript): track public CommonJS export receiver lifetimes (#3567)
* fix(javascript): track public CommonJS export receiver lifetimes * fix(javascript): retain exports across uncertain identity effects
This commit is contained in:
10 files changed
+502
-71
No files matched your search
@@ -123,6 +123,12 @@ const createAmbientPathResolver = (
|
||||
continue;
|
||||
}
|
||||
if (t.isIdentifier(root)) {
|
||||
// The wrapper module object is distinct from globalThis.module. Keep
|
||||
// its identity through the same alias/projection owner used for writes.
|
||||
if (isUnshadowedGlobal(root, state, "module")) {
|
||||
retain(["commonjs-module", ...(suffix ?? [])]);
|
||||
continue;
|
||||
}
|
||||
if (globalObjectName(root, state) !== undefined) {
|
||||
retain(["global", ...(suffix ?? [])]);
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user