manypkg icon indicating copy to clipboard operation
manypkg copied to clipboard

switch to fast-glob

Open benmccann opened this issue 1 year ago • 1 comments

globby is just a wrapper around fast-glob

https://npmgraph.js.org/?q=globby - 23 dependencies https://npmgraph.js.org/?q=fast-glob - 17 dependencies

benmccann avatar Jul 08 '24 20:07 benmccann

🦋 Changeset detected

Latest commit: ee161c2a69dcac515737b30b1d0f1358e5f6060c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@manypkg/tools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Jul 08 '24 20:07 changeset-bot[bot]

why a change from fast-glob to tinyglobby? What features do we lose in either case?

Andarist avatar Jul 23 '24 18:07 Andarist

fast-glob has 17 dependencies (https://npmgraph.js.org/?q=fast-glob) whereas tinyglobby has only 2

I'm not sure I understand your question about features. tinyglobby supports all of the features we're using here (and all of the tests pass, which helps demonstrate that). If there's some particular feature that fast-glob has that you think we may use in the future I can check about getting that added to tinyglobby. We can always switch to fast-glob if needed in the future, but right now that seems pretty hypothetical. The use of globbing functionality here is pretty minimal

benmccann avatar Jul 23 '24 18:07 benmccann

Not all glob libraries are compatible in terms of the patterns they support. So I wonder if any user-provided pattern can change meaning with this change. I'm also not to keen on changing this for a library that currently has 67 weekly downloads.

Andarist avatar Jul 23 '24 19:07 Andarist

Not all glob libraries are compatible in terms of the patterns they support. So I wonder if any user-provided pattern can change meaning with this change.

That's a great call out and something I should have mentioned in the PR description. There is a very tiny change here, which is that numerical expansion within braces (e.g. {01..03}) is not supported with this new library. Besides that, all other glob functionality is the same since both globby and tinyglobby use picomatch under the covers for the majority of matching

I'm also not to keen on changing this for a library that currently has 67 weekly downloads.

It is a very new package. However, it has been adopted by a number of projects already. tinyglobby now has over 85,000 downloads / week

benmccann avatar Jul 30 '24 21:07 benmccann

Thanks @emmatown! I really appreciate all the reviews. I've updated the PR to stick with fast-glob for now. I'll see if pnpm and yarn might be willing to switch and perhaps we could revisit it later on if so

benmccann avatar Aug 09 '24 01:08 benmccann