mirror of
https://github.com/morluto/rea.git
synced 2026-10-29 10:55:57 +00:00
fix(javascript): trace nested Electron bridge members (#2745)
* fix(javascript): trace nested Electron bridge members * fix(javascript): preserve shallow Electron bridge paths * fix(javascript): preserve exact Electron bridge member paths * fix(javascript): preserve exact Electron bridge paths * fix(javascript): preserve bridge entry ownership * fix(javascript): preserve bridge path identity * fix(javascript): normalize typed feature seeds before tracing * test(javascript): normalize direct selector seed inputs * refactor(javascript): consume normalized feature seed defaults --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
1 parent
c9982ad8bf
commit
f0b8ae1fc8
14 files changed
+643
-51
No files matched your search
@@ -52,10 +52,28 @@ const seedMatch = (
|
||||
]
|
||||
: [];
|
||||
if (!kindMatches(node, seed.kind)) return [];
|
||||
const requestedEntryPath =
|
||||
seed.kind === "api" && "entry_path" in seed ? seed.entry_path : undefined;
|
||||
if (
|
||||
seed.kind === "api" &&
|
||||
requestedEntryPath !== undefined &&
|
||||
!node.observations.some(({ properties }) => {
|
||||
const entryPath = properties.entry_path;
|
||||
return (
|
||||
Array.isArray(entryPath) &&
|
||||
entryPath.length === requestedEntryPath.length &&
|
||||
entryPath.every(
|
||||
(segment, index) => segment === requestedEntryPath[index],
|
||||
)
|
||||
);
|
||||
})
|
||||
)
|
||||
return [];
|
||||
const mode = featureSeedMatchMode(seed);
|
||||
const query = normalized(seed.value, seed.case_sensitive);
|
||||
const caseSensitive = seed.case_sensitive;
|
||||
const query = normalized(seed.value, caseSensitive);
|
||||
const match = candidateFields(node, seed.kind).find((candidate) => {
|
||||
const value = normalized(candidate.value, seed.case_sensitive);
|
||||
const value = normalized(candidate.value, caseSensitive);
|
||||
return mode === "exact" ? value === query : value.includes(query);
|
||||
});
|
||||
return match === undefined
|
||||
|
||||
Reference in new issue
Block a user