Skip to content

Commit 466893e

Browse files
author
Iurii Golovinskii
committed
[FE] Rename Semi-breaking chang
1 parent a1e5ed1 commit 466893e

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netcracker/qubership-apihub-api-processor",
3-
"version": "3.0.6",
3+
"version": "3.0.6-feature-rename-semi-breaking-changes.0",
44
"description": "",
55
"license": "Apache-2.0",
66
"module": "dist/esm/src/index.js",

src/consts.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
BREAKING_CHANGE_TYPE,
2121
ChangeSummary,
2222
DEPRECATED_CHANGE_TYPE,
23-
NON_BREAKING_CHANGE_TYPE,
23+
NON_BREAKING_CHANGE_TYPE, RISKY_CHANGE_SEVERITY,
2424
SEMI_BREAKING_CHANGE_TYPE,
2525
UNCLASSIFIED_CHANGE_TYPE,
2626
} from './types'
@@ -133,6 +133,7 @@ export const NORMALIZE_OPTIONS: NormalizeOptions = {
133133

134134
export const EMPTY_CHANGE_SUMMARY: ChangeSummary = {
135135
[BREAKING_CHANGE_TYPE]: 0,
136+
[RISKY_CHANGE_SEVERITY]: 0,
136137
[NON_BREAKING_CHANGE_TYPE]: 0,
137138
[SEMI_BREAKING_CHANGE_TYPE]: 0,
138139
[DEPRECATED_CHANGE_TYPE]: 0,

src/types/external/comparison.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export const UNCLASSIFIED_CHANGE_TYPE = 'unclassified'
5151
export const SEMI_BREAKING_CHANGE_TYPE = 'semi-breaking'
5252
export const DEPRECATED_CHANGE_TYPE = 'deprecated'
5353
export const ANNOTATION_CHANGE_TYPE = 'annotation'
54+
export const RISKY_CHANGE_SEVERITY = 'risky'
55+
5456

5557
export type ChangeSummary = Record<DiffType, number>
5658
export type ImpactedOperationSummary = Record<DiffType, boolean>

src/utils/builder.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { ApiAudienceTransition } from './../types/external/comparison'
17+
import { ApiAudienceTransition, RISKY_CHANGE_SEVERITY } from './../types/external/comparison'
1818
import { ApiKind, ChangeSummary, ResolvedOperation } from '../types'
1919
import {
2020
ANNOTATION_CHANGE_TYPE,
@@ -106,6 +106,7 @@ export const removeSecurityDuplicates = (originalArray: any[]): any[] => {
106106

107107
export const calculateChangeSummary = (changes: Diff[]): ChangeSummary => ({
108108
[BREAKING_CHANGE_TYPE]: countByType(BREAKING_CHANGE_TYPE, changes),
109+
[RISKY_CHANGE_SEVERITY]: countByType(RISKY_CHANGE_SEVERITY, changes),
109110
[NON_BREAKING_CHANGE_TYPE]: countByType(NON_BREAKING_CHANGE_TYPE, changes),
110111
[UNCLASSIFIED_CHANGE_TYPE]: countByType(UNCLASSIFIED_CHANGE_TYPE, changes),
111112
[SEMI_BREAKING_CHANGE_TYPE]: countByType(SEMI_BREAKING_CHANGE_TYPE, changes),
@@ -118,6 +119,7 @@ export const countByType = (changeType: string, changes: Diff[]): number => {
118119
}
119120

120121
export const calculateImpactedSummary = (changeSummaries: ChangeSummary[]): ImpactedOperationSummary => ({
122+
[RISKY_CHANGE_SEVERITY]: checkIfHaveChanges(RISKY_CHANGE_SEVERITY, changeSummaries),
121123
[BREAKING_CHANGE_TYPE]: checkIfHaveChanges(BREAKING_CHANGE_TYPE, changeSummaries),
122124
[NON_BREAKING_CHANGE_TYPE]: checkIfHaveChanges(NON_BREAKING_CHANGE_TYPE, changeSummaries),
123125
[UNCLASSIFIED_CHANGE_TYPE]: checkIfHaveChanges(UNCLASSIFIED_CHANGE_TYPE, changeSummaries),

0 commit comments

Comments
 (0)