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/**
92 * Resolve `config.fixed` glob groups to concrete package-name groups.
93 * Returns one entry per configured group (possibly empty if nothing matches).
94 */
95export function resolveFixedGroups(config: BumpyConfig, packageNames: Iterable<string>): string[][] {
96 const names = [...packageNames];
97 return config.fixed.map((group) => names.filter((name) => group.some((pattern) => matchGlob(name, pattern))));
98}
99
100/** Simple glob matching for package names (supports * and **) */
101export function matchGlob(name: string, pattern: string): boolean {
102 // Exact match
103 if (name === pattern) return true;
104 // Convert glob to regex
105 const regexStr = pattern
106 .replace(/[.+^${}()|[\]\\]/g, '\\$&') // escape regex special chars

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…