-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
test-exclude should supply nocase
to minimatch
and glob
when running on win32.
#43
Comments
What about the other uses of minimatch and glob from |
That is a good question. This is the one place I saw it become an issue in my project on windows, but let me examine the others. Windows paths are case insenstive so where we do comparisons on paths it seems prudent we do the same. But I don't know this lib that well. Let me examine the usages. |
For an example by default |
Can we just take an optional |
I'd prefer not to as we'd then need to expose the option to nyc. I'm leaning towards thinking it would be better to set the option per platform. |
Finally had a chance to look over the code I think you're correct that Basically the tests below will pass, where as they will fail on current master. To be able to test on mac I also supplied a
***Edited test |
nocase
to minimatch
options.nocase
to minimatch
and glob
when running on win32.
Changed title to reflect additional scope |
I ended up removing that bit on That said, if we don't run win32 as part of CI then there is always going to be a risk of breaking this there. Any ideas how we could test both on a posix os? |
Maintaining CI for both Win32 and POSIX is definitely a priority for this module. If Travis-CI were to drop support for Win32 we would immediately investigate other options and implement one of them. I think creating a My suggestion would be to make is-outside-dir-*.js provide named exports: module.exports = {
isOutsideDir(...) {
// code clipped
},
minimatchOptions: {
dot: true,
nocase: true // in is-outside-dir-win32.js only
}
} This will avoid adding a platform dependent conditional to index.js so we will maintain 100% coverage without adding any Then add platform dependent testing: if (process.platform === 'win32') {
// verify that some Win32 paths with different case match
t.test('uses case insensitive matching', t => { ... });
} else {
// verify that some POSIX paths with different case do not match
t.test('uses case sensitive matching', t => { ... });
} We will need testing for both |
Checking in: I made your suggested changes locally, still just waiting on legal approval to submit. :/ |
See description here: bcoe/c8#183
Capital vs lowercase driver letters can throw this check off as it is currently written.
CC: @bcoe
The text was updated successfully, but these errors were encountered: