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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user