Skip to content

Commit 7e61acf

Browse files
author
Iurii Golovinskii
committed
fixed bug in summary and deleted mutation object summary
1 parent d47b436 commit 7e61acf

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/apitypes/rest/rest.changes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ async function reclassifyBreakingChanges(
144144
}
145145

146146

147-
// mark removed required status of the property as semi-breaking
147+
// mark removed required status of the property as risky
148148
if (diffs.length) {
149149
const requiredProperties = findRequiredRemovedProperties(mergedJso, diffs)
150150
//console.log('requiredProperties----->', requiredProperties)

src/utils/builder.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
DEPRECATED_CHANGE_TYPE,
2323
ImpactedOperationSummary,
2424
NON_BREAKING_CHANGE_TYPE,
25-
SEMI_BREAKING_CHANGE_TYPE,
2625
UNCLASSIFIED_CHANGE_TYPE,
2726
} from '../types'
2827
import { API_KIND } from '../consts'

src/utils/transformToDto.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,16 @@ export function replacePropertyInChangesSummary<
197197
if (Object.prototype.hasOwnProperty.call(obj, origin)) {
198198
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
199199
// @ts-ignore
200-
obj[override] = obj[origin]
200+
const copyObj= {...obj}
201201
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
202202
// @ts-ignore
203-
delete obj[origin]
203+
copyObj[override] = copyObj[origin]
204204
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
205205
// @ts-ignore
206-
return obj
206+
delete copyObj[origin]
207+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
208+
// @ts-ignore
209+
return copyObj
207210
} else {
208211
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
209212
// @ts-ignore

test/helpers/registry/local.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
BuilderResolvers,
2424
BuildResult,
2525
ChangeSummary,
26-
EMPTY_CHANGE_SUMMARY, EMPTY_CHANGE_SUMMARY_DTO,
26+
EMPTY_CHANGE_SUMMARY,
2727
FILE_FORMAT,
2828
GRAPHQL_API_TYPE,
2929
graphqlApiBuilder, MESSAGE_SEVERITY,

0 commit comments

Comments
 (0)