Uh oh!
There was an error while loading. Please reload this page.
path: refactor path.format() repeated code - #5673
Conversation
There was a problem hiding this comment.
I think the function name will be lost in stack traces with the arrow function?
There was a problem hiding this comment.
Ah, then...will go back to the declaration style used in the rest of the object...
...and done!
Trott
commented
Mar 12, 2016
There was a problem hiding this comment.
nit: missing function name here also
Trott
commented
Mar 12, 2016
Minor fixup pushed. New CI: https://ci.nodejs.org/job/node-test-pull-request/1908/ |
benjamingr
commented
Mar 12, 2016
LGTM, nice. |
benjamingr
commented
Mar 12, 2016
nit: wouldn't it make more sense to use |
There was a problem hiding this comment.
Maybe keep the throws directly in path.format for better stack traces?
That would also avoid polymorphism in _format
There was a problem hiding this comment.
+1 ... moving the throw up would be best.
There was a problem hiding this comment.
Oh, good points about the stack trace and polymorphism as well. Rebased against master, changed according to these comments, and force pushed.
jasnell
commented
Mar 12, 2016
LGTM with a couple nits |
8627d44 to
bc36ea2CompareTrott
commented
Mar 13, 2016
I had the same thought but went with the string literals because |
Trott
commented
Mar 16, 2016
mscdex
commented
Mar 16, 2016
LGTM |
PR-URL: nodejs#5673 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
Trott
commented
Mar 16, 2016
Landed in 9de9a08 |
PR-URL: #5673 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Conflicts: lib/path.js
MylesBorins
commented
Mar 30, 2016
This is blocked by other path changes /cc @nodejs/lts |
make -j8 test(UNIX) orvcbuild test nosign(Windows) pass withthis change (including linting)?
test (or a benchmark) included?
existing APIs, or introduces new ones)?
Affected core subsystem(s)
path
Description of change
Refactor repeated code into a separate function.