Skip to content

chore(deps): replace fast-glob with tinyglobby#450

Merged
alexander-akait merged 1 commit intowebpack:mainfrom
roli-lpci:chore/replace-fast-glob-with-tinyglobby
Feb 28, 2026
Merged

chore(deps): replace fast-glob with tinyglobby#450
alexander-akait merged 1 commit intowebpack:mainfrom
roli-lpci:chore/replace-fast-glob-with-tinyglobby

Conversation

@roli-lpci
Copy link
Contributor

Summary

Replace fast-glob with tinyglobby, a smaller and faster alternative with a compatible API surface.

Prompted by #449fast-glob is the heavier of the two production dependencies, and tinyglobby covers the same use cases with a smaller install footprint.

Changes

  • src/utils.js — swap fast-glob import for named imports from tinyglobby (glob, isDynamicPattern, escapePath). Add a small getGlobBase() helper to replace the generateTasks()[0].base pattern (splits on / and stops at the first dynamic segment — verified to produce identical output for all relevant patterns).
  • package.json — remove fast-glob, add tinyglobby ^0.2.12.
  • package-lock.json — regenerated.

API mapping

fast-glob tinyglobby Notes
fastGlob(pattern, opts) glob([pattern], opts) Direct replacement
fastGlob.isDynamicPattern() isDynamicPattern() Named export, same behavior
fastGlob.escapePath() escapePath() Named export, same behavior
fastGlob.generateTasks() getGlobBase() helper Only .base was used; helper extracts the static prefix

Testing

All 142 tests pass, 320 snapshots match. Linter and formatter clean.

Addresses #449

Replace fast-glob with tinyglobby, a smaller and faster alternative.
All fast-glob APIs used in this project have direct tinyglobby equivalents:
- glob() for pattern matching
- isDynamicPattern() for detecting glob patterns
- escapePath() for escaping glob characters in paths

The only API without a direct equivalent is generateTasks(), which was
used solely to extract the static base directory from a glob pattern.
This is replaced with a small getGlobBase() helper that splits on path
separators and stops at the first dynamic segment.

Addresses webpack#449

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alexander-akait alexander-akait merged commit de9b32a into webpack:main Feb 28, 2026
15 checks passed
@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.73%. Comparing base (2997f6a) to head (60733a3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #450      +/-   ##
==========================================
+ Coverage   93.60%   93.73%   +0.12%     
==========================================
  Files           3        3              
  Lines         391      399       +8     
  Branches      129      131       +2     
==========================================
+ Hits          366      374       +8     
  Misses         21       21              
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants