Skip to main content

Function: collectPeerDependencies()

function collectPeerDependencies(artifactsByGenerator, files): Record<string, Record<string, string>>;

Defined in: packages/core/src/writer/peers.ts:20

Namespace -> (package -> semver range). Per namespace, union the peerDependencies of every generator that emitted a file under <namespace>/<generatorName>/. Identical ranges de-duplicate; the same package with two different ranges from two generators throws OutputPeerConflictError (fail-fast). Namespace and package keys are sorted.

Parameters​

ParameterType
artifactsByGeneratorRecord<string, GeneratorArtifact>
filesVirtualFile[]

Returns​

Record<string, Record<string, string>>