ucn 3.7.19 → 3.7.20

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.
package/core/project.js CHANGED
@@ -364,6 +364,9 @@ class ProjectIndex {
364
364
  const seenModules = new Set();
365
365
 
366
366
  for (const importModule of fileEntry.imports) {
367
+ // Skip null modules (e.g., dynamic include! macros in Rust)
368
+ if (!importModule) continue;
369
+
367
370
  // Deduplicate: same module imported multiple times in one file
368
371
  // (e.g., lazy imports inside different functions)
369
372
  if (seenModules.has(importModule)) continue;
package/languages/rust.js CHANGED
@@ -848,13 +848,16 @@ function findImportsInCode(code, parser) {
848
848
  const argsNode = node.childForFieldName('argument_list');
849
849
  const arg = argsNode?.namedChild(0);
850
850
  const dynamic = !arg || arg.type !== 'string_literal';
851
- imports.push({
852
- module: arg ? arg.text.replace(/^["']|["']$/g, '') : null,
853
- names: [],
854
- type: 'include',
855
- dynamic,
856
- line: node.startPosition.row + 1
857
- });
851
+ const modulePath = arg ? arg.text.replace(/^["']|["']$/g, '') : null;
852
+ if (modulePath) {
853
+ imports.push({
854
+ module: modulePath,
855
+ names: [],
856
+ type: 'include',
857
+ dynamic,
858
+ line: node.startPosition.row + 1
859
+ });
860
+ }
858
861
  }
859
862
  }
860
863
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ucn",
3
- "version": "3.7.19",
3
+ "version": "3.7.20",
4
4
  "mcpName": "io.github.mleoca/ucn",
5
5
  "description": "Universal Code Navigator — AST-based call graph analysis for AI agents. Find callers, trace impact, detect dead code across JS/TS, Python, Go, Rust, Java, and HTML. CLI, MCP server, and agent skill.",
6
6
  "main": "index.js",