cli: skip diff of new package scripts

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-02-15 11:32:00 +01:00
parent 7410e12268
commit d9aa726fe1
+8
View File
@@ -173,6 +173,14 @@ class PackageJsonHandler {
return;
}
// Skip diffing package scripts that have been migrated to the new commands
const hasNewScript = Object.values(targetScripts).some(script =>
String(script).includes('backstage-cli script '),
);
if (hasNewScript) {
return;
}
for (const key of Object.keys(pkgScripts)) {
await this.syncField(key, pkgScripts, targetScripts, 'scripts');
}