mirror of
https://github.com/morluto/rea.git
synced 2026-10-31 11:56:12 +00:00
fix(javascript): retain runtime scope in bundled module relationships
This commit is contained in:
1 parent
0d89978333
commit
c1217e711b
14 files changed
+394
-42
No files matched your search
@@ -130,7 +130,11 @@ export const finalizeLocatedFindings = <
|
||||
values: readonly LocatedJavaScriptFinding<Value>[],
|
||||
modules: JavaScriptModuleRangeIndex,
|
||||
): Value[] =>
|
||||
values.map(({ offset, value }) => ({
|
||||
...value,
|
||||
module_key: modules.find(offset)?.key ?? null,
|
||||
}));
|
||||
values.map(({ offset, value }) => {
|
||||
const module = modules.find(offset);
|
||||
return {
|
||||
...value,
|
||||
module_key: module?.key ?? null,
|
||||
...(module === undefined ? {} : { module_runtime: module.runtime }),
|
||||
};
|
||||
});
|
||||
Reference in new issue
Block a user