@yarnpkg/core
Index
Classes
Enumerations
Functions
Interfaces
Namespaces
References
Type Aliases
- AllDependencies
- BuildDirective
- BuildRequest
- ConfigurationDefinitionMap
- DescriptorHash
- FetchOptions
- FetchResult
- FinalizeInstallStatus
- FormatType
- HardDependencies
- IdentHash
- InstallPackageExtraApi
- InstallStatus
- LinkOptions
- LocatorHash
- MinimalFetchOptions
- MinimalLinkOptions
- MinimalResolveOptions
- PackageExtension
- PackageExtensionData
- PackageExtensions
- PeerRequirement
- PeerWarning
- Plugin
- PluginConfiguration
- ResolveOptions
- SettingsDefinition
- WrapNetworkRequestInfo
Variables
Functions
parseMessageName
Parameters
messageName: string
Returns MessageName
stringifyMessageName
Parameters
name: number
Returns string
References
CommandContext
Type Aliases
AllDependencies
BuildDirective
Type declaration
script: string
type: BuildDirectiveType
BuildRequest
ConfigurationDefinitionMap
Type parameters
DescriptorHash
FetchOptions
FetchResult
Type declaration
optionalchecksum?: string | null
The checksum for the fetch result.
optionaldiscardFromLookup?: boolean
If true, the package location won't be considered for package lookups (so for example with can use this flag to indicate that the
link:
protocol should be resolvable, but should never be used to detect the package that owns a path).optionallocalPath?: PortablePath | null
The "true" place where we can find the sources. We use that in order to compute the
file:
andlink:
relative paths.packageFs: FakeFS<PortablePath>
prefixPath: PortablePath
The path where the package can be found within the
packageFs
. This is typically thenode_modules/<scope>/<name>
path.optionalreleaseFs?: () => void
If set, this function will be called once the fetch result isn't needed anymore. Typically used to release the ZipFS memory.
If set, this function will be called once the fetch result isn't needed anymore. Typically used to release the ZipFS memory.
Returns void
FinalizeInstallStatus
Type declaration
buildLocations: PortablePath[]
buildRequest: BuildRequest
locator: Locator
FormatType
HardDependencies
IdentHash
Unique hash of a package descriptor. Used as key in various places so that two descriptors can be quickly compared.
InstallPackageExtraApi
Type declaration
holdFetchResult: (promise: Promise<void>) => void
The core reclaims the virtual filesystem by default when the
installPackage
function returns. This may be annoying when working on parallel installers, sinceinstallPackage
are guaranteed to work sequentially (and thus no two packages could be installed at the same time, since one's fs would be closed as soon as the second would start).To avoid that, you can call the
holdFetchResult
function from this extra API to indicate to the core that it shouldn't reclaim the filesystem until the API passed in parameter as finished executing. Note that this may lead to higher memory consumption (since multiple packages may be kept in memory), so you'll need to implement an upper bound to the number of concurrent package installs.The core reclaims the virtual filesystem by default when the
installPackage
function returns. This may be annoying when working on parallel installers, sinceinstallPackage
are guaranteed to work sequentially (and thus no two packages could be installed at the same time, since one's fs would be closed as soon as the second would start).To avoid that, you can call the
holdFetchResult
function from this extra API to indicate to the core that it shouldn't reclaim the filesystem until the API passed in parameter as finished executing. Note that this may lead to higher memory consumption (since multiple packages may be kept in memory), so you'll need to implement an upper bound to the number of concurrent package installs.Parameters
promise: Promise<void>
Returns void
InstallStatus
Type declaration
buildRequest: BuildRequest | null
optionalinstallPromise?: Promise<void>
packageLocation: PortablePath | null
LinkOptions
LocatorHash
Unique hash of a package locator. Used as key in various places so that two locators can be quickly compared.
MinimalFetchOptions
MinimalLinkOptions
Type declaration
project: Project
MinimalResolveOptions
PackageExtension
PackageExtensionData
PackageExtensions
PeerRequirement
Type declaration
allRequesters: LocatorHash[]
requested: Ident
rootRequester: LocatorHash
subject: LocatorHash
PeerWarning
Plugin
Type parameters
- PluginHooks = any
Type declaration
optionalcommands?: CommandClass<CommandContext>[]
optionalconfiguration?: Partial<ConfigurationDefinitionMap>
optionalfetchers?: FetcherPlugin[]
optionalhooks?: PluginHooks
optionallinkers?: LinkerPlugin[]
optionalresolvers?: ResolverPlugin[]
PluginConfiguration
Type declaration
modules: Map<string, any>
plugins: Set<string>
ResolveOptions
SettingsDefinition
WrapNetworkRequestInfo
Variables
constCACHE_CHECKPOINT
If value defines the minimal cache version we can read files from. We need to bump this value every time we fix a bug in the cache implementation that causes the archived content to change.
constCACHE_VERSION
The cache version, on the other hand, is meant to be bumped every time we change the archives in any way (for example when upgrading the libzip or zlib implementations in ways that would change the exact bytes). This way we can avoid refetching the archives when their content hasn't actually changed in a significant way.
constDEFAULT_RC_FILENAME
FormatType
Type declaration
readonlyADDED: ADDED
readonlyCODE: CODE
readonlyDEPENDENT: DEPENDENT
readonlyDESCRIPTOR: DESCRIPTOR
readonlyDURATION: DURATION
readonlyID: ID
readonlyIDENT: IDENT
readonlyINSPECT: INSPECT
readonlyLOCATOR: LOCATOR
readonlyMARKDOWN: MARKDOWN
readonlyMARKDOWN_INLINE: MARKDOWN_INLINE
readonlyNAME: NAME
readonlyNO_HINT: NO_HINT
readonlyNULL: NULL
readonlyNUMBER: NUMBER
readonlyPACKAGE_EXTENSION: PACKAGE_EXTENSION
readonlyPATH: PATH
readonlyRANGE: RANGE
readonlyREFERENCE: REFERENCE
readonlyREMOVED: REMOVED
readonlyRESOLUTION: RESOLUTION
readonlySCOPE: SCOPE
readonlySETTING: SETTING
readonlySIZE: SIZE
readonlySIZE_DIFF: SIZE_DIFF
readonlyURL: URL
Unique hash of a package descriptor. Used as key in various places so that two descriptors can be quickly compared.