@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.
@@ -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
- const found = componentPolicy.find(dep.id);
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;