Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
strarsis opened this issue Dec 2, 2015 · 0 comments
Open

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

strarsis opened this issue Dec 2, 2015 · 0 comments

Comments

@strarsis
Copy link

strarsis commented Dec 2, 2015

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.

@strarsis strarsis changed the title Doesn't support github: syntax Doesn't support alternative syntaxes (e.g. github:) Dec 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant