Skip to content

Latest commit

 

History

History
98 lines (52 loc) · 3.6 KB

6.0.md

File metadata and controls

98 lines (52 loc) · 3.6 KB

Lockfile version 6.0

Changes

  • Lockfile v6 is adopted. This new format improves the readability of the lockfile by removing hashes from package IDs. It also has some rearrangement of fields in the importers section. The new pnpm-lock.yaml file is more resistant to git merge conflicts!
  • The registry field is removed from the resolution object in pnpm-lock.yaml.
  • A lockfile is generated even for projects with no dependencies.

File format

File name: pnpm-lock.yaml

lockfileVersion

A ComVer starting with the major number 4.

packages

This is a mapping of dependency path to dependency object. The dependency path is relative (e.g., /[email protected]) if the dependency is from the registry specified in the registry property, or absolute (e.g., registry.node-modules.io/[email protected]) if the package's registry differs from the one specified as default in the shrinkwrap file.

packages[dependencyPath].name

Is only present when the package name is not in the dependencyPath.

packages[dependencyPath].version

Is only present when the package version is not in the dependencyPath.

packages[dependencyPath].id

The universal identifier of the package. Read more about package id here. It is only present when the dependency's package ID differs from its dependencyPath and the package is not hosted by a npm-compatible registry.

packages[dependencyPath].dev

If false then this dependency is neither a development dependency ONLY of the top level module nor a transitive dependency of one. This is not set for dependencies that are both a development dependency of the top level and a transitive dependency of a non-development dependency of the top level. It is true when the dependency is not a top level or a transitive prod dependency but only a dev one.

packages[dependencyPath].optional

If true then this dependency is either an optional dependency ONLY of the top level module or a transitive dependency of one. This is false for dependencies that are both an optional dependency of the top level and a transitive dependency of a non-optional dependency of the top level.

All optional dependencies should be included even if they're uninstallable on the current platform.

packages[dependencyPath].dependencies

This is a mapping of a dependency's dependency names to exact versions.

packages[dependencyPath].optionalDependencies

This is a mapping of a dependency's optional dependency names to exact versions.

packages[dependencyPath].peerDependencies

packages[dependencyPath].engines

packages[dependencyPath].os

packages[dependencyPath].cpu

packages[dependencyPath].deprecated

packages[dependencyPath].bundledDependencies

packages[dependencyPath].requiresBuild

This field is true if the package has lifecycle scripts or the package is a native module that needs to be built.

packages[dependencyPath].prepare

This field is true if the package is a git-hosted package and it has a "prepare" lifecycle script.

packages[dependencyPath].hasBin

This field is true if the package has bin commands.

Fields that are present in dedicated shrinkwrap

specifiers

dependencies

devDependencies

optionalDependencies

Fields that are present in a shared shrinkwrap

importers

importers[relativePath][dependencyType][dependencyName].specifier

dependencyType is one of dependencies, optionalDependencies, or devDependencies.

importers[relativePath][dependencyType][dependencyName].version