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

Function applyCascadeFrom

packages/bumpy/src/core/release-plan.ts:436–455  ·  view source on GitHub ↗

* Apply consumer-side cascadeFrom rules. * Scans all packages for cascadeFrom entries where the pattern matches the bumped source. * Returns true if any bump was applied.

(
  sourceName: string,
  sourceType: BumpType,
  packages: Map<string, WorkspacePackage>,
  planned: Map<string, PlannedBump>,
)

Source from the content-addressed store, hash-verified

434 sourcePackageName: string,
435): boolean {
436 const existing = planned.get(name);
437 if (existing) {
438 const newType = maxBump(existing.type, type);
439 if (newType === existing.type) return false;
440 existing.type = newType;
441 if (isDependencyBump) existing.isDependencyBump = true;
442 if (isCascadeBump) existing.isCascadeBump = true;
443 existing.bumpSources.set(sourcePackageName, type);
444 return true;
445 }
446 planned.set(name, {
447 type,
448 isDependencyBump,
449 isCascadeBump,
450 isGroupBump: false,
451 bumpFiles: new Set(),
452 bumpSources: new Map([[sourcePackageName, type]]),
453 });
454 return true;
455}
456
457/**
458 * Apply normalized cascade rules (used for both cascadeTo and cascadeFrom).

Callers 1

assembleReleasePlanFunction · 0.85

Calls 4

matchGlobFunction · 0.90
cascadeFromRulesFunction · 0.85
shouldTriggerFunction · 0.85
applyBumpFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…