Skip to content

chore(core): replace globby with tinyglobby - #3383

Merged
melloware merged 1 commit into
orval-labs:masterfrom
ivoberger:replace-fast-glob-with-tinyglobby
May 18, 2026
Merged

chore(core): replace globby with tinyglobby#3383
melloware merged 1 commit into
orval-labs:masterfrom
ivoberger:replace-fast-glob-with-tinyglobby

Conversation

@ivoberger

@ivoberger ivoberger commented May 18, 2026

Copy link
Copy Markdown
Contributor

Swap globby for tinyglobby in @orval/core. Recommended by e18e; used by Vite, Vitest, tsup, and others.

Why

  • Smaller install footprint — drops the fast-glob + array-union + dir-glob + merge-streams + ignore + slash + unicorn-magic transitive tree.
  • Fewer transitive deps for orval users, if using vite etc (like me ;) they can likely drop globby from their deps completely now
  • I considered filing an issue first but since its a tiny change and very little review effort I figured might as well send a PR

Scope

Drop-in replacement since none of the non-supported features are needed here (see e18e link above)

Verification

  • bun run typecheck - no errors
  • bun test in packages/core — 1746 pass
  • bun run generate-api in tests/ — all configs (incl. output.clean: true) successful
  • bun run test:snapshots — 4039 snapshots pass

Summary by CodeRabbit

  • Chores
    • Updated the internal file matching dependency to a more lightweight alternative, improving build performance and reducing package overhead while maintaining full compatibility with file removal operations.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 45db4468-58b2-465a-b7ae-22f2eda69d8b

📥 Commits

Reviewing files that changed from the base of the PR and between b978e04 and 6868eeb.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • packages/core/package.json
  • packages/core/src/utils/file.ts

📝 Walkthrough

Walkthrough

This PR replaces the globby file-globbing library with tinyglobby in the core package. The dependency is updated in package.json, and the import and function calls in packages/core/src/utils/file.ts are migrated to use the new library's glob API with the same configuration options.

Changes

Globby to Tinyglobby Migration

Layer / File(s) Summary
Migrate globby to tinyglobby
packages/core/package.json, packages/core/src/utils/file.ts
Dependency replaced from globby to tinyglobby in package.json. Import and glob() calls in removeFilesAndEmptyFolders updated to use tinyglobby's glob function while maintaining cwd and absolute path options for file and directory discovery.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A swap so neat, from one glob to the next,
Tinyglobby bounces where globby once flexed,
Same patterns, same options, a lighter way,
The rabbit approves of this refactor's display!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: replacing the globby dependency with tinyglobby in the core package.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@melloware melloware added this to the 8.12.0 milestone May 18, 2026
@melloware melloware added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels May 18, 2026
@melloware

Copy link
Copy Markdown
Collaborator

@ivoberger thank you!

@melloware
melloware merged commit 93fc812 into orval-labs:master May 18, 2026
5 checks passed
@ivoberger
ivoberger deleted the replace-fast-glob-with-tinyglobby branch May 18, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants