isaacs/npm — pull request #4018 by tehsenaus (2013-10-21 16:59:04+00:00)
Title: Support file:// protocol for local tarball installs

I find the behaviour of npm to be inconsistent with installing local tarballs - using ```npm install /path/to/package.tgz``` on the command line works fine, but adding the same to dependencies in ```package.json``` causes npm to interpret the path as a version spec, and tries to pull from the registry.

This patch solves this by allowing the file:// protocol, which will always treat the spec as a local path, so the following will both work consistently:

```
npm install file:///path/to/package.tgz
```

```
"dependencies": {
"package": "file:///path/to/package.tgz"
}
```