Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
lib: fix basename comparison on windows#4669
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
mscdex commented Jan 13, 2016
This change assumes that |
mscdex commented Jan 13, 2016
Also, I'm not sure that the |
9a720a4 to 4febedfComparetflanagan commented Jan 13, 2016
Thanks @mscdex, I've address those comments |
test/parallel/test-path.js Outdated
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 think this conditional can be dropped as well, since path.win32 would be available on all platforms and is the same implementations that would be used on real Windows.
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.
Thanks @mscdex, I've changed this
4febedf to b62b2b0Comparelib/path.js Outdated
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.
Would if (ext && f.substr(-1 * ext.length).toLowerCase() === ext.toLowerCase()){ have been enough to address the original comment?
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.
It would, but you were concerned with readability in a previous comment, that would work, but would kill readability
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.
For readability, it could be: if (ext && f.toLowerCase().endsWith(ext.toLowerCase())){
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.
That is much more elegant and witty.
I'll push a fix soon, thanks @cjihrig.
b62b2b0 to 1d05b89Comparetflanagan commented Jan 25, 2016
/poke Would this be a semver-minor change? |
bnoordhuis commented Jan 25, 2016
It's a backwards incompatible change so semver-major, I'll add the tag. Apropos It's currently implemented using the unibrow library but I know that the V8 team has plans to swap it out for ICU because unibrow lags behind the Unicode spec. To wit, V8's test suite has a number of regression tests for In other words, this may not be an entirely risk-free change. |
tflanagan commented Feb 17, 2016
/poke |
jasnell commented Feb 19, 2016
/cc @bnoordhuis@mscdex@orangemocha ... any thoughts on this one? |
orangemocha commented Feb 22, 2016
No objections to doing case-insensitive matching, but this function has undergone substantial changes (and the todo was removed) with b212be0. Could you please rework your changes over the current master branch? |
jasnell commented Mar 22, 2016
@tflanagan .. ping |
7da4fd4 to c7066fbCompareMylesBorins commented Jun 17, 2016
@tflanagan ping |
Trott commented Sep 16, 2016
@tflanagan Same question here: Any chance you can do a rebase? If not, I or someone else can try to take it on, but it would be awesome to get this landed and it would be great to see you back in action. (But I totally get it if you're busy with other stuff or your interests have gone elsewhere!) |
c133999 to 83c7a88Comparejasnell commented Feb 28, 2017
Closing given the lack of forward progress on this. |
Fixes TODO in lib/path.js ref'd here #4642