-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
lib: replace string concatenation with template #16923
Conversation
lib/_http_client.js
Outdated
@@ -116,7 +116,7 @@ function ClientRequest(options, cb) { | |||
|
|||
var path; | |||
if (options.path) { | |||
path = '' + options.path; | |||
path = `${options.path}`; |
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.
I wonder if this could just be String(options.path)
.
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.
@cjihrig '' + foo
seems pretty idiomatic at this point, perhaps due to performance. I'm not sure if that's a case of CrankshaftScript though.
¯\(ツ)/¯
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.
'' + foo
is what is being removed here though.
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.
PR author and committer are not the same - probably worked on the same system with clobbered git config
parameters. @Trott - please advise how to rectify it.
@gireeshpunathil We can change the author when we land this. Just let me know what the correct name and email address are. @VijiKannan if you prefer, you could also try to do the same change from a system where |
df5ece3
to
17fec4b
Compare
I have addressed the comments, and also used the correct git config. Please have a look, thanks! |
Inconclusive CI results (failed in smartos and raspbian weezy), trying once again: https://ci.nodejs.org/job/node-test-pull-request/11496/ |
Landed in a0aff57, thank you for your contribution! 🎉 |
PR-URL: #16923 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
PR-URL: #16923 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
PR-URL: #16923 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
PR-URL: #16923 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
This is my first contribution to node project