Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

multi-stage install #5919

@isaacs

Description

@isaacs

When the user types npm install

  1. Read the current tree of installed packages. Mark each of these as already existing.
  2. Walk this tree checking the dependencies of each node.
  3. For each missing dep, fetch the package data and create a "phantom" node at its point in the tree. Then, repeat step 2 for the new phantom nodes.
  4. De-duplicate all phantom nodes (leaving extant nodes in place)
  5. Now we have a de-duplicated list of packages. Fetch them all to cache. (All networking happens here.)
  6. BFS-walk the tree, unpacking into phantom nodes, making them real. (If there is any error at this point or beyond, abort and rimraf all phantom nodes.)
  7. BFS-walk the tree, running "preinstall" scripts on each newly installed node.
  8. BFS-walk the tree, running "install" scripts on each newly installed node.
  9. BFS-walk the tree, running "postinstall" scripts on each newly installed node.
  10. Success. Print info about what was installed.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions