Project
Index
Constructors
Properties
- accessibleLocators
- conditionalLocators
- configuration
- cwd
- disabledLocators
- installStateChecksum
- linkersCustomData
- lockFileChecksum
- lockfileLastVersion
- lockfileNeedsRefresh
- optionalBuilds
- originalPackages
- peerRequirementNodes
- peerRequirements
- peerWarnings
- resolutionAliases
- skippedBuilds
- storedBuildState
- storedChecksums
- storedDescriptors
- storedPackages
- storedResolutions
- workspaces
- workspacesByCwd
- workspacesByIdent
Accessors
Methods
- applyLightResolution
- cacheCleanup
- fetchEverything
- findLocatorForLocation
- forgetResolution
- forgetTransientResolutions
- forgetVirtualResolutions
- generateLockfile
- getDependencyMeta
- getWorkspaceByCwd
- getWorkspaceByDescriptor
- getWorkspaceByFilePath
- getWorkspaceByIdent
- getWorkspaceByLocator
- install
- installWithNewReport
- linkEverything
- loadUserConfig
- persist
- persistInstallStateFile
- persistLockfile
- preparePackage
- resolveEverything
- restoreInstallState
- tryWorkspaceByCwd
- tryWorkspaceByDescriptor
- tryWorkspaceByFilePath
- tryWorkspaceByIdent
- tryWorkspaceByLocator
- find
Constructors
constructor
Parameters
projectCwd: PortablePath
__namedParameters: { configuration: Configuration }
Returns Project
Properties
publicaccessibleLocators
publicconditionalLocators
publicreadonlyconfiguration
publicreadonlycwd
publicdisabledLocators
publicinstallStateChecksum
publiclinkersCustomData
publiclockFileChecksum
Those checksums are used to detect whether the relevant files actually changed since we last read them (to skip part of their generation).
publiclockfileLastVersion
If true, the data contained within originalPackages
are from a different
lockfile version and need to be refreshed.
publiclockfileNeedsRefresh
publicoptionalBuilds
publicoriginalPackages
publicpeerRequirementNodes
publicpeerRequirements
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
publicresolutionAliases
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
publicstoredBuildState
publicstoredChecksums
publicstoredDescriptors
publicstoredPackages
publicstoredResolutions
publicworkspaces
publicworkspacesByCwd
publicworkspacesByIdent
Accessors
topLevelWorkspace
Returns Workspace
Methods
applyLightResolution
Returns Promise<void>
cacheCleanup
Parameters
__namedParameters: Pick<InstallOptions, report | cache>
Returns Promise<null | { count: number; size: number }>
fetchEverything
Parameters
__namedParameters: InstallOptions
Returns Promise<void>
findLocatorForLocation
Parameters
cwd: PortablePath
__namedParameters: { strict?: boolean } = {}
Returns Promise<null | Locator>
forgetResolution
Parameters
descriptor: Descriptor
Returns void
forgetTransientResolutions
Returns void
forgetVirtualResolutions
Returns void
generateLockfile
Returns string
getDependencyMeta
Parameters
ident: Ident
version: null | string
Returns DependencyMeta
getWorkspaceByCwd
Parameters
workspaceCwd: PortablePath
Returns Workspace
getWorkspaceByDescriptor
Parameters
descriptor: Descriptor
Returns Workspace
getWorkspaceByFilePath
Parameters
filePath: PortablePath
Returns Workspace
getWorkspaceByIdent
getWorkspaceByLocator
install
Parameters
opts: InstallOptions
Returns Promise<void>
installWithNewReport
Parameters
reportOpts: { json?: boolean; quiet?: boolean; stdout: Writable }
installOpts: Omit<InstallOptions, report>
Returns Promise<0 | 1>
linkEverything
Parameters
__namedParameters: InstallOptions
Returns Promise<void>
loadUserConfig
Returns Promise<any>
persist
Returns Promise<void>
persistInstallStateFile
Returns Promise<void>
persistLockfile
Returns Promise<void>
preparePackage
Parameters
originalPkg: Package
__namedParameters: { resolveOptions: ResolveOptions; resolver: Resolver }
Returns Promise<Package>
resolveEverything
restoreInstallState
Parameters
__namedParameters: RestoreInstallStateOpts = {}
Returns Promise<void>
tryWorkspaceByCwd
Parameters
workspaceCwd: PortablePath
Returns null | Workspace
tryWorkspaceByDescriptor
Parameters
descriptor: Descriptor
Returns null | Workspace
tryWorkspaceByFilePath
Parameters
filePath: PortablePath
Returns null | Workspace
tryWorkspaceByIdent
tryWorkspaceByLocator
staticfind
Parameters
configuration: Configuration
startingCwd: PortablePath
Returns Promise<{ locator: Locator; project: Project; workspace: null | Workspace }>
Contains whatever data the linkers (cf
Linker.ts
) want to persist from an install to another.