Skip to content
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

Migrate globby to tinyglobby #139

Open
benmccann opened this issue Dec 14, 2024 · 3 comments
Open

Migrate globby to tinyglobby #139

benmccann opened this issue Dec 14, 2024 · 3 comments
Labels
umbrella issue This issue contains a list of dependents of a package and tracks the progress in each

Comments

@benmccann
Copy link

benmccann commented Dec 14, 2024

Run npx github:Fuzzyma/e18e-tools globby -n 100 -U https://npm.devminer.xyz/registry -q -o md to find the first 100

Top 10:

# Downloads Traffic Version Package Issue
1 56.24M 391.34 GB ^14.0.2 del
2 35.26M 245.36 GB ^14.0.0 copy-webpack-plugin
3 21.20M 147.54 GB ^11.1.0 stylelint
4 18.40M 128.05 GB ^11.0.4 react-dev-utils
5 16.21M 112.82 GB ^11.0.3 @graphql-tools/graphql-file-loader
6 15.52M 107.97 GB ^11.0.3 @graphql-tools/json-file-loader
7 14.26M 99.23 GB ^11.0.3 @graphql-tools/code-file-loader
8 12.90M 89.78 GB ^14.0.1 @storybook/codemod storybookjs/storybook#29227
9 11.25M 78.28 GB ^11.1.0 @oclif/core
10 10.19M 70.92 GB ^14.0.1 @storybook/cli
@benmccann
Copy link
Author

@JReinhold two of the top 10 packages here are Storybook packages. I was wondering if this one's one your list or is something you've looked at?

@Fuzzyma Fuzzyma added the umbrella issue This issue contains a list of dependents of a package and tracks the progress in each label Dec 18, 2024
@JReinhold
Copy link

It has been on our radar but we didn't get around to actually do it.
We have an issue for it at storybookjs/storybook#29227 and an attempt at doing it in storybookjs/storybook#29271 which had to be abandoned due to time constraints.
It's probably stale at this point, but could be a good starting point for anyone that wants to pick it up.

@webpro
Copy link

webpro commented Feb 3, 2025

Not sure if it's documented somewhere, but I've read something along the lines of "tinyglobby is a drop-in replacement for globby" a few times now. I feel like a missing piece here is worth mentioning: globby has support for .gitignore files, whereas tinyglobby does not. Lines/patterns in .gitignore files are different from glob patterns, and allow to "unignore" previous ignore patterns. Afaic this can't be replicated in glob patterns alone. None of the major glob libs have support for negated ignore patterns. This may lead to unexpected behavior cq subtle bugs when migrating from globby to tinyglobby.

This was raised in SuperchupuDev/tinyglobby#32, just repeating it here to increase awareness. It also contains an example use case.

To overcome the limitation, here's a PR in picomatch (micromatch/picomatch#137) that tinyglobby could use. Since the PR wasn't responded to I forked and published https://www.npmjs.com/package/unmatch to be used in SuperchupuDev/tinyglobby#70. Obviously forking isn't ideal, but I'm not really seeing a better alternative and currently I don't fancy writing a new glob lib myself. And picomatch itself, despite seeing some recent activity, also is pretty stale (latest release 10 months ago at the time of writing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
umbrella issue This issue contains a list of dependents of a package and tracks the progress in each
Projects
None yet
Development

No branches or pull requests

4 participants