-
Notifications
You must be signed in to change notification settings - Fork 739
refactor: switch to fast-glob #1153
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1153 +/- ##
==========================================
+ Coverage 97.28% 97.31% +0.03%
==========================================
Files 36 36
Lines 1364 1380 +16
==========================================
+ Hits 1327 1343 +16
Misses 37 37 ☔ View full report in Codecov by Sentry. |
Hello! I was wondering if you are planning to merge this. There now also deprecation warnings being displayed because the As a possible data point regarding the safety of this switch, I tried running the eslint test suite using this branch for |
I'm also interested in this fix to avoid potential global and inflight issues. |
Hey, thanks for the interest. It's good to hear that this is important to other folks in the community. This is going to be tricky for me to work on. I don't have a windows machine anymore so it's going to be difficult for me to get the tests passing on Windows. I know that a lot of projects only use ShellJS on Mac or Linux, however Windows is still critical for some users. If anyone has experience developing on Windows and is able to give this branch a try, I'd love to collaborate on this together. |
That makes sense! I also don't currently have a Windows machine, but am a bit curious and might be able to take a look together with a friend who has one. (Not sure when though, and while I do have some Windows development experience it was a long time ago, so if anyone else who is able to help comes along that might be preferable :) ) |
I have Windows 10, so I'll give try the branch tonight. |
From a first pass on Windows 10 these look like platform-dependent differences. Maybe they should be skipped for Windows. I'll check again in some more detail tomorrow.
|
I've created fixes for Windows with this pull-request, thanks! |
Someone pointed out that Issue #1148 is actually caused by our dependency on the glob library. Switching to |
5e83898
to
53709e2
Compare
53709e2
to
3a98cd0
Compare
a6791ed
to
447216d
Compare
This seems like a breaking change since the syntax for
|
This PR includes backward compat for some (most?) of the old If people are motivated to help with backward compat, I would appreciate support in writing test cases (example PR #1164) and writing compat code.
Agree that dropping makes sense if we do a breaking change release. I'm holding off on merging until I can decide on the right path to release this (e.g., the choice would be between releasing as 0.9.0 or as 0.8.6). I appreciate your patience while I think through this.
Do you have a specific concern with the dependency tree? |
Ah, thanks. I'll admit I just read the change to docs and missed the compat layer. It'd probably be worth a mention in the docs that the old options still work though are discouraged. It could also print some kind of deprecation warning to help users migrate to the new options. Or maybe that's unnecessary already being done at a higher level as I see the options in general are now deprecated since the last release. I would say the compat layer feels quite tricky to make 100% compatible and I wouldn't be surprised if there are edge cases
|
Just to clarify that #1148 would also be resolved by upgrading to a supported version of glob. If this isn't going in soon, would you take a PR just to upgrade glob? |
We landed here because of Snyk security vulnerabilities as well. I'd be glad to help with some guidance to get this PR through! |
I still intend to get this change landed, however I'm going to give a brief update that I do not consider this to be a security issue. Please see my response on #1149 (comment). In short, shelljs never calls the |
There is now a new library called |
any luck on merging this branch? |
447216d
to
87593b3
Compare
87593b3
to
ef78263
Compare
This removes `node-glob` in favor of `fast-glob`. The main motivation for this is because `node-glob` has a security warning and I can't update to `node-glob@9` unless we drop compatibility for node v8. Switching to `fast-glob` seems to be fairly straightforward, although some options need to be changed by default for bash compatibility. Fixes #828 Fixes #1149
ef78263
to
c63bce9
Compare
This removes
node-glob
in favor offast-glob
. The main motivationfor this is because
node-glob
has a security warning and I can'tupdate to
node-glob@9
unless we drop compatibility for node v8.Switching to
fast-glob
seems to be fairly straightforward, althoughsome options need to be changed by default for bash compatibility.
Fixes #828
Fixes #1149
Fixes #1148