Skip to content

Commit

Permalink
Merge pull request #187 from alexanderGugel/zkochan-patch-2
Browse files Browse the repository at this point in the history
Update STORE.md
  • Loading branch information
alexanderGugel authored Nov 29, 2016
2 parents 424b6f7 + 25f8aa9 commit f8afd9c
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions spec/STORE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Store Spec

> draft, store spec version 1
A store is a folder that contains installed packages and information about relationships between them.
Expand Down Expand Up @@ -45,18 +47,15 @@ registry.node-modules.io/@wmhilton/log/1.1.0
### Packages from git

`<git URL domain>/<git path>/<commit hash>`
or
`<git URL domain>/<git path>/<annotated tag>`
> zkochan: Is it OK to use git tags? Git tags are mutable. Someone can tag a different commit

E.g.: `github.com/alexGugel/ied/b246270b53e43f1dc469df0c9b9ce19bb881e932`

Commits and annotated tags corresponding to a semantic version are both usable.

Lightweight git tags and branches are not, because they are more likely to change.
Module installers should resolve git package references based on branch names or non-version tag names to
Module installers should resolve git package references based on branch names or tag names to
commit hashes prior to loading or retrieving from the store.

When updating dependencies, module installers should check whether there are new commits in the branch or
whether the git-tag points to a different commit.

### Tarballs

`<domain>/<path to tarball>`
Expand All @@ -71,9 +70,7 @@ Local dependencies are symlinked in a Windows/MacOS/Linux compatible way, not co

A file that contains the store graph. All keys should be sorted.

> Question: What parts of this file are redundant to the information that could be derived by walking the symlink tree? If the store.yaml and filesystem contain conflicting information, how do we resolve the corruption?
> zkochan: the `dependents` part. I'd say the store.yaml is the single place of truth and if in the filesystem something does not match, we can force-update it.
The store.yaml is the single place of truth. If something in the filesystem does not match the graph described in the store.yaml, the corrupted/incorrect directories of the store are recreated.

### `storeSpecVersion`

Expand Down Expand Up @@ -113,20 +110,24 @@ packages:

## `.modules.yaml`

In order to disallow the usage of different stores from the same node_modules, the `.modules.yaml` file contains information about the origin of packages. This file is required only in node_modules that are outside of the store and has to be in the root of the node_modules folder.

> Can you explain what you mean? I don't get it

> zkochan: Lets say you have two stores: X and Y. And you have a package - A. You installed the dependencies of A using the X store. Now you don't want to install other dependencies using store Y. You want all the dependencies in A's node_modules to be from the same store.
A file in the root of node_modules with meta information.

### `storePath`

Has the absolute path to the store that is used for installing the dependencies.
The absolute path to the store which is used for installing dependencies in the current node_modules.

### `packageManager`

Has the name of the package manager that was used for installing the dependencies.

> you mean like 'ied' or 'pnpm'?
E.g.:

> zkochan: yes, maybe even the version of it, like [email protected]
```yaml
packageManager: [email protected]
```

or

```yaml
packageManager: [email protected]
```

0 comments on commit f8afd9c

Please sign in to comment.