storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.08k stars 9.25k forks source link

Investigate replacing `glob` and `globby` with `tinyglobby` #29227

Open JReinhold opened 1 day ago

JReinhold commented 1 day ago

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:

Current dependents on globby:

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.