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

Function normalizeCascadeConfig

packages/bumpy/src/types.ts:41–53  ·  view source on GitHub ↗
(config: CascadeConfig)

Source from the content-addressed store, hash-verified

39
40/** Normalize CascadeConfig into a consistent Record form with defaults applied */
41export function normalizeCascadeConfig(config: CascadeConfig): Record<string, Required<CascadeRule>> {
42 const result: Record<string, Required<CascadeRule>> = {};
43 if (Array.isArray(config)) {
44 for (const name of config) {
45 result[name] = { trigger: 'patch', bumpAs: 'match' };
46 }
47 } else {
48 for (const [name, rule] of Object.entries(config)) {
49 result[name] = { trigger: rule.trigger ?? 'patch', bumpAs: rule.bumpAs ?? 'match' };
50 }
51 }
52 return result;
53}
54
55export const DEFAULT_BUMP_RULES: Record<string, DependencyBumpRule | false> = {
56 dependencies: { trigger: 'patch', bumpAs: 'patch' },

Callers 3

assembleReleasePlanFunction · 0.90
cascadeFromRulesFunction · 0.90
mergePackageConfigFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…