-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
tls: remove util and calls to util.format #3456
Conversation
/cc @jasnell |
host, | ||
cert.subjectaltname); | ||
reason = | ||
`Host: ${host} is not in the cert's altnames: ${cert.subjectaltname}`; |
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.
Style nit: line continuations should indent by four spaces. Didn't the linter complain?
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.
linter did not complain. Fixing this right now.
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.
So funny enough, if this line is indented an extra two characters it is over 80 :(
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.
Hah, okay. You can break it in two, i.e.:
reason = `Host: ${host} is not in the cert's altnames: ` +
`${cert.subjectaltname}`;
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.
fixed
I'm a little concerned this may just be code churn, but it does get rid of the need to escape single quotes and stuff. |
LGTM with a nit. This is the kind of churn I can live with: one less dependency and there are mild performance improvements to be gained. |
I'm open to the idea that it might be churn. I would also like to do a perf test to see if switching between util / backticks offers any improvement (could be a perf decrease) |
It's a wee bit churnish but it's the good kind, I think. LGTM |
cert.subjectaltname); | ||
reason = | ||
`Host: ${host} is not in the cert's altnames:` + | ||
`${cert.subjectaltname}`; |
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.
You're missing a space between the :
and the cert.subjectaltname
in the replacement text
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.
good eye
I started a node-test-pull-request CI run but I can't link to it. For some reason there's no build history after September 16... |
Looks like they are no longer sorted :[ |
You have to click through to https://ci.nodejs.org/job/node-test-commit/894/ - some windows failures related to buildbots going AWOL, it seems. |
@bnoordhuis should we re run the tests? |
@thealphanerd ... wouldn't hurt to do another run. |
Failures appear to be unrelated. Because this touches tls, @indutny ... quick review? |
Currently util.format is being used for string templating in tls. By replacing all of the instances of util.format with backtick string we can remove the need to require util in tls all together.
just rebased against master |
LGTM, sorry for delay, the notification was lost in my inbox. |
Landed in 6b0c906 |
Currently util.format is being used for string templating in tls. By replacing all of the instances of util.format with backtick string we can remove the need to require util in tls all together. PR-URL: #3456 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
Currently util.format is being used for string templating in tls. By replacing all of the instances of util.format with backtick string we can remove the need to require util in tls all together. PR-URL: nodejs#3456 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
suggesting this goes into |
Let's queue this up for post v4.2.2 |
Currently util.format is being used for string templating in tls. By replacing all of the instances of util.format with backtick string we can remove the need to require util in tls all together. PR-URL: #3456 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
Currently util.format is being used for string templating in tls. By replacing all of the instances of util.format with backtick string we can remove the need to require util in tls all together. PR-URL: #3456 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
Currently util.format is being used for string templating in tls. By replacing all of the instances of util.format with backtick string we can remove the need to require util in tls all together. PR-URL: #3456 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
Currently util.format is being used for string templating in tls. By replacing all of the instances of util.format with backtick string we can remove the need to require util in tls all together. PR-URL: #3456 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
Currently util.format is being used for string templating in tls.
By replacing all of the instances of util.format with backtick
string we can remove the need to require util in tls all together.