Uh oh!
There was an error while loading. Please reload this page.
test: swaps var for let/const throughout common module - #10177
Conversation
A bit of a tangent but: Not sure if this will get a 👍 or a 👎 from the maintainers, but either way, if the For example, current documentation for
That's a correct description of the algorithm, but it doesn't tell you what I might use the function for. (It appends (No disrespect to @paulgrock who put those initial descriptions there in the first place. Before that, we had nothing. Now, we have a starting point!) |
ChALkeR
commented
Dec 8, 2016
It doesn't though, please format the commit message according to https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#step-3-commit Atm, it is one-line and says: |
homosaur
commented
Dec 8, 2016
@ChALkeR I enhanced the commit message with the explanation from this PR. Thought the commit was self explanatory but have read the commit guidelines more thoroughly. Thanks! |
Trott
commented
Dec 8, 2016
Tiny nit on the commit message (which someone can fix when landing if you don't get around to it): |
Trott
commented
Dec 8, 2016
homosaur
commented
Dec 9, 2016
@Trott CI failures seem to be due to pull issues with Jenkins, not code |
Trott
commented
Dec 9, 2016
Jenkins was having issues. Let's try again. |
There was a problem hiding this comment.
Now that you are changing this line, can you change the variable name to use camelCase?
Trott
commented
Dec 9, 2016
Trott
commented
Dec 10, 2016
Single CI failure seems unrelated, but since |
homosaur
commented
Dec 13, 2016
@Trott still seems like maybe some technical issues with CI |
Trott
commented
Dec 14, 2016
NEVER TOO MANY CI RUNS! |
Trott
commented
Dec 14, 2016
CAN'T GET ENOUGH CI! |
Trott
commented
Dec 14, 2016
(CI is ✅ even if the widget says otherwise.) |
lpinca
commented
Dec 16, 2016
@homosaur I was reading your commit message
This seems to work diff --git a/test/common.js b/test/common.js
index e231547fc5..d138310aa6 100644
--- a/test/common.js+++ b/test/common.js@@ -41,8 +41,9 @@ exports.rootDir = exports.isWindows ? 'c:\\' : '/';
exports.buildType = process.config.target_defaults.default_configuration;
function rimrafSync(p) {
+ let st;
try {
- var st = fs.lstatSync(p);+ st = fs.lstatSync(p);
} catch (e) {
if (e.code === 'ENOENT')
return;are you ok with swapping that last |
homosaur
commented
Dec 16, 2016
Sure, @lpinca, I'm glad you found a way around that. I'm curious what causes the variable to need to be instantiated outside the try/catch block but I think it's a way to remove that last bit. Thanks for taking a look at that line. |
homosaur
commented
Dec 16, 2016
I'm guessing that try/catch is considered a scoping block for let, which is why it doesn't then understand the st call in the next try/catch block. That makes sense logically. |
lpinca
commented
Dec 16, 2016
@homosaur that's because |
lpinca
commented
Dec 16, 2016
@homosaur exactly :) |
homosaur
commented
Dec 16, 2016
@lpinca Changed block to your suggestion, test suite does pass. Thanks! |
lpinca
commented
Dec 16, 2016
@homosaur thanks, can I ask one last thing? Would you mind updating the commit message to reflect the changes? |
Swap var for let/const throughout the common.js module. Change a snake case variable to camel case starting on line 168.
jasnell
commented
Dec 23, 2016
Trott
commented
Dec 23, 2016
Linter error was probably the one that was in master for a few hours and not in this PR. Running linter again: https://ci.nodejs.org/job/node-test-linter/6015/ |
Swap var for let/const throughout the common.js module. Change a snake case variable to camel case starting on line 168. PR-URL: #10177 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell
commented
Dec 27, 2016
Landed in ecd11b6 |
Swap var for let/const throughout the common.js module. Change a snake case variable to camel case starting on line 168. PR-URL: #10177 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Swap var for let/const throughout the common.js module. Change a snake case variable to camel case starting on line 168. PR-URL: #10177 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
commented
Jan 23, 2017
This has landed cleanly in v6.x without any problems. Please feel free to manually backport to v4.x-staging |
Swap var for let/const throughout the common.js module. Change a snake case variable to camel case starting on line 168. PR-URL: #10177 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Swap var for let/const throughout the common.js module. Change a snake case variable to camel case starting on line 168. PR-URL: #10177 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Swap var for let/const throughout the common.js module. Change a snake case variable to camel case starting on line 168. PR-URL: #10177 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j8 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
Description of change
Swaps var for let/const throughout the common.js module.
Also changes a rogue snake case var to camel case.