fix(javascript): retain property reads during updates (#508)

Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
Rudy Mizrahi Celekliandmorluto authored and GitHub committed 2026-10-05 15:09:58 +08:00
1 parent 2df6b51ebb
commit 6b7923cdd2
3 files changed
+56

No files matched your search

@@ -170,6 +170,18 @@ it("projects built-in resource acquisition and release", () => {
).toMatchObject({ status: "partial" });
});
it.each(["+= 1", "++"])(
"projects both property dependencies for %s",
(operator) => {
const graph = graphFor(`
const source = { count: 1 };
source.count ${operator};
`);
const relations = graph.relations.map(({ relation }) => relation);
expect(relations).toContain("reads-property");
expect(relations).toContain("writes-property");
},
);
it("does not project a literal property slot for dynamic destructuring", () => {
const graph = graphFor(`
const source = { token: "TOKEN" };