Skip to content

Commit 6df0335

Browse files
committed
feat: add comparison.previousOperationId
1 parent 5f2aa17 commit 6df0335

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/components/compare/compare.operations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ async function compareCurrentApiType(
322322
const changedOperation = {
323323
apiType,
324324
operationId: takeSubstringIf(!!currGroupSlug, operationsEntry.current.operationId, removeFirstSlash(currentGroup ?? '').length),
325+
previousOperationId: takeSubstringIf(!!prevGroupSlug, operationsEntry.previous.operationId, removeFirstSlash(previousGroup ?? '').length),
325326
dataHash: operationsEntry.current.dataHash,
326327
previousDataHash: operationsEntry.previous.dataHash,
327328
apiKind: operationsEntry.current.apiKind,

src/types/internal/compare.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export type OperationChangesMetadata = {
5050

5151
export interface OperationChanges {
5252
operationId: string
53+
previousOperationId?: string
5354
apiType: BuilderType
5455
apiKind?: ApiKind
5556
previousApiKind?: ApiKind

src/types/package/comparisons.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export interface PackageComparisonOperations {
4040

4141
export interface PackageComparisonOperation {
4242
operationId: OperationId
43+
previousOperationId?: OperationId
4344
dataHash?: string
4445
previousDataHash?: string
4546
changeSummary?: ChangeSummary

0 commit comments

Comments
 (0)