mirror of
https://github.com/morluto/rea.git
synced 2026-11-06 23:06:18 +00:00
fix(javascript): associate requested bindings only with resolved native addons (#6402)
* fix(javascript): associate requested bindings only with resolved native addons * test(javascript): cover the exact native addon association --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
1 parent
99be47a9a3
commit
630e6becdf
2 files changed
+59
-1
No files matched your search
@@ -56,7 +56,13 @@ const addNativeBinding = (input: NativeBindingInput): void => {
|
||||
? {}
|
||||
: { moduleKind: value.module_kind }),
|
||||
}).resolved_path;
|
||||
const addon = resolved === null ? undefined : context.fileNodes.get(resolved);
|
||||
// Extension probing can resolve `./addon.node` to `addon.node.js`; only a
|
||||
// native-addon artifact can expose the requested binding.
|
||||
const addon =
|
||||
resolved === null ||
|
||||
context.filesByPath.get(resolved)?.kind !== "native-addon"
|
||||
? undefined
|
||||
: context.fileNodes.get(resolved);
|
||||
const binding = context.accumulator.addNode({
|
||||
kind: "native-export",
|
||||
identity: electronObservationIdentity(
|
||||
|
||||
Reference in new issue
Block a user