Skip to content

Instantly share code, notes, and snippets.

@zkochan
Last active March 27, 2018 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zkochan/84af90a4e293ad6eec830ef1eb984129 to your computer and use it in GitHub Desktop.
Save zkochan/84af90a4e293ad6eec830ef1eb984129 to your computer and use it in GitHub Desktop.
How peers are resolved
- .registry.npmjs.org / foo / 1.0.0 / node_modules
  hard link to the specific foo package in the store
  - foo
  dependencies of foo, symlinks to folders where these deps are resolved with their deps
  - qux
  - plugh
- .registry.npmjs.org / foo / 1.0.0

  - bar@1.0.0+baz@1.0.0 / node_modules
    hard link
    - foo
    symlinks to peer dependencies
    - bar v1.0.0
    - baz v1.0.0
    regular dependencies of foo
    - qux
    - plugh

  - bar@1.0.0+baz@1.1.0 / node_modules
    hard link
    - foo
    symlinks to peer dependencies
    - bar v1.0.0
    - baz v1.1.0
    regular dependencies of foo
    - qux
    - plugh
- bar v1.0.0
- .registry.npmjs.org / foo / 1.0.0

  - baz@1.0.0 / node_modules
    hard link
    - foo
    symlinks to peer dependencies
    - baz v1.0.0
    regular dependencies of foo
    - qux
    - plugh

  - baz@1.1.0 / node_modules
    hard link
    - foo
    symlinks to peer dependencies
    - baz v1.1.0
    regular dependencies of foo
    - qux
    - plugh
- .registry.npmjs.org
  - a / 1.0.0
    - plugin@1.0.0 / node_modules
      - a
      -> .registry.npmjs.org / framework / 1.0.0 / plugin@1.0.0 / node_modules / framework
      - framework v1.0.0 but dependent on plugin@1.0.0
    - plugin@1.1.0 / node_modules
      - a
      -> .registry.npmjs.org / framework / 1.0.0 / plugin@1.1.0 / node_modules / framework
      - framework v1.0.0 but dependent on plugin@1.1.0

  - framework / 1.0.0
    - plugin@1.0.0 / node_modules
      - framework
      - plugin v1.0.0
    - plugin@1.1.0 / node_modules
      - framework
      - plugin v1.1.0

  - plugin
    - 1.0.0 / node_modules / plugin
    - 1.1.0 / node_modules / plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment