npm/npm-package-arg — pull request #3 by dylang (2014-07-26 03:26:26+00:00)
Title: File: protocol

Required for https://github.com/npm/npm/pull/5629#issuecomment-50215891

Note:

Because `require('url').parse`doesn't correctly parse these absolute Windows paths, they are not correctly supported yet.

* `file://C:/absolute/path.js` (legacy Windows path)

```
> url.parse('file://C:/absolute/path.js')
{ protocol: 'file:',
slashes: true,
auth: null,
host: 'c',
port: null,
hostname: 'c',
hash: null,
search: null,
query: null,
pathname: '/absolute/path.js',
path: '/absolute/path.js',
href: 'file://c/absolute/path.js' }
```

* `file:///?/c:/absolute/path.js` (Windows UNC path)

```
> url.parse('file:///?/c:/absolute/path.js')
{ protocol: 'file:',
slashes: true,
auth: null,
host: '',
port: null,
hostname: '',
hash: null,
search: '?/c:/absolute/path.js',
query: '/c:/absolute/path.js',
pathname: '/',
path: '/?/c:/absolute/path.js',
href: 'file:///?/c:/absolute/path.js' }
```