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

Function findPackageConfig

packages/bumpy/src/core/config.ts:81–89  ·  view source on GitHub ↗

Find a package config from the root config, supporting glob patterns

(config: BumpyConfig, pkgName: string)

Source from the content-addressed store, hash-verified

79
80/** Find a package config from the root config, supporting glob patterns */
81function findPackageConfig(config: BumpyConfig, pkgName: string): PackageConfig {
82 // Exact match first
83 if (config.packages[pkgName]) return config.packages[pkgName];
84 // Try glob matches
85 for (const [pattern, pkgConfig] of Object.entries(config.packages)) {
86 if (matchGlob(pkgName, pattern)) return pkgConfig;
87 }
88 return {};
89}
90
91/** Simple glob matching for package names (supports * and **) */
92export function matchGlob(name: string, pattern: string): boolean {

Callers 1

loadPackageConfigFunction · 0.85

Calls 1

matchGlobFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…