Skip to content

Commit 819b2a9

Browse files
committed
refactor(migrations): reduce no change updates in logs
1 parent b7c1647 commit 819b2a9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

projects/igniteui-angular/migrations/common/UpdateChanges.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ export class UpdateChanges {
186186
const pos = positions[i];
187187
fileContent = fileContent.slice(0, pos.start) + change.replaceWith + fileContent.slice(pos.end);
188188
}
189-
this.host.overwrite(entryPath, fileContent);
189+
if (positions.length) {
190+
this.host.overwrite(entryPath, fileContent);
191+
}
190192
}
191193
}
192194
}
@@ -266,7 +268,7 @@ export class UpdateChanges {
266268
continue;
267269
}
268270
for (const match of matches) {
269-
if (match.indexOf(change.name)) {
271+
if (match.indexOf(change.name) !== -1) {
270272
const name = change.name.replace('$', '\\$');
271273
const reg = new RegExp(String.raw`^\s*${name}:`);
272274
const opening = `${change.owner}(`;

projects/igniteui-angular/migrations/migration-collection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
},
6464
"migration-13": {
6565
"version": "9.0.0",
66-
"description": "Updates Ignite UI for Angular from v8.2.x to v9.2.0",
66+
"description": "Updates Ignite UI for Angular from v8.2.x to v9.0.0",
6767
"factory": "./update-9_0_0"
6868
}
6969
}

0 commit comments

Comments
 (0)