-
Notifications
You must be signed in to change notification settings - Fork 145
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
Remove fast-glob dependency #162
Comments
Jasmine uses file globbing to allow users to specify wildcards in their list of spec files to run. Previous to this release we used the glob package, but ended up picking up fast-glob as part of #153. I've updated the dependency to use the most recent fast-glob, but we won't likely make a new release just for this. Thanks for reporting the issue on transitive dependencies. We try to keep Jasmine's dependency graph small, but sometimes things sneak in or there just isn't a good way around them. |
I've updated the version of fast-glob for the next release, but that doesn't quite seem like enough of an impetus to release a 3.6.2 of Jasmine, since that's currently the only change since the 3.6.1 release. Globbing files has been part of Jasmine for some time now, so we don't want to just remove it. I'd be happy to have a discussion on which library we can use to do the globbing (ideally something with support and enough users), or if the update to the more recent version of fast-glob is good enough. |
Since you opened the debate about the library, I'm curious why the switch from glob to fast-glob in #153 ? Looking at the dependencies in some of my projects, I can see some other popular packages like node-sass, rollup, rimraf, node-gyp all use glob. Actually, according to npmjs, glob has 18851 dependents vs fast-glob's 1117. While I totally agree that popularity doesn't mean better, I believe consistent glob behavior with other tools commonly used with jasmine would be more beneficial than a (potential) few milliseconds performance boost. But then again, I have no data to compare between glob and fast-glob in a large project and decisions should be supported by facts, not opinions :) |
Data for comparison: |
Becoming aware of #153 , I've decided to give --worker-count a try. There seems to be a lot of issues with it. To be sure the issues were not related with my specs, I've cloned jasmine-npm repo and modified
Did I misunderstood the --worker-count option? |
And now it's much better, shaving off 76 deps. Surprisingly, micromatch@3 package have 81 deps itself despite it's name. |
Honestly, I didn't look too deeply at the details of the switch from glob to fast-glob in the multi-threading PR, other than at some of the benchmarks. I don't have a strong opinion either way on which library Jasmine uses to do file globbing. The main argument I'm hearing in favor of switching back to glob is that any given project is more likely to already have that be a transitive dependency than fast-glob. I'm inclined to leave this decision a bit up to a vote, since the community is ultimately who gets stuck with the larger dependency tree. 👍 - Switch back to glob |
Jasmine currently has two dependencies,
jasmine-core
andfast-glob
.jasmine-core
has no transitive dependencies, butfast-glob
has ~93 transitive dependencies. I'm not sure what exactly fast-glob is being used for, but it certainly sounds like a library that is not a critical piece of Jasmine, and certainly not something that needs 93 dependencies to function.Consider looking for alternative implementations to use, or inline whatever functionality it is you need from fast-glob. If it weren't for that one dependency, Jasmine would be an incredibly low dependency testing framework, which is exactly what I am looking for (and why I used to use Jasmine).
An significant iterative improvement here would be to just update
fast-glob
to latest, as it has greatly reduced its dependency set between version 2.2.7 and 3.2.4 (from 93 to 16).Edit: Looks like my estimate was a bit off, in reality it appears to have 121 transitive dependencies, all from fast-glob:
The text was updated successfully, but these errors were encountered: