-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Enhancement: replace fast-glob
with tinyglobby
#10533
Comments
I'm not a maintainer, but I think replacing Just a thought, it may be worth-while to use I'd also be willing to work on a PR for this, please let me know if you're interested. |
We cannot do that until our minimum version is v22 - which won't happen until v20 is out of LTS |
Thanks for the quick reply. It looks like Node v20 is out of active LTS (as of Oct. 2024) and will be in maintenance until April 2026. It was trivial for me to make the change to using the built-in I'll look into switching to |
I'm mildly 👍 on this. It's a fine idea. I see no downside now that the library is widely depended-upon. |
I like this idea, having less dependencies is always nice. However, I think it may take some time for From what I can see, |
Oof, yeah, good call @ronami. I think we should wait a few months for this to all settle down. |
It looks like the problems referenced by @ronami have either been resolved or don't affect this project, since all of the tests in the draft PR passed. |
True, but the fact that there were problems in the first place shakes confidence in the project. This isn't a pressing issue IMO. It's nice to reduce dependency sizes, but given how many projects are still using |
I think waiting a few months is fair as I will say that the Btw, Anyway, I think it makes sense for a project as large as this one to be more conservative and wait for any issues to shake out with other consumers first. Let's check back in a few months from now and see if everything has been quiet with others adopting the library. |
To me, this looks like too aggressive marketing. In many issues and PR's mentioning I do not share the opinion that the number of dependencies (under reasonable assumptions) is a selling point. Stability, functionality and maintainability – yes. For me. Some rational balance is needed here. People may think differently.
Please report any issues you find with No negativity. Just my thoughts. Having competitors is a positive thing. That's how I started this project [fast-glob] in 2017. I was not happy with the speed, complexity and maintainability of the existing solutions. |
My 2c:
These were good reasons to migrate - with a quick, 1:1 migration we cut one layer of indirection from our dependencies and we unlocked patches for a dependency. Note that install size simply isn't a concern for us - we're a local, dev-only tool. You realistically install our dependencies once and never again as we very rarely actively bump our required minimum ranges. We're also talking about a 353,122b difference. That's nothing - it won't impact anyone's download/install times. In order for me personally to back this -- what I'd want to see is some benefit beyond just "it's smaller". Is it faster? Does it provide some killer API that makes our lives better? Is it safer and more secure? etc. |
I think in general that many projects have more dependencies than they need because they haven't paid much attention to it or prioritized it. In my own projects, I've often been able to reduce the number of dependencies by 80-90% just by spending some time on it (example, example). I'm not affiliated with
Yes, I agree that
Less code and fewer dependencies means less attack surface. Just a few months ago there was a malware that affected a package that eslint developers install. Reducing the number of dependencies by a good percentage reduces your risk of facing these issues by a fair amount. Also,
|
The article you linked is from 2021 - not "just a few months ago".
Reading that issue:
Which is a non-issue for eslint usecases. Because the only user inputs are from a user's config. So worst case a user could craft a glob that crashes their eslint run...
Does it? What makes
That version is yet to be published. As an example - we currently have over 20 paths that |
Ah, my mistake on the date. Google shows the date as 2024 in the search results and the article says "The incident was detected on Friday, October 22" without mentioning the year, so I didn't notice it was a few years ago. As for whether eslint repo installs it, it appears that it doesn't currently, but did at that time. I happened to have a copy of eslint on my disk, which is what I checked when I saw the article, and it turns out that my fork is a few years old.
My point wasn't that it posed a security risk, but that users need to take the time to evaluate whether it does and handle it accordingly. And even if they do research it and come to the conclusion that there's no risk, many are still going to do an upgrade to make dependabot or a vulerability scanner quiet down.
Sure, but if this project were to adopt |
I think its important to point out that (
From some quick research, it looks like Jon is actively trying to prevent projects from moving away from his packages. Additionally, Jon is a maintainer of over 1,500 packages (npm), most of which haven't been updated in over a decade. Even if he wanted to maintain these packages, I seriously doubt any programmer would have the time to. 8/17 (47%) of I see numerous problems similar to the ones leading up to the xzutils incident. A package ( But other popular projects, like X still use
|
@bradzacher correct me if I'm wrong (I don't develop ts-eslint after all) but I suppose that all those 20 paths come from dev dependencies, because according to |
I'm +1 to keeping |
My point wasn't that our transitive deps come from dev deps -- my point was that our repo functions pretty well as an example of a pretty idiomatic TypeScript repo -- it has webpack plugins to bundle react code, it uses knip, etc. I.e. our repo has some 20+ transitive paths through which As an example - I just looked at my company's lockfile and I could quickly see over 30 transitive dependency pathways to |
As @Josh-Cena said - we have a working solution right now. But if the metric we're working to improve is purely:
But these are a false metrics to optimise for because there are so many usages of What is the improvement that end users will actually see? |
Fair enough. We can create some benchmarks to show what speed differences there are. I'd like to wait for the next release of |
Before You File a Proposal Please Confirm You Have Done The Following...
Relevant Package
typescript-estree
My proposal is suitable for this project
Description
fast-glob
has 17 dependencies with 12 people having publish access to those libraries and takes 505kb after installationhttps://npmgraph.js.org/?q=fast-glob
https://pkg-size.dev/fast-glob
tinyglobby
has only 2 dependencies with 6 people having publish access to those libraries and takes 155kb after installationhttps://npmgraph.js.org/?q=tinyglobby
https://pkg-size.dev/tinyglobby
I would be happy to send a PR for this
Additional Info
This was discussed a bit in #9453, but I thought it would be a good time to revisit as
tinyglobby
usage has grown 30x since that time having been adopted by projects likevite
,nx
, andnuxt
.tinyglobby
is likely to dedupe in user projects now. E.g. this repo already pulls intinyglobby
multiple times (vianx
andcspell
). And other projects in the eslint ecosystem likeeslint-import-resolver-typescript
(downloaded 10m times per week) depend ontinyglobby
already. Whilefast-glob
is still downloaded more frequently, 80% of those downloads come from this project, so whatever library this project uses will end up being the most used.The text was updated successfully, but these errors were encountered: