Skip to content

Commit 7d860ce

Browse files
committed
fix: remove unnecessary fields
1 parent a0d5886 commit 7d860ce

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

src/components/compare/compare.operations.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,8 @@ async function compareCurrentApiType(
134134
const apiBuilder = ctx.apiBuilders.find((builder) => apiType === builder.apiType)
135135
if (!apiBuilder) { return null }
136136

137-
const [prevOperationTypesData, currOperationTypesData] = getOperationTypesFromTwoVersions(prev, curr)
138-
139-
const prevOperationsCount = prevOperationTypesData.find(data => apiType === data.apiType)?.operationsCount
140-
const currOperationsCount = currOperationTypesData.find(data => apiType === data.apiType)?.operationsCount
141-
142-
const { operations: prevOperations = [] } = await versionOperationsResolver(apiType, prev?.version ?? '', prev?.packageId ?? '', undefined, false, prevOperationsCount) || {}
143-
const { operations: currOperations = [] } = await versionOperationsResolver(apiType, curr?.version ?? '', curr?.packageId ?? '', undefined, false, currOperationsCount) || {}
137+
const { operations: prevOperations = [] } = await versionOperationsResolver(apiType, prev?.version ?? '', prev?.packageId ?? '', undefined, false) || {}
138+
const { operations: currOperations = [] } = await versionOperationsResolver(apiType, curr?.version ?? '', curr?.packageId ?? '', undefined, false) || {}
144139

145140
const [prevReducedOperationIdToHashMap, prevReducedOperationIdToOriginal] = getOperationsHashMapByApiType(apiType, prevOperations, ctx)
146141
const [currReducedOperationIdToHashMap, currReducedOperationIdToOriginal] = getOperationsHashMapByApiType(apiType, currOperations, ctx, true)

src/types/external/operations.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export type VersionOperationsResolver = (
2727
packageId: PackageId,
2828
operationsIds?: OperationId[],
2929
includeData?: boolean,
30-
operationsCount?: number,
3130
) => Promise<ResolvedOperations | null>
3231

3332
export interface ResolvedOperations {

src/types/external/version.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import { ChangeSummary } from './comparison'
2020
export type VersionResolver = (
2121
packageId: PackageId,
2222
version: VersionId,
23-
includeOperations?: boolean,
24-
includeSummary?: boolean,
2523
) => Promise<ResolvedVersion | null>
2624

2725
export type ResolvedVersion = {

test/helpers/registry/local.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,10 @@ export class LocalRegistry implements IRegistry {
142142
{
143143
apiType: REST_API_TYPE,
144144
changesSummary: getChangesSummary(REST_API_TYPE),
145-
// todo
146-
// operationsCount: operations
147145
},
148146
{
149147
apiType: GRAPHQL_API_TYPE,
150148
changesSummary: getChangesSummary(GRAPHQL_API_TYPE),
151-
// todo
152-
// operationsCount:
153149
},
154150
],
155151
}

0 commit comments

Comments
 (0)