Skip to content

Commit

Permalink
fix: keep COFT with COT
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Oct 30, 2023
1 parent 2e719b2 commit 396f7e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/convert/transformers/decomposedMetadataTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { join } from 'path';
import { dirname, join } from 'path';
import { JsonMap } from '@salesforce/ts-types';
import { ensureArray } from '@salesforce/kit';
import { Messages } from '@salesforce/core';
Expand Down Expand Up @@ -127,6 +127,14 @@ export class DecomposedMetadataTransformer extends BaseMetadataTransformer {
});
this.setDecomposedState(childComponent, { foundMerge: true });
}
// If we have a parent and the child is unaddressable without the parent, keep them
// together on the file system, meaning a new child will not be written to the default dir.
else if (childType.unaddressableWithoutParent) {
// get output path from parent
const childFileName = `${entryName}.${childComponent.type.suffix}${META_XML_SUFFIX}`;
const output = join(dirname(mergeWith.xml as string), childFileName);
writeInfos.push({ source, output });
}
// if no child component is found to merge with yet, mark it as so in
// the state
else if (!this.getDecomposedState(childComponent)?.foundMerge) {
Expand Down

2 comments on commit 396f7e6

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 396f7e6 Previous: 3036227 Ratio
eda-componentSetCreate-linux 290 ms 239 ms 1.21
eda-sourceToMdapi-linux 8268 ms 7973 ms 1.04
eda-sourceToZip-linux 5274 ms 5618 ms 0.94
eda-mdapiToSource-linux 3592 ms 3320 ms 1.08
lotsOfClasses-componentSetCreate-linux 557 ms 506 ms 1.10
lotsOfClasses-sourceToMdapi-linux 9472 ms 8450 ms 1.12
lotsOfClasses-sourceToZip-linux 6564 ms 6849 ms 0.96
lotsOfClasses-mdapiToSource-linux 3692 ms 3450 ms 1.07
lotsOfClassesOneDir-componentSetCreate-linux 864 ms 730 ms 1.18
lotsOfClassesOneDir-sourceToMdapi-linux 10255 ms 10610 ms 0.97
lotsOfClassesOneDir-sourceToZip-linux 9925 ms 10616 ms 0.93
lotsOfClassesOneDir-mdapiToSource-linux 5294 ms 5595 ms 0.95

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

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 396f7e6 Previous: 3036227 Ratio
eda-componentSetCreate-win32 747 ms 432 ms 1.73
eda-sourceToMdapi-win32 11107 ms 8132 ms 1.37
eda-sourceToZip-win32 7816 ms 6505 ms 1.20
eda-mdapiToSource-win32 10663 ms 6615 ms 1.61
lotsOfClasses-componentSetCreate-win32 1723 ms 999 ms 1.72
lotsOfClasses-sourceToMdapi-win32 18685 ms 13479 ms 1.39
lotsOfClasses-sourceToZip-win32 11247 ms 8028 ms 1.40
lotsOfClasses-mdapiToSource-win32 13642 ms 8693 ms 1.57
lotsOfClassesOneDir-componentSetCreate-win32 3001 ms 1626 ms 1.85
lotsOfClassesOneDir-sourceToMdapi-win32 31790 ms 19425 ms 1.64
lotsOfClassesOneDir-sourceToZip-win32 16789 ms 12260 ms 1.37
lotsOfClassesOneDir-mdapiToSource-win32 25099 ms 14950 ms 1.68

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

Please sign in to comment.