-
Notifications
You must be signed in to change notification settings - Fork 232
feat: change code to use url.URL instead of url.parse #1340
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
Conversation
jenkins run the tests please |
Marked as breaking change as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
I just left a few review comments and then it should be good to go.
Another recommendation that I would make would be to move the logic of checking if url.URL
is available into a utility function which you can just call instead, so:
url.URL ? new url.URL(urlStr, 'relative:///') : url.parse(urlStr)
Would be turned into
parseUrl(urlStr)
And parseUrl
could then just be a function on lib/parsers.js
:
exports.parseUrl = function (urlStr) {
return url.URL ? new url.URL(urlStr, 'relative:///') : url.parse(urlStr)
}
@watson All fixed, Thanks for your advice 👍 |
jenkins run the tests please |
jenkins run the tests please |
So with this using both |
I think it's easiest to target 2.x now and then we can just remove the |
I'll just look into the failing Node.js 6 test... |
Very strange. It passed travis-ci node 6 tests, but failed in apm-ci node 6. I can't reproduce that error on my computer with node 6.x. |
I've seen this specific test failure on Jenkins a few times in other PRs lately. So I think the Node.js 6 tests are just flaky when running on Jenkins. I'll go ahead and run the tests one more time to see if it goes away. |
jenkins run the tests please |
This time around the |
Ups, I pressed the wrong button 🤦♂ Was about to write that this time around the Node.js 6 tests passed just fine 😅 |
I've created another issue with the Node.js 6 failures on Jenkins: #1350 |
Thanks a lot for helping us fix this one @yuxizhe 💯 It'll be part of the next release 😃 |
My pleasure : ) |
close #1254
Checklist