fix(javascript): preserve proved dependencies across array elisions (#12514)

This commit is contained in:
morluto authored and GitHub committed 2026-11-19 20:40:37 +00:00
1 parent a5e9f3a979
commit ad515e3531
3 files changed
+97 -4

No files matched your search

@@ -38,6 +38,9 @@ cliTest(
let arrayAssigned;
[arrayAssigned] = before;
before[0] = "later";
const skipped = ["skip", "first"];
const [,elided] = skipped;
skipped[1] = "later";
const box = { items: [] };
const iterator = box.items.values();
const prototype = Reflect.getPrototypeOf(iterator);
@@ -65,6 +68,7 @@ cliTest(
["scalar", ["b"]],
["ordinary", ["0"]],
["arrayAssigned", ["0"]],
["elided", ["1"]],
["selected", ["0"], "candidate"],
] as const) {
const binding = graph.nodes.find(
@@ -95,7 +99,13 @@ cliTest(
),
).toMatchObject({ resolution: "resolved" });
const queryPath = join(root, "query.json");
for (const name of ["declared", "ordinary", "arrayAssigned", "selected"]) {
for (const name of [
"declared",
"ordinary",
"arrayAssigned",
"elided",
"selected",
]) {
const binding = graph.nodes.find(
({ kind, label }) => kind === "binding" && label === name,
);