MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / matchGlob

Function matchGlob

packages/bumpy/src/core/config.ts:92–103  ·  view source on GitHub ↗
(name: string, pattern: string)

Source from the content-addressed store, hash-verified

90
91/** Simple glob matching for package names (supports * and **) */
92export 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
105function mergeConfig(defaults: BumpyConfig, user: Partial<BumpyConfig>): BumpyConfig {
106 return {

Callers 13

config.test.tsFile · 0.90
assembleReleasePlanFunction · 0.90
applyCascadeRulesFunction · 0.90
applyCascadeFromFunction · 0.90
statusCommandFunction · 0.85
channelStatusFunction · 0.85
publishCommandFunction · 0.85
publishChannelFunction · 0.85
publishSnapshotFunction · 0.85
findPackageConfigFunction · 0.85
isCustomCommandAllowedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…