Skip to main content

@yarnpkg/nm/hoist

Index

Functions

hoist

  • Hoists package tree.

    The root node of a tree must has id: '.'. This function does not mutate its arguments, it hoists and returns tree copy.


    Parameters

    Returns HoisterResult

    hoisted tree copy

Type Aliases

HoistOptions

HoistOptions: { check?: boolean; debugLevel?: DebugLevel; hoistingLimits?: Map<Locator, Set<PackageName>> }

Type declaration

  • optionalcheck?: boolean

    Runs self-checks after hoisting is finished

  • optionaldebugLevel?: DebugLevel

    Debug level

  • optionalhoistingLimits?: Map<Locator, Set<PackageName>>

    Hoist borders are defined by parent node locator and its dependency name. The dependency is considered a border, nothing can be hoisted past this dependency, but dependency can be hoisted

HoisterResult

HoisterResult: { dependencies: Set<HoisterResult>; identName: PackageName; name: PackageName; references: Set<string> }

Type declaration

  • dependencies: Set<HoisterResult>
  • identName: PackageName
  • name: PackageName
  • references: Set<string>

HoisterTree

HoisterTree: { dependencies: Set<HoisterTree>; dependencyKind?: HoisterDependencyKind; hoistPriority?: number; identName: PackageName; name: PackageName; peerNames: Set<PackageName>; reference: string }

Type declaration

  • dependencies: Set<HoisterTree>
  • optionaldependencyKind?: HoisterDependencyKind
  • optionalhoistPriority?: number
  • identName: PackageName
  • name: PackageName
  • peerNames: Set<PackageName>
  • reference: string