gitnexus 1.6.4-rc.6 → 1.6.4-rc.7

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.
@@ -13,8 +13,11 @@
13
13
  * `emitScopeCaptures`. Returns `undefined`; zero work done. This is
14
14
  * the state of every language today — `ParsedFile` production stays
15
15
  * dormant until a language migrates.
16
- * 2. Invokes the hook + feeds its output to `ScopeExtractor.extract`.
17
- * 3. **Swallows exceptions from either side.** A failure here returns
16
+ * 2. Short-circuits empty / whitespace-only files. There is no scope
17
+ * content to extract, and some tree-sitter queries do not match an
18
+ * otherwise valid empty root node.
19
+ * 3. Invokes the hook + feeds its output to `ScopeExtractor.extract`.
20
+ * 4. **Swallows exceptions from either side.** A failure here returns
18
21
  * `undefined` and emits a warning via `onWarn`; legacy parsing on
19
22
  * the same file continues unaffected by the scope-extraction miss.
20
23
  * Scope-based resolution is the new path under construction — it
@@ -13,8 +13,11 @@
13
13
  * `emitScopeCaptures`. Returns `undefined`; zero work done. This is
14
14
  * the state of every language today — `ParsedFile` production stays
15
15
  * dormant until a language migrates.
16
- * 2. Invokes the hook + feeds its output to `ScopeExtractor.extract`.
17
- * 3. **Swallows exceptions from either side.** A failure here returns
16
+ * 2. Short-circuits empty / whitespace-only files. There is no scope
17
+ * content to extract, and some tree-sitter queries do not match an
18
+ * otherwise valid empty root node.
19
+ * 3. Invokes the hook + feeds its output to `ScopeExtractor.extract`.
20
+ * 4. **Swallows exceptions from either side.** A failure here returns
18
21
  * `undefined` and emits a warning via `onWarn`; legacy parsing on
19
22
  * the same file continues unaffected by the scope-extraction miss.
20
23
  * Scope-based resolution is the new path under construction — it
@@ -29,6 +32,8 @@ import { extract as extractScope } from './scope-extractor.js';
29
32
  export function extractParsedFile(provider, sourceText, filePath, onWarn, cachedTree) {
30
33
  if (provider.emitScopeCaptures === undefined)
31
34
  return undefined;
35
+ if (sourceText.trim().length === 0)
36
+ return undefined;
32
37
  try {
33
38
  const captures = provider.emitScopeCaptures(sourceText, filePath, cachedTree);
34
39
  return extractScope(captures, filePath, provider);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexus",
3
- "version": "1.6.4-rc.6",
3
+ "version": "1.6.4-rc.7",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",