Skip to content

Commit

Permalink
fix: Rename asserthighestChainIDChanges to assertHighestChainIdChanges (
Browse files Browse the repository at this point in the history
#990)

- Fix function name to follow TypeScript naming conventions
- Use consistent camelCase style
  • Loading branch information
crStiv authored Feb 20, 2025
1 parent 22598ef commit 25c44dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/review/diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function hasChangeTypes(changes: parseDiff.Chunk['changes'], types: string[]): b
*
* @param changes The changes in the diff patch.
*/
function asserthighestChainIDChanges(changes: parseDiff.Chunk['changes']) {
function assertHighestChainIdChanges(changes: parseDiff.Chunk['changes']) {
assert(hasChangeTypes(changes, ['del', 'add', 'add']));
assert(changes[0].content.replace(/^-(.*)/, '+$1,') === changes[1].content);
}
Expand Down Expand Up @@ -119,7 +119,7 @@ async function main() {
// Check to see if the changes are valid and set any edge case flags.
const changes = chunks.flatMap(({ changes }) => changes.filter(({ type }) => type === 'add' || type === 'del'));
if (additions === 2 && deletions === 1) {
asserthighestChainIDChanges(changes);
assertHighestChainIdChanges(changes);
} else if (additions === 1 && deletions === 1) {
additionalDeploymentToSameChainId(changes);
} else if (additions !== 1 || deletions !== 0) {
Expand Down

0 comments on commit 25c44dc

Please sign in to comment.