Last active
August 29, 2015 14:06
-
-
Save metamatt/e654f8ce7e25ed0fc906 to your computer and use it in GitHub Desktop.
url.parse api changes between node 0.10 and node 0.12 break karma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See for example https://github.com/karma-runner/karma/blob/master/lib/middleware/karma.js#L40, which assumes the result of `url.parse(foo, true)` always has a non-null `.query` property. | |
In node 0.10.26: | |
magi@ubuntu ~/s/d/experiments> node-0.10.26 | |
> url.parse('/foo', true) | |
{ protocol: null, | |
slashes: null, | |
auth: null, | |
host: null, | |
port: null, | |
hostname: null, | |
hash: null, | |
search: '', | |
query: {}, | |
pathname: '/foo', | |
path: '/foo', | |
href: '/foo' } | |
In node 0.11.14-pre ("node 0.12"): | |
magi@ubuntu ~/s/d/experiments> node-0.12 | |
> url.parse('/foo', true) | |
{ protocol: null, | |
slashes: null, | |
auth: null, | |
host: null, | |
port: null, | |
hostname: null, | |
hash: null, | |
search: null, | |
query: null, | |
pathname: '/foo', | |
path: '/foo', | |
href: '/foo' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment