Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netcracker/qubership-apihub-api-processor",
"version": "3.0.6",
"version": "3.0.6-feature-rename-semi-breaking-changes.0",
"description": "",
"license": "Apache-2.0",
"module": "dist/esm/src/index.js",
Expand Down Expand Up @@ -34,10 +34,10 @@
"release-finish": "release-finish"
},
"dependencies": {
"@netcracker/qubership-apihub-api-diff": "1.0.4",
"@netcracker/qubership-apihub-api-diff": "feature-rename-semi-breaking-changes",
"@netcracker/qubership-apihub-api-unifier": "1.0.4",
"@netcracker/qubership-apihub-json-crawl": "1.0.4",
"@netcracker/qubership-apihub-graphapi": "1.0.8",
"@netcracker/qubership-apihub-json-crawl": "1.0.4",
"adm-zip": "0.5.10",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
Expand Down
3 changes: 2 additions & 1 deletion src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
BREAKING_CHANGE_TYPE,
ChangeSummary,
DEPRECATED_CHANGE_TYPE,
NON_BREAKING_CHANGE_TYPE,
NON_BREAKING_CHANGE_TYPE, RISKY_CHANGE_SEVERITY,
SEMI_BREAKING_CHANGE_TYPE,
UNCLASSIFIED_CHANGE_TYPE,
} from './types'
Expand Down Expand Up @@ -133,6 +133,7 @@ export const NORMALIZE_OPTIONS: NormalizeOptions = {

export const EMPTY_CHANGE_SUMMARY: ChangeSummary = {
[BREAKING_CHANGE_TYPE]: 0,
[RISKY_CHANGE_SEVERITY]: 0,
[NON_BREAKING_CHANGE_TYPE]: 0,
[SEMI_BREAKING_CHANGE_TYPE]: 0,
[DEPRECATED_CHANGE_TYPE]: 0,
Expand Down
2 changes: 2 additions & 0 deletions src/types/external/comparison.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export const UNCLASSIFIED_CHANGE_TYPE = 'unclassified'
export const SEMI_BREAKING_CHANGE_TYPE = 'semi-breaking'
export const DEPRECATED_CHANGE_TYPE = 'deprecated'
export const ANNOTATION_CHANGE_TYPE = 'annotation'
export const RISKY_CHANGE_SEVERITY = 'risky'


export type ChangeSummary = Record<DiffType, number>
export type ImpactedOperationSummary = Record<DiffType, boolean>
Expand Down
4 changes: 3 additions & 1 deletion src/utils/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

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

export const calculateChangeSummary = (changes: Diff[]): ChangeSummary => ({
[BREAKING_CHANGE_TYPE]: countByType(BREAKING_CHANGE_TYPE, changes),
[RISKY_CHANGE_SEVERITY]: countByType(RISKY_CHANGE_SEVERITY, changes),
[NON_BREAKING_CHANGE_TYPE]: countByType(NON_BREAKING_CHANGE_TYPE, changes),
[UNCLASSIFIED_CHANGE_TYPE]: countByType(UNCLASSIFIED_CHANGE_TYPE, changes),
[SEMI_BREAKING_CHANGE_TYPE]: countByType(SEMI_BREAKING_CHANGE_TYPE, changes),
Expand All @@ -118,6 +119,7 @@ export const countByType = (changeType: string, changes: Diff[]): number => {
}

export const calculateImpactedSummary = (changeSummaries: ChangeSummary[]): ImpactedOperationSummary => ({
[RISKY_CHANGE_SEVERITY]: checkIfHaveChanges(RISKY_CHANGE_SEVERITY, changeSummaries),
[BREAKING_CHANGE_TYPE]: checkIfHaveChanges(BREAKING_CHANGE_TYPE, changeSummaries),
[NON_BREAKING_CHANGE_TYPE]: checkIfHaveChanges(NON_BREAKING_CHANGE_TYPE, changeSummaries),
[UNCLASSIFIED_CHANGE_TYPE]: checkIfHaveChanges(UNCLASSIFIED_CHANGE_TYPE, changeSummaries),
Expand Down