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

Investigate replacing glob and globby with tinyglobby #29227

Open
Tracked by #29038
JReinhold opened this issue Sep 27, 2024 · 1 comment · May be fixed by #29271
Open
Tracked by #29038

Investigate replacing glob and globby with tinyglobby #29227

JReinhold opened this issue Sep 27, 2024 · 1 comment · May be fixed by #29271

Comments

@JReinhold
Copy link
Contributor

JReinhold commented Sep 27, 2024

glob is a package that pulls in a lot of other dependencies, making it relatively big even if it's prebundled.

globby is slightly smaller, but ideally we shouldn't need to have both.

The e18e ecosystem has migrated a lot of packages to tinyglobby recently, and it seems like the preferred choice. I don't think fdir is enough for us, because we're explicitly exposing a glob API, but I could be wrong, let's investigate.

The most important thing to be aware of, is that we can't break the stories glob API: https://storybook.js.org/docs/api/main-config/main-config-stories
But there is a chance that is completely powered by picomatch behind the scenes, so it might not be relevant.

See:

Current dependents on glob:

  • @storybook/builder-vite
  • @storybook/core
  • @storybook/cli
  • internal scripts

Current dependents on globby:

  • @storybook/core
  • @storybook/cli
  • @storybook/codemod

The high priorities are core and builder-vite, since the other packages are one-off CLIs used sparingly, so they are never installed. It's fine to migrate them too, but it should be separate work.

@JReinhold JReinhold changed the title Investigate replacing glob with tinyglobby Investigate replacing glob and globby with tinyglobby Sep 27, 2024
@valentinpalkovic
Copy link
Contributor

One reason why globby was selected for the Save from Controls feature is that it respects .gitignore and doesn't involve ignored files in search results. We should keep that in mind when migrating away from it. cc @JReinhold

@ndelangen ndelangen linked a pull request Oct 3, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants