@aroman22/codegraph-vba 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -251,6 +251,17 @@ export declare class QueryBuilder {
251
251
  * about the target symbol.
252
252
  */
253
253
  getVbaCallStubs(): Node[];
254
+ /**
255
+ * Find VBA reference-stub candidate nodes for `resolveVbaReferenceStubs`
256
+ * (issue #78).
257
+ *
258
+ * A VBA reference-stub is a `class` node whose `metadata.synthesizedBy`
259
+ * starts with `vba-` and is targeted by a `references` edge from a VBA
260
+ * module. These synthetic nodes are created by the extractor for
261
+ * cross-file type references (`Dim x As MyEnum`) but may not have been
262
+ * resolved to the real type node during the main resolution pass.
263
+ */
264
+ getVbaReferenceStubs(): Node[];
254
265
  /**
255
266
  * Repoint an edge's `target` + `metadata` in place, leaving all other
256
267
  * columns (source, kind, line, col, provenance) untouched. Used by
@@ -204,6 +204,27 @@ export declare class ReferenceResolver {
204
204
  * no new stubs is a no-op.
205
205
  */
206
206
  resolveVbaCallStubs(): number;
207
+ /**
208
+ * VBA #78 — post-extraction resolver pass for `references` edges that
209
+ * target synthetic `class` nodes created by the extractor for cross-file
210
+ * type references (`Dim x As MyEnum`, `Set x = New Foo`).
211
+ *
212
+ * The extractor creates a synthetic `class` node keyed on
213
+ * `(filePath, 'class', name, 0)` in the REFERENCING file. When the real
214
+ * type lives in a different file (e.g. `enum MyEnum` in `Module1.bas`),
215
+ * the `references` edge points to the synthetic stub instead of the real
216
+ * type node. This method repoints those edges to the real type node when
217
+ * uniquely resolvable by name + kind, then deletes the synthetic stub.
218
+ *
219
+ * Resolution strategy: for each VBA `class` stub, find all real project
220
+ * nodes with the same `name` whose `kind` is one of the type-like kinds
221
+ * (enum, class, interface, struct, type_alias). Exactly one match →
222
+ * repoint; zero or 2+ → decline (leave the stub as-is).
223
+ *
224
+ * Duplicate `(source, target, 'references')` rows after repointing are
225
+ * collapsed the same way `resolveVbaCallStubs` handles F1 duplicates.
226
+ */
227
+ resolveVbaReferenceStubs(): number;
207
228
  /**
208
229
  * Resolve a single VBA call-stub node to its real target, or `null` when
209
230
  * unresolvable/ambiguous. See `resolveVbaCallStubs` for the two-step
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aroman22/codegraph-vba",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Local-first code intelligence for AI agents (MCP). Self-contained — bundles its own runtime.",
5
5
  "bin": {
6
6
  "codegraph-vba": "npm-shim.js"
@@ -15,12 +15,12 @@
15
15
  "./package.json": "./package.json"
16
16
  },
17
17
  "optionalDependencies": {
18
- "@aroman22/codegraph-vba-darwin-arm64": "1.5.1",
19
- "@aroman22/codegraph-vba-darwin-x64": "1.5.1",
20
- "@aroman22/codegraph-vba-linux-arm64": "1.5.1",
21
- "@aroman22/codegraph-vba-linux-x64": "1.5.1",
22
- "@aroman22/codegraph-vba-win32-arm64": "1.5.1",
23
- "@aroman22/codegraph-vba-win32-x64": "1.5.1"
18
+ "@aroman22/codegraph-vba-darwin-arm64": "1.5.2",
19
+ "@aroman22/codegraph-vba-darwin-x64": "1.5.2",
20
+ "@aroman22/codegraph-vba-linux-arm64": "1.5.2",
21
+ "@aroman22/codegraph-vba-linux-x64": "1.5.2",
22
+ "@aroman22/codegraph-vba-win32-arm64": "1.5.2",
23
+ "@aroman22/codegraph-vba-win32-x64": "1.5.2"
24
24
  },
25
25
  "files": [
26
26
  "npm-shim.js",