ucn 3.1.6 → 3.1.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.

Potentially problematic release.


This version of ucn might be problematic. Click here for more details.

package/core/discovery.js CHANGED
@@ -371,7 +371,7 @@ function detectProjectPattern(projectRoot) {
371
371
  const entries = fs.readdirSync(projectRoot, { withFileTypes: true });
372
372
  for (const entry of entries) {
373
373
  if (entry.isDirectory() && !entry.name.startsWith('.') &&
374
- !EXCLUDED_DIRS.has(entry.name)) {
374
+ !shouldIgnore(entry.name, DEFAULT_IGNORES)) {
375
375
  checkDir(path.join(projectRoot, entry.name));
376
376
  }
377
377
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ucn",
3
- "version": "3.1.6",
3
+ "version": "3.1.7",
4
4
  "description": "Code navigation built by AI, for AI. Reduces context usage when working with large codebases.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -2881,6 +2881,30 @@ describe('Regression: Project detection with language markers', () => {
2881
2881
  fs.rmSync(tmpDir, { recursive: true, force: true });
2882
2882
  }
2883
2883
  });
2884
+
2885
+ it('should detect multi-language project (Go root + TS subdirectory)', () => {
2886
+ const tmpDir = path.join(require('os').tmpdir(), `ucn-test-multilang-${Date.now()}`);
2887
+ fs.mkdirSync(tmpDir, { recursive: true });
2888
+ fs.mkdirSync(path.join(tmpDir, 'web'), { recursive: true });
2889
+
2890
+ try {
2891
+ // Go at root
2892
+ fs.writeFileSync(path.join(tmpDir, 'go.mod'), 'module test\ngo 1.21');
2893
+ fs.writeFileSync(path.join(tmpDir, 'main.go'), 'package main\nfunc main() {}');
2894
+ // TypeScript in web/ subdirectory
2895
+ fs.writeFileSync(path.join(tmpDir, 'web', 'package.json'), '{"name": "web"}');
2896
+ fs.writeFileSync(path.join(tmpDir, 'web', 'App.tsx'), 'export function App() {}');
2897
+
2898
+ const { detectProjectPattern } = require('../core/discovery');
2899
+ const pattern = detectProjectPattern(tmpDir);
2900
+
2901
+ // Should detect BOTH Go and TypeScript
2902
+ assert.ok(pattern.includes('go'), 'Should detect Go files from root');
2903
+ assert.ok(pattern.includes('tsx'), 'Should detect TypeScript files from subdirectory');
2904
+ } finally {
2905
+ fs.rmSync(tmpDir, { recursive: true, force: true });
2906
+ }
2907
+ });
2884
2908
  });
2885
2909
 
2886
2910
  // ============================================================================