| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
ci: https://ci.nodejs.org/job/node-test-pull-request/1671/ citgm + CI are green (expected failures on ppc) LGTM |
Sorry, something went wrong.
Sorry, something went wrong.
|
@thealphanerd Yes, it should. |
Sorry, something went wrong.
|
yay for smoke testing! yay for more tests! this is a great outcome of more thorough processes. |
Sorry, something went wrong.
|
oh, and fix lgtm, 🚢 |
Sorry, something went wrong.
|
@mscdex so it looks like this patch is not applying cleanly to v5.x (although it is for master). Would you be able to take a peak? |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
|
||
| dirname: function dirname(path) { | ||
| assertPath(path); | ||
| if (typeof path !== 'string') |
There was a problem hiding this comment.
We can skip this check and simply do path = '' + path, right?
Sorry, something went wrong.
There was a problem hiding this comment.
It probably doesn't matter either way. I just did it this way in case v8 doesn't/can't optimize it by not creating a new string if path is already a string.
Sorry, something went wrong.
There was a problem hiding this comment.
Just thinking out loud here. Will path = path.toString() be better then?
Sorry, something went wrong.
There was a problem hiding this comment.
That's effectively the same as path = '' + path but less safe (e.g. won't work on null and other values).
Sorry, something went wrong.
There was a problem hiding this comment.
Oh yeah. Totally forgot about them.
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
Before b212be0, input types were not checked in some path functions and the inputs were passed directly to `regexp.exec()` which implicitly converts its argument to a string. This commit both removes the type checking added in b212be0 and adds string coercion for those functions. PR-URL: #5244 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
@rvagg Do you want me to submit a separate PR for inclusion into v5.x or will it get cherry-picked at some point (and should be tagged with land-on-v5.x despite being closed now)? |
Sorry, something went wrong.
|
@mscdex the cherry-picking process for v5.x is opt-out rather than opt-in like v4.x so this'll come across in my next update (within the next couple of ours), no need to take action on your part except for PRs that shouldn't go in to v5.x. Thanks for fixing! |
Sorry, something went wrong.
Before b212be0, input types were not checked in some path functions and the inputs were passed directly to `regexp.exec()` which implicitly converts its argument to a string. This commit both removes the type checking added in b212be0 and adds string coercion for those functions. PR-URL: #5244 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
| Back | FazBrowse Home | New Git URL |
Before b212be0, input types were not checked in some path functions and the inputs were passed directly to regexp.exec() which implicitly converts its argument to a string.
This commit both removes the type checking added in b212be0 and adds string coercion for those functions.
/cc @thealphanerd