Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
albertxavier100 committed Jun 18, 2024
1 parent 4a81ecd commit 55ca966
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions tools/js-sdk-release-tools/src/changelog/changelogGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,10 @@ const findRemovedOperationGroup = (metaDataOld: TSExportedMetaData, metaDataNew:
): string[] => {
const oldToNew = getRenamedOperationGroupFromToMap(metaDataOld);
const removedOperationGroup: string[] = [];
Object.keys(metaDataOld.operationInterface).forEach(operationGroup => {
const newName = oldSdkType === newSdkType ? operationGroup : oldToNew[operationGroup];
if (!metaDataNew.operationInterface[newName]) {
removedOperationGroup.push('Removed operation group ' + operationGroup);
Object.keys(metaDataOld.operationInterface).forEach(oldOperationGroup => {
const newOperationGroup = oldSdkType === newSdkType ? oldOperationGroup : oldToNew[oldOperationGroup];
if (!metaDataNew.operationInterface[newOperationGroup]) {
removedOperationGroup.push('Removed operation group ' + oldOperationGroup);
}
});
return removedOperationGroup;
Expand Down Expand Up @@ -500,7 +500,6 @@ const findOperationSignatureChange = (metaDataOld: TSExportedMetaData, metaDataN
const newOpNameSet = new Set<string>(newOpNames);
const unchangeOperationNames = oldOpNames.filter(opName => newOpNameSet.has(opName)).map(opName => opName);
logger.logWarn(`${unchangeOperationNames} operation names aren't changed, but signature may change, please check manually.`);
// todo
return;
}

Expand All @@ -511,12 +510,7 @@ const findOperationSignatureChange = (metaDataOld: TSExportedMetaData, metaDataN
const newOpNames = operationGroupFromNew.properties.map(m => m.name);
const newOpNameSet = new Set<string>(newOpNames);
const unchangeOperationNames = oldOpNames.filter(opName => newOpNameSet.has(opName)).map(opName => opName);
operationGroupFromOld.properties.forEach(pOld => {
const pNew = operationGroupFromNew.properties.find(v => v.name === pOld.name);
if (!pNew) { return; }
// todo
});
// TODO
logger.logWarn(`${unchangeOperationNames} operation names aren't changed, but signature may change, please check manually.`);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion tools/js-sdk-release-tools/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@
"skipLibCheck": true /* Skip type checking of declaration files. */,
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
},
"exclude": ["src/test/testCases/**"]
"exclude": ["src/test/testCases/**", "vitest.config.ts"]
}

0 comments on commit 55ca966

Please sign in to comment.