Skip to content

resolveDependencyRepository

resolveDependencyRepository(packageRef, repositories, packageAliases?): ResolvedDependencyRepository | undefined

Defined in: simply-package-core/src/dependencyRepositoryResolver.ts:48

Find a dependency’s repository entry.

Tried in order, first match wins:

  1. the dependency’s package value, exactly;
  2. that value up to its first @, so a key such as fflib keeps matching after dependencies manage rewrites fflib@3.0.0-1 to fflib@3.1.0-2;
  3. the ID the value resolves to through packageAliases, and then every other alias (and alias prefix) for that same ID, which covers a dependency written as a bare 0Ho/04t ID.

string

The dependency’s package value: an alias or an ID.

DependencyRepositories

The project’s repository map.

Record<string, string> = {}

The project’s packageAliases.

ResolvedDependencyRepository | undefined

The matching entry, or undefined if there isn’t one.