Skip to content

Commit

Permalink
fix: check stric types for suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiand391 committed Nov 4, 2024
1 parent e45beb6 commit 648551b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/resolve/metadataResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,16 @@ const parseAsContentMetadataXml =
const suffixType = registry.getTypeBySuffix(extName(fsPath));
if (!suffixType) return false;

return fsPath.split(sep).includes(suffixType.directoryName);
const matchesSuffixType = fsPath.split(sep).includes(suffixType.directoryName);
if (matchesSuffixType) return matchesSuffixType;

// it might be a type that requires strict parent folder name.
const strictFolderSuffixType = registry
.getStrictFolderTypes()
.find((l) => l.suffix === suffixType.suffix && l.directoryName && l.name !== suffixType.name);
if (!strictFolderSuffixType) return false;

return fsPath.split(sep).includes(strictFolderSuffixType.directoryName);
};

/**
Expand Down

2 comments on commit 648551b

@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: 648551b Previous: 316666d Ratio
eda-componentSetCreate-linux 215 ms 231 ms 0.93
eda-sourceToMdapi-linux 2006 ms 2231 ms 0.90
eda-sourceToZip-linux 1771 ms 1840 ms 0.96
eda-mdapiToSource-linux 2681 ms 3034 ms 0.88
lotsOfClasses-componentSetCreate-linux 431 ms 418 ms 1.03
lotsOfClasses-sourceToMdapi-linux 3563 ms 3740 ms 0.95
lotsOfClasses-sourceToZip-linux 2880 ms 3200 ms 0.90
lotsOfClasses-mdapiToSource-linux 3331 ms 3563 ms 0.93
lotsOfClassesOneDir-componentSetCreate-linux 741 ms 753 ms 0.98
lotsOfClassesOneDir-sourceToMdapi-linux 6199 ms 6619 ms 0.94
lotsOfClassesOneDir-sourceToZip-linux 5052 ms 5593 ms 0.90
lotsOfClassesOneDir-mdapiToSource-linux 5996 ms 6504 ms 0.92

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: 648551b Previous: 316666d Ratio
eda-componentSetCreate-win32 602 ms 648 ms 0.93
eda-sourceToMdapi-win32 3622 ms 4289 ms 0.84
eda-sourceToZip-win32 2816 ms 2919 ms 0.96
eda-mdapiToSource-win32 5383 ms 5701 ms 0.94
lotsOfClasses-componentSetCreate-win32 1291 ms 1172 ms 1.10
lotsOfClasses-sourceToMdapi-win32 7537 ms 8007 ms 0.94
lotsOfClasses-sourceToZip-win32 4668 ms 5170 ms 0.90
lotsOfClasses-mdapiToSource-win32 7460 ms 7539 ms 0.99
lotsOfClassesOneDir-componentSetCreate-win32 2113 ms 2070 ms 1.02
lotsOfClassesOneDir-sourceToMdapi-win32 13166 ms 13943 ms 0.94
lotsOfClassesOneDir-sourceToZip-win32 8342 ms 9103 ms 0.92
lotsOfClassesOneDir-mdapiToSource-win32 13285 ms 13854 ms 0.96

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

Please sign in to comment.