@teambit/dependency-resolver 1.0.201 → 1.0.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +31 -31
- package/artifacts/preview/teambit_dependencies_dependency_resolver-preview.js +1 -1
- package/artifacts/schema.json +1040 -1040
- package/dist/dependency-resolver.main.runtime.js +5 -1
- package/dist/dependency-resolver.main.runtime.js.map +1 -1
- package/dist/{preview-1710904765683.js → preview-1710991124101.js} +2 -2
- package/package.json +13 -13
|
@@ -478,7 +478,11 @@ class DependencyResolverMain {
|
|
|
478
478
|
const listFactory = this.getDependencyListFactory();
|
|
479
479
|
const dependencyList = await listFactory.fromLegacyComponent(legacyComponent);
|
|
480
480
|
dependencyList.forEach(dep => {
|
|
481
|
-
|
|
481
|
+
let found = componentPolicy.find(dep.id);
|
|
482
|
+
if (!found) {
|
|
483
|
+
const packageName = dep?.getPackageName?.();
|
|
484
|
+
found = packageName ? componentPolicy.find(packageName) : undefined;
|
|
485
|
+
}
|
|
482
486
|
// if no policy found, the dependency was auto-resolved from the source code
|
|
483
487
|
dep.source = found?.source || 'auto';
|
|
484
488
|
dep.hidden = found?.hidden;
|