(
name: string,
newVersion: string,
opts: Partial<
Pick<PlannedRelease, 'type' | 'oldVersion' | 'bumpFiles' | 'isDependencyBump' | 'isCascadeBump' | 'isGroupBump'>
> & {
bumpSources?: Array<{ name: string; newVersion: string; bumpType?: BumpType }>;
} = {},
)
| 52 | |
| 53 | /** Create a PlannedRelease for testing */ |
| 54 | export function makeRelease( |
| 55 | name: string, |
| 56 | newVersion: string, |
| 57 | opts: Partial< |
| 58 | Pick<PlannedRelease, 'type' | 'oldVersion' | 'bumpFiles' | 'isDependencyBump' | 'isCascadeBump' | 'isGroupBump'> |
| 59 | > & { |
| 60 | bumpSources?: Array<{ name: string; newVersion: string; bumpType?: BumpType }>; |
| 61 | } = {}, |
| 62 | ): PlannedRelease { |
| 63 | return { |
| 64 | name, |
| 65 | type: opts.type ?? 'patch', |
| 66 | oldVersion: opts.oldVersion ?? '0.0.0', |
| 67 | newVersion, |
| 68 | bumpFiles: opts.bumpFiles ?? [], |
| 69 | isDependencyBump: opts.isDependencyBump ?? false, |
| 70 | isCascadeBump: opts.isCascadeBump ?? false, |
| 71 | isGroupBump: opts.isGroupBump ?? false, |
| 72 | bumpSources: (opts.bumpSources ?? []).map((s) => ({ ...s, bumpType: s.bumpType ?? opts.type ?? 'patch' })), |
| 73 | }; |
| 74 | } |
| 75 | |
| 76 | /** Create a BumpFile for testing */ |
| 77 | export function makeBumpFile( |
no outgoing calls
no test coverage detected
searching dependent graphs…