Skip to content

Replace glob with tinyglobby, minimatch with micromatch#65

Closed
wojtekmaj wants to merge 1 commit intoistanbuljs:masterfrom
wojtekmaj:tinyglobby
Closed

Replace glob with tinyglobby, minimatch with micromatch#65
wojtekmaj wants to merge 1 commit intoistanbuljs:masterfrom
wojtekmaj:tinyglobby

Conversation

@wojtekmaj
Copy link
Copy Markdown

@wojtekmaj wojtekmaj commented Aug 8, 2025

This PR replaces two key dependencies to make test-exclude install size smaller and improve performance. Both replacement dependencies are reputable, popular packages used widely by other equally reputable projects (e.g. Vite).

  • glob was replaced with tinyglobby (install size: 3.36 MB, 158 KB respectively)
  • minimatch was replaced with micromatch (install size: 490 KB, 235 KB respectively)

Dependency tree before:

Dependencies_for_test_exclude_dependencies

Dependency tree after:

Dependencies_for_test_exclude_7_0_1_dependencies

Fixes #51
Supersedes #63

This PR replaces two key dependencies to make test-exclude install size smaller and improve performance. Both replacement dependencies are reputable, popular packages used widely by other equally reputable projects (e.g. Vite).

- glob was replaced with tinyglobby (install size: 3.36 MB, 158 KB respectively)
- minimatch was replaced with micromatch (install size: 490 KB, 235 KB

Fixes istanbuljs#51
Supersedes istanbuljs#63
@PrasathHari
Copy link
Copy Markdown

PrasathHari commented Nov 18, 2025

Would love to see this PR merged as the glob package has some vulnerabilities and popular build tools are already using tinyglobby.

@benmccann
Copy link
Copy Markdown

To expand on that, see the tinyglobby blog post on the e18e site: https://e18e.dev/blog/tinyglobby-migration.html. There's lots of reasons to make the switch including performance and ecosystem adoption

An excerpt:

A whole raft of popular build tools now rely solely on tinyglobby for glob functionality:

  • Vite
  • SWC
  • copy-webpack-plugin
  • tsup
  • tsdown
  • unbuild
  • nx
  • lerna
  • and many more...

None of these tools have a deep dependency on other glob libraries - all of them use tinyglobby all the way down 🎉

Similarly, many popular frameworks have made the same move:

  • React Router
  • Preact
  • Angular
  • SvelteKit
  • Astro
  • Starlight
  • Eleventy

New apps using these frameworks will no longer have deep dependencies on multiple glob libraries.

For others like Nuxt, SolidStart, and TanStack Start, all dependencies have fully switched to tinyglobby and those frameworks will only use tinyglobby once they update their dependencies. Most remaining frameworks use both tinyglobby and fast-glob.

Some ecosystems now rely almost entirely on tinyglobby — Svelte maintainer benmccann has switched over most of the Svelte ecosystem to using tinyglobby. Once the pending PR to typescript-eslint is merged, you will be able to setup a new SvelteKit project with every integration it offers and your project will exclusively use tinyglobby. Many other notable projects such as pnpm, node-gyp, and eslint-import-resolver-typescript have made the switch as well.

@43081j
Copy link
Copy Markdown

43081j commented Nov 19, 2025

@bcoe can we have this?

most of c8's bloat comes from this subtree of dependencies, not to mention this will also be much faster

@benmccann will know better than me but i also suspect we could switch to picomatch. the obscure brace expansion stuff micromatch offers is barely used in the wild iirc

@jakub-vaillant
Copy link
Copy Markdown

@bcoe Can you accept this? Its such a small change, and it's really necessary

@bcoe
Copy link
Copy Markdown
Member

bcoe commented Feb 22, 2026

@bcoe Can you accept this? Its such a small change, and it's really necessary

@wojtekmaj @jakub-vaillant I appreciate this PR, but I barely touch this package any more and am going to take the approach of updating the existing dependencies.

The beauty of open source, is if folks are relying on this heavily you shouldn't hesitate to fork nyc and swap out the dependencies 👍 I'll almost assuredly end up breaking things since I never use this library any more personally.

@bcoe bcoe closed this Feb 22, 2026
@wojtekmaj wojtekmaj deleted the tinyglobby branch February 22, 2026 17:02
@43081j
Copy link
Copy Markdown

43081j commented Feb 22, 2026

It is very expensive to start an ecosystem-wide migration from c8 to a fork of c8. It is an option but it would be much nicer to update the existing package so consumers can benefit immediately via updates rather than having to migrate.

Have you considered adding maintainers who do use this library (and c8)?

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 this pull request may close these issues.

Use a faster globbing library

6 participants