(name: string, pattern: string)
| 90 | |
| 91 | /** Simple glob matching for package names (supports * and **) */ |
| 92 | export function matchGlob(name: string, pattern: string): boolean { |
| 93 | // Exact match |
| 94 | if (name === pattern) return true; |
| 95 | // Convert glob to regex |
| 96 | const regexStr = pattern |
| 97 | .replace(/[.+^${}()|[\]\\]/g, '\\$&') // escape regex special chars |
| 98 | .replace(/\*\*/g, '{{DOUBLE}}') // placeholder for ** |
| 99 | .replace(/\*/g, '[^/]*') // * matches anything except / |
| 100 | .replace(/{{DOUBLE}}/g, '.*'); // ** matches anything |
| 101 | const regex = new RegExp(`^${regexStr}$`); |
| 102 | return regex.test(name); |
| 103 | } |
| 104 | |
| 105 | function mergeConfig(defaults: BumpyConfig, user: Partial<BumpyConfig>): BumpyConfig { |
| 106 | return { |
no outgoing calls
no test coverage detected
searching dependent graphs…