From e13297c4643217f698b9777d2ee3e24f045717c5 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Fri, 9 Aug 2024 08:21:44 -0500 Subject: [PATCH] fix: limit special label handling to original (non-preset) --- src/sourceTracking.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sourceTracking.ts b/src/sourceTracking.ts index 4e218632..b38b31c3 100644 --- a/src/sourceTracking.ts +++ b/src/sourceTracking.ts @@ -401,11 +401,14 @@ export class SourceTracking extends AsyncCreatable { ) ); + // original CustomLabels behavior + const nonDecomposedLabels = this.registry.getTypeByName('customlabel').strategies?.transformer === 'nonDecomposed'; + const filenames = Array.from(sourceComponentByFileName.keys()); // delete the files await Promise.all( filenames.map((filename) => - sourceComponentByFileName.get(filename)?.type.id === 'customlabel' + sourceComponentByFileName.get(filename)?.type.id === 'customlabel' && nonDecomposedLabels ? deleteCustomLabels(filename, changesToDelete.filter(sourceComponentIsCustomLabel)) : fs.promises.unlink(filename) )