diff --git a/src/convert/streams.ts b/src/convert/streams.ts index d0cd370ed8..5800aa4af8 100644 --- a/src/convert/streams.ts +++ b/src/convert/streams.ts @@ -139,9 +139,6 @@ export class StandardWriter extends ComponentWriter { // queue is empty when that call exits and overall less memory is consumed. await Promise.all( chunk.writeInfos.map((info: WriteInfo) => { - // assertion logic: the rootDestination is required in this subclass of ComponentWriter but the super doesn't know that - // the eslint comment should remain until strictMode is fully implemented - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion const fullDest = isAbsolute(info.output) ? info.output : join(this.rootDestination as string, info.output); if (!existsSync(fullDest)) { for (const ignoredPath of this.forceIgnoredPaths) { diff --git a/src/resolve/adapters/decomposedSourceAdapter.ts b/src/resolve/adapters/decomposedSourceAdapter.ts index 6600060f2c..27a82d2790 100644 --- a/src/resolve/adapters/decomposedSourceAdapter.ts +++ b/src/resolve/adapters/decomposedSourceAdapter.ts @@ -89,7 +89,7 @@ export class DecomposedSourceAdapter extends MixedContentSourceAdapter { const childTypeId = this.type.children?.suffixes?.[metaXml.suffix]; const triggerIsAChild = !!childTypeId; const strategy = this.type.strategies?.decomposition; - + // look at changing this if (triggerIsAChild && this.type.children && !this.type.children.types[childTypeId].unaddressableWithoutParent) { if (strategy === DecompositionStrategy.FolderPerType || isResolvingSource) { let parent = component; @@ -115,6 +115,24 @@ export class DecomposedSourceAdapter extends MixedContentSourceAdapter { this.forceIgnore ); } + } else if ( + triggerIsAChild && + this.type.children && + this.type.children.types[childTypeId].unaddressableWithoutParent + ) { + let parent = component; + if (!parent) { + parent = new SourceComponent( + { + name: baseName(pathToContent), + type: this.type.children.types[childTypeId], + }, + this.tree, + this.forceIgnore + ); + } + parent.content = pathToContent; + return parent; } else if (!component) { // This is most likely metadata found within a CustomObject folder that is not a // child type of CustomObject. E.g., Layout, SharingRules, ApexClass. diff --git a/yarn.lock b/yarn.lock index bc1d2ff78f..e1055483c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -618,7 +618,7 @@ typescript "^4.9.5" wireit "^0.9.5" -"@salesforce/kit@^3.0.11", "@salesforce/kit@^3.0.13": +"@salesforce/kit@^3.0.13": version "3.0.13" resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-3.0.13.tgz#10b47ad6e0e27c3a9f97eb6a5cdcfffa9ba1f163" integrity sha512-HLQ5L5bBi0tsMeH5ZHJAhHUpvNUNPQoNJt2O82Jf6C60GGsrlzwzQ5ONAHGNBgKSZ7HLr0UGL5xaA+hE9uOcgw==