From 893256b88e721d1583b637aa8c22a662656048fc Mon Sep 17 00:00:00 2001
From: Nandhis <45960035+msnandhis@users.noreply.github.com>
Date: Wed, 27 May 2026 05:45:32 +0530
Subject: [PATCH] fix(extraction): capture top-level initializer and
inline-object-method calls (#465)
The variable / method-definition extractors never walked top-level
initializer values or inline-object method bodies, so calls like
`const token = getTokenMp()` and `methods: { save() { getTokenMp() } }`
showed up nowhere in `codegraph_callers`. The variable extractor now
walks any non-object initializer value; the method-definition extractor
still skips synthetic nodes for inline-object methods (noise rationale
unchanged) but now walks their bodies for calls. Surfaces in plain
`.ts`/`.js` files as well as Vue SFCs (`
+`;
+ const result = extractFromSource('Issue425Setup.vue', code);
+
+ const call = result.unresolvedReferences.find(
+ (ref) => ref.referenceKind === 'calls' && ref.referenceName === 'getTokenMp'
+ );
+ expect(call).toBeDefined();
+ });
+
+ it('should extract calls from Vue Options API object methods', () => {
+ const code = `
+
+
+
+
+`;
+ const result = extractFromSource('Issue425Options.vue', code);
+
+ const calls = result.unresolvedReferences.filter(
+ (ref) => ref.referenceKind === 'calls' && ref.referenceName === 'getTokenMp'
+ );
+ expect(calls).toHaveLength(2);
+ });
+
it('should extract from both