Package
Hierarchy
- Locator
- Package
Index
Properties
bin
All bin
entries defined by the package
While we don't need the binaries during the resolution, keeping them
within the lockfile is critical to make yarn run
fast (otherwise we
need to inspect the zip content of every dependency to figure out which
binaries they export, which is too slow for a command that might be
called at every keystroke)
optionalconditions
A set of constraints indicating whether the package supports the host environment.
dependencies
A map of the package's dependencies. There's no distinction between prod dependencies and dev dependencies, because those have already been merged together during the resolution process.
dependenciesMeta
Map with additional information about direct dependencies.
identHash
Unique hash of a package scope and name. Used as key in various places, so that two idents can be quickly compared.
languageName
The "language" of the package (eg. node
), for use with multi-linkers.
Currently experimental; will probably be renamed before stable release.
linkType
Describes the type of the file system link for a package.
locatorHash
Unique hash of a package locator. Used as key in various places so that two locators can be quickly compared.
name
Name of the package (eg. node
).
peerDependencies
A map of the package's peer dependencies.
peerDependenciesMeta
Map with additional information about peer dependencies.
The keys are stringified idents, for example: @scope/name
reference
A package reference uniquely identifies a package (eg. 1.2.3
).
scope
Scope of the package, without the @
prefix (eg. types
).
version
The version of the package, if available.
This data structure is a valid locator (so a reference to a unique package) that went through the resolution pipeline in order to extract all the extra metadata stored on the registry. It's typically what you can find stored inside the lockfile.