Skip to content

Commit

Permalink
op rename/deprecate opname changelog format
Browse files Browse the repository at this point in the history
  • Loading branch information
steam0r committed Dec 9, 2024
1 parent 12acba7 commit 049c48f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shared/api/utils/shared_ops_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -3496,14 +3496,15 @@ export default class SharedOpsUtil extends SharedUtil
}
}

const oldNameChangelog = oldName.replace(this.PREFIX_OPS, "");
if (jsonChange) jsonfile.writeFileSync(newJson, newJsonData, { "encoding": "utf-8", "spaces": 4 });
if (newName.includes(this.INFIX_DEPRECATED))
{
this.addOpChangelog(currentUser, newName, { "type": "deprecation", "message": "op " + oldName + " was deprecated" });
this.addOpChangelog(currentUser, newName, { "type": "deprecation", "message": "op " + oldNameChangelog + " was deprecated" });
}
else
{
this.addOpChangelog(currentUser, newName, { "type": "rename", "message": oldName + " renamed to " + newName });
this.addOpChangelog(currentUser, newName, { "type": "rename", "message": oldNameChangelog + " renamed to " + newName });
}

let updateOld = false;
Expand Down

0 comments on commit 049c48f

Please sign in to comment.