Skip to content

perf!: replace glob package with node:fs glob#6098

Open
mostafaNazari702 wants to merge 3 commits into
mochajs:mainfrom
mostafaNazari702:replace-glob-with-fs-glob
Open

perf!: replace glob package with node:fs glob#6098
mostafaNazari702 wants to merge 3 commits into
mochajs:mainfrom
mostafaNazari702:replace-glob-with-fs-glob

Conversation

@mostafaNazari702

Copy link
Copy Markdown
Contributor

PR Checklist

Overview

Replace the "glob" dependency with Node's built-in node:fs glob plus "minimatch" (which Mocha already depends on, and which glob is itself built on). Removed glob from production dependencies, shrinking what users install.

IMPROTANT

This is a breaking change (semver-major): fs.globSync is only available on Node 22+ and so this drops support for Node.js 20. engines is now >=22.12.0, and the CI matrix and docs are updated to match.

@mostafaNazari702
mostafaNazari702 force-pushed the replace-glob-with-fs-glob branch from 598f08a to 8cbec9c Compare June 19, 2026 18:10
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.62%. Comparing base (bf76999) to head (7397618).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6098      +/-   ##
==========================================
- Coverage   82.64%   82.62%   -0.03%     
==========================================
  Files          62       62              
  Lines        4668     4661       -7     
  Branches     1003     1032      +29     
==========================================
- Hits         3858     3851       -7     
  Misses        810      810              

☔ View full report in Codecov by Harness.
📢 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.

@JoshuaKGoldberg JoshuaKGoldberg added the semver-major implementation requires increase of "major" version number; "breaking changes" label Jun 20, 2026

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice switch. I tinkered with this a bunch locally. It's a pity we'll have to wait so long to get it in 😢.

Comment thread lib/cli/watch-run.cjs Outdated
@mark-wiemer mark-wiemer added the status: blocked Waiting for something else to be resolved label Jun 21, 2026
@mark-wiemer

Copy link
Copy Markdown
Member

Blocked on starting v13

@mark-wiemer mark-wiemer changed the title perf: replace glob package with node:fs glob perf!: replace glob package with node:fs glob Jun 21, 2026
@mostafaNazari702
mostafaNazari702 force-pushed the replace-glob-with-fs-glob branch from 7e48b4b to 7397618 Compare July 19, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-major implementation requires increase of "major" version number; "breaking changes" status: blocked Waiting for something else to be resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚡️ Performance: Replace glob package with built-in node:fs .glob

3 participants