Skip to content

Commit

Permalink
docs: document shrinkwrap.yaml v3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Jun 23, 2018
1 parent 24849b7 commit debf261
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
89 changes: 89 additions & 0 deletions shrinkwrap/3.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Shrinkwrap version 3.8

## Changes

1. packages that have bin commands get a `hasBin: true` field (https://github.com/pnpm/pnpm/issues/1239)

## File format

### shrinkwrapVersion

`3`

### shrinkwrapMinorVersion

`6`

### registry

Indicates what registry should be used for installing the dependencies. E.g.: `https://registry.npmjs.org/`.

### specifiers

### dependencies

### devDependencies

### optionalDependencies

### packages

This is a mapping of dependency path to dependency object. The [dependency path](../dependency-path.md) is relative (e.g., `/foo/1.0.0`) if the dependency
is from the registry specified in the registry property, or absolute (e.g., `registry.node-modules.io/foo/1.0.0`) 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](../package-id.md).
It is only present when the dependency's package ID differs from its `dependencyPath`.

### 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.
1 change: 1 addition & 0 deletions shrinkwrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The purpose of pnpm's shrinkwrap file is to freeze the state of `node_modules`.

| shrinkwrap file version | used by pnpm versions |
| -- | -- |
| 3.8 | >=2.8.0 |
| 3.7 | >=2.0.0 |
| 3.6 | >=1.43.0 |
| 3.5 | >=1.40.0 |
Expand Down

0 comments on commit debf261

Please sign in to comment.