Resolve merge conflicts with main

- extraction/index.ts: use picomatch with static import (replacing
  dynamic require) and keep normalizePath for other call sites
- utils.ts: keep normalizePath from main, take PR's PID-based FileLock
This commit is contained in:
Colby McHenry
2026-02-10 16:21:23 -06:00
8 changed files with 632 additions and 62 deletions
+4
View File
@@ -8,6 +8,7 @@ import * as fs from 'fs';
import * as path from 'path';
import picomatch from 'picomatch';
import { CodeGraphConfig, DEFAULT_CONFIG, Language, NodeKind } from './types';
import { normalizePath } from './utils';
/**
* Configuration filename
@@ -269,6 +270,9 @@ export function addCustomPattern(
* Check if a file path matches the include/exclude patterns
*/
export function shouldIncludeFile(filePath: string, config: CodeGraphConfig): boolean {
// Normalize to forward slashes so Windows backslash paths match glob patterns
filePath = normalizePath(filePath);
// Simple glob matching (for now, just check if any pattern matches)
// A full implementation would use a proper glob library