Skip to content

Commit 5ed405d

Browse files
committed
feat: warn about legacy suffix use
1 parent b6ed7dc commit 5ed405d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/convert/transformers/defaultMetadataTransformer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77
import { basename, dirname, join } from 'node:path';
8-
import { Messages } from '@salesforce/core';
8+
import { Messages } from '@salesforce/core/messages';
9+
import { Lifecycle } from '@salesforce/core/lifecycle';
910
import { SourcePath } from '../../common/types';
1011
import { META_XML_SUFFIX } from '../../common/constants';
1112
import { SfdxFileFormat, WriteInfo } from '../types';
@@ -118,6 +119,9 @@ const getXmlDestination = (
118119
}
119120
}
120121
if (legacySuffix && suffix && xmlDestination.includes(legacySuffix)) {
122+
void Lifecycle.getInstance().emitWarning(
123+
`The ${component.type.name} component ${component.fullName} uses the legacy suffix ${legacySuffix}. This suffix is deprecated and will be removed in a future release.`
124+
);
121125
xmlDestination = xmlDestination.replace(legacySuffix, suffix);
122126
}
123127
return xmlDestination;

0 commit comments

Comments
 (0)