Skip to main content

Project

Index

Constructors

constructor

Properties

publicaccessibleLocators

accessibleLocators: Set<LocatorHash> = ...

publicconditionalLocators

conditionalLocators: Set<LocatorHash> = ...

publicreadonlyconfiguration

configuration: Configuration

publicreadonlycwd

publicdisabledLocators

disabledLocators: Set<LocatorHash> = ...

publicinstallStateChecksum

installStateChecksum: null | string = null

publiclinkersCustomData

linkersCustomData: Map<string, unknown> = ...

Contains whatever data the linkers (cf Linker.ts) want to persist from an install to another.

publiclockFileChecksum

lockFileChecksum: null | string = null

Those checksums are used to detect whether the relevant files actually changed since we last read them (to skip part of their generation).

publiclockfileLastVersion

lockfileLastVersion: null | number = null

If true, the data contained within originalPackages are from a different lockfile version and need to be refreshed.

publiclockfileNeedsRefresh

lockfileNeedsRefresh: boolean = false

publicoptionalBuilds

optionalBuilds: Set<LocatorHash> = ...

publicoriginalPackages

originalPackages: Map<LocatorHash, Package> = ...

publicpeerRequirementNodes

peerRequirementNodes: Map<string, PeerRequirementNode> = ...

publicpeerRequirements

peerRequirements: Map<string, PeerRequirement> = ...

Populated by the resolveEverything method. Not stored inside the install state.

The map keys are 6 hexadecimal characters except the first one, always p.

publicpeerWarnings

peerWarnings: PeerWarning[] = []

publicresolutionAliases

resolutionAliases: Map<DescriptorHash, DescriptorHash> = ...

Is meant to be populated by the consumer. Should the descriptor referenced by the key be requested, the descriptor referenced in the value will be resolved instead. The resolved data will then be used as final resolution for the initial descriptor.

Note that the lockfile will contain the second descriptor but not the first one (meaning that if you remove the alias during a subsequent install, it'll be lost and the real package will be resolved / installed).

publicskippedBuilds

skippedBuilds: Set<LocatorHash> = ...

publicstoredBuildState

storedBuildState: Map<LocatorHash, string> = ...

publicstoredChecksums

storedChecksums: Map<LocatorHash, string> = ...

publicstoredDescriptors

storedDescriptors: Map<DescriptorHash, Descriptor> = ...

publicstoredPackages

storedPackages: Map<LocatorHash, Package> = ...

publicstoredResolutions

storedResolutions: Map<DescriptorHash, LocatorHash> = ...

publicworkspaces

workspaces: Workspace[] = []

publicworkspacesByCwd

workspacesByCwd: Map<PortablePath, Workspace> = ...

publicworkspacesByIdent

workspacesByIdent: Map<IdentHash, Workspace> = ...

Accessors

topLevelWorkspace

Methods

applyLightResolution

  • applyLightResolution(): Promise<void>
  • Returns Promise<void>

cacheCleanup

  • cacheCleanup(__namedParameters: Pick<InstallOptions, report | cache>): Promise<null | { count: number; size: number }>
  • Parameters

    • __namedParameters: Pick<InstallOptions, report | cache>

    Returns Promise<null | { count: number; size: number }>

fetchEverything

  • fetchEverything(__namedParameters: InstallOptions): Promise<void>
  • Parameters

    • __namedParameters: InstallOptions

    Returns Promise<void>

findLocatorForLocation

  • findLocatorForLocation(cwd: PortablePath, __namedParameters?: { strict?: boolean }): Promise<null | Locator>
  • Parameters

    • cwd: PortablePath
    • __namedParameters: { strict?: boolean } = {}

    Returns Promise<null | Locator>

forgetResolution

  • forgetResolution(descriptor: Descriptor): void
  • forgetResolution(locator: Locator): void

forgetTransientResolutions

  • forgetTransientResolutions(): void
  • Returns void

forgetVirtualResolutions

  • forgetVirtualResolutions(): void
  • Returns void

generateLockfile

  • generateLockfile(): string
  • Returns string

getDependencyMeta

getWorkspaceByCwd

getWorkspaceByDescriptor

getWorkspaceByFilePath

getWorkspaceByIdent

getWorkspaceByLocator

install

  • install(opts: InstallOptions): Promise<void>
  • Parameters

    • opts: InstallOptions

    Returns Promise<void>

installWithNewReport

  • installWithNewReport(reportOpts: { json?: boolean; quiet?: boolean; stdout: Writable }, installOpts: Omit<InstallOptions, report>): Promise<0 | 1>
  • Parameters

    • reportOpts: { json?: boolean; quiet?: boolean; stdout: Writable }
    • installOpts: Omit<InstallOptions, report>

    Returns Promise<0 | 1>

linkEverything

  • linkEverything(__namedParameters: InstallOptions): Promise<void>
  • Parameters

    • __namedParameters: InstallOptions

    Returns Promise<void>

loadUserConfig

  • loadUserConfig(): Promise<any>
  • Returns Promise<any>

persist

  • persist(): Promise<void>
  • Returns Promise<void>

persistInstallStateFile

  • persistInstallStateFile(): Promise<void>
  • Returns Promise<void>

persistLockfile

  • persistLockfile(): Promise<void>
  • Returns Promise<void>

preparePackage

resolveEverything

  • resolveEverything(opts: Pick<InstallOptions, report | resolver | checkResolutions | mode> & ({ lockfileOnly: true; report: Report } | { cache: Cache; lockfileOnly?: boolean })): Promise<void>
  • Parameters

    • opts: Pick<InstallOptions, report | resolver | checkResolutions | mode> & ({ lockfileOnly: true; report: Report } | { cache: Cache; lockfileOnly?: boolean })

    Returns Promise<void>

restoreInstallState

  • restoreInstallState(__namedParameters?: RestoreInstallStateOpts): Promise<void>
  • Parameters

    • __namedParameters: RestoreInstallStateOpts = {}

    Returns Promise<void>

tryWorkspaceByCwd

tryWorkspaceByDescriptor

tryWorkspaceByFilePath

tryWorkspaceByIdent

tryWorkspaceByLocator

staticfind