Skip to content

Commit

Permalink
feat: warn about legacy suffix use
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Apr 26, 2024
1 parent b6ed7dc commit 5ed405d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/convert/transformers/defaultMetadataTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { basename, dirname, join } from 'node:path';
import { Messages } from '@salesforce/core';
import { Messages } from '@salesforce/core/messages';
import { Lifecycle } from '@salesforce/core/lifecycle';
import { SourcePath } from '../../common/types';
import { META_XML_SUFFIX } from '../../common/constants';
import { SfdxFileFormat, WriteInfo } from '../types';
Expand Down Expand Up @@ -118,6 +119,9 @@ const getXmlDestination = (
}
}
if (legacySuffix && suffix && xmlDestination.includes(legacySuffix)) {
void Lifecycle.getInstance().emitWarning(
`The ${component.type.name} component ${component.fullName} uses the legacy suffix ${legacySuffix}. This suffix is deprecated and will be removed in a future release.`
);
xmlDestination = xmlDestination.replace(legacySuffix, suffix);
}
return xmlDestination;
Expand Down

2 comments on commit 5ed405d

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 5ed405d Previous: c0941dd Ratio
eda-componentSetCreate-linux 189 ms 182 ms 1.04
eda-sourceToMdapi-linux 1922 ms 1945 ms 0.99
eda-sourceToZip-linux 1380 ms 1420 ms 0.97
eda-mdapiToSource-linux 2751 ms 2735 ms 1.01
lotsOfClasses-componentSetCreate-linux 363 ms 361 ms 1.01
lotsOfClasses-sourceToMdapi-linux 3611 ms 3753 ms 0.96
lotsOfClasses-sourceToZip-linux 3012 ms 3030 ms 0.99
lotsOfClasses-mdapiToSource-linux 3435 ms 3485 ms 0.99
lotsOfClassesOneDir-componentSetCreate-linux 625 ms 630 ms 0.99
lotsOfClassesOneDir-sourceToMdapi-linux 6445 ms 6534 ms 0.99
lotsOfClassesOneDir-sourceToZip-linux 5494 ms 5633 ms 0.98
lotsOfClassesOneDir-mdapiToSource-linux 6156 ms 6311 ms 0.98

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 5ed405d Previous: c0941dd Ratio
eda-componentSetCreate-win32 375 ms 407 ms 0.92
eda-sourceToMdapi-win32 3470 ms 3614 ms 0.96
eda-sourceToZip-win32 2151 ms 2162 ms 0.99
eda-mdapiToSource-win32 5707 ms 6384 ms 0.89
lotsOfClasses-componentSetCreate-win32 861 ms 832 ms 1.03
lotsOfClasses-sourceToMdapi-win32 7656 ms 7547 ms 1.01
lotsOfClasses-sourceToZip-win32 4790 ms 4756 ms 1.01
lotsOfClasses-mdapiToSource-win32 7697 ms 7490 ms 1.03
lotsOfClassesOneDir-componentSetCreate-win32 1498 ms 1504 ms 1.00
lotsOfClassesOneDir-sourceToMdapi-win32 13786 ms 14047 ms 0.98
lotsOfClassesOneDir-sourceToZip-win32 8746 ms 9098 ms 0.96
lotsOfClassesOneDir-mdapiToSource-win32 13582 ms 13951 ms 0.97

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.