Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 1000 Bytes

dependency-path.md

File metadata and controls

17 lines (10 loc) · 1000 Bytes

Dependency path

A path to a dependency with a specific set of resolved subdependencies. It is always a valid filesystem path. It mostly equals the package ID of the dependency but may differ when:

  1. The package has peer dependencies which are resolved neither by its own dependencies nor with top dependencies.
  2. The package has dependencies with peer dependencies that are resolved from higher in the dependency tree.

In those cases the package path has the next format: <package ID>_<peer specs...> (in shrinkwrap version <=4, it is <package ID>/<peer specs...>)

E.g., if [email protected] dependends on peers [email protected] and @scope/[email protected] then its path is: /registry.npmjs.org/foo/[email protected]+@[email protected] (in shrinkwrap version <=4 /registry.npmjs.org/foo/1.0.0/[email protected]+@[email protected].).

Peer specs are joined with + and if a peer is scoped then the / symbol is escaped with + as well (or with ! in shrinkwrap version <=4).

Relative path