A URL such as protocol://[email protected]:foo/bar is parsed correctly with node v0.11.14:
➜ v0.12 git:(v0.11.14-release) ✗ ./node --version
v0.11.14
➜ v0.12 git:(v0.11.14-release) ✗ ./node -p "require('url').parse('http://[email protected]:foo/bar')"
{ protocol: 'http:',
slashes: true,
auth: 'user',
host: 'somehost.com',
port: null,
hostname: 'somehost.com',
hash: null,
search: null,
query: null,
pathname: '/:foo/bar',
path: '/:foo/bar',
href: 'http://[email protected]/:foo/bar' }
but is parsed incorrectly as of node v0.11.15:
➜ v0.12 git:(v0.11.14-release) ✗ ➜ git checkout v0.11.15-release
➜ v0.12 git:(v0.11.14-release) ✗ ./node --version
v0.11.15
➜ v0.12 git:(v0.11.15-release) ./node -p "require('url').parse('http://[email protected]:foo/bar')"
{ protocol: 'http:',
slashes: true,
auth: 'user',
host: 'somehost.com:foo',
port: null,
hostname: 'somehost.com:foo',
hash: null,
search: null,
query: null,
pathname: '/bar',
path: '/bar',
href: 'http://[email protected]:foo/bar' }
The breaking change is 6120472 and has been partially reverted in io.js.
Among other things, it breaks npm dependencies that use git+ssh:
$ npm install git+ssh://[email protected]:npm/npm
npm ERR! git clone ssh://[email protected]:npm/npm Cloning into bare repository '/Users/JulienGilli/.npm/_git-remotes/ssh-git-github-com-npm-npm-712d6d60'...
npm ERR! git clone ssh://[email protected]:npm/npm ERROR: Repository not found.
npm ERR! git clone ssh://[email protected]:npm/npm fatal: Could not read from remote repository.
npm ERR! git clone ssh://[email protected]:npm/npm
npm ERR! git clone ssh://[email protected]:npm/npm Please make sure you have the correct access rights
npm ERR! git clone ssh://[email protected]:npm/npm and the repository exists.