alanshaw / alanshaw/david

Doesn't support alternative syntaxes (e.g. github:)

Offen
#92 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
967
Forks
67
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

To let npm pull from another source than a registry,
an alternative syntax,
e.g. from a github repository, the github: syntax
can be used instead just specifying the package name and semver range:

```
{
"devDependencies": {
"libsass-compass-vertical-rhythm": "github:neoeno/libsass-compass-vertical-rhythm#7a71b8d",
"eyeglass": "github:sass-eyeglass/eyeglass#master"
}
}
```

However, david will try to find the package by its name field in npm registry
and either propose the last release being there as the most current release
(despite the version in package.json of a particular commit from github),
or will report a 404 from registry as the package hadn't been published there yet.

```
$ david
devDependencies

┌──────────┬──────────────────────────────────────┬────────┐
│ Name │ Package │ Latest │
├──────────┼──────────────────────────────────────┼────────┤
│ eyeglass │ github:sass-eyeglass/eyeglass#master │ 0.7.1 │
└──────────┴──────────────────────────────────────┴────────┘

npm install --save-dev eyeglass@0.7.1

Unregistered devDependencies

┌─────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Name │ Message │
├─────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ libsass-compass-vertical-rhythm │ Error: Registry returned 404 for GET on https://registry.npmjs.org/libsass-compass-vertical-rhythm │
└─────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────┘

```

So david should skip the 404 as the github: syntax is used,
and for github references where also a package exists,
david should either check and compare the package.json of the github reference (commit)
or also skip it to avoid confusion.

This would also apply to similar mechanisms like git+[...],
namely all alternative ways instead of referencing normally to a package in a registry.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.