Skip to content

Commit 0eaced5

Browse files
committed
updateRelatedChangeType fixes
1 parent 15d160d commit 0eaced5

8 files changed

Lines changed: 274 additions & 413 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Remove redundant processing in updateRelatedChangeType, and other minor optimizations",
4+
"packageName": "beachball",
5+
"email": "elcraig@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

src/__fixtures__/packageInfos.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import { getDefaultOptions } from '../options/getDefaultOptions';
55

66
const defaultOptions = getDefaultOptions();
77

8+
export type PartialPackageInfos = {
9+
[name: string]: Partial<Omit<PackageInfo, 'combinedOptions'>> & { combinedOptions?: Partial<BeachballOptions> };
10+
};
11+
812
/**
913
* Makes a properly typed PackageInfos object from a partial object, filling in defaults:
1014
* ```
@@ -18,9 +22,7 @@ const defaultOptions = getDefaultOptions();
1822
* }
1923
* ```
2024
*/
21-
export function makePackageInfos(packageInfos: {
22-
[name: string]: Partial<Omit<PackageInfo, 'combinedOptions'>> & { combinedOptions?: Partial<BeachballOptions> };
23-
}): PackageInfos {
25+
export function makePackageInfos(packageInfos: PartialPackageInfos): PackageInfos {
2426
return _.mapValues(packageInfos, (info, name): PackageInfo => {
2527
const { combinedOptions, ...rest } = info;
2628
return {

0 commit comments

Comments
 (0)