Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: switch globby to tinyglobby #3108

Draft
wants to merge 3 commits into
base: v2
Choose a base branch
from

Conversation

benmccann
Copy link

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

https://npmgraph.js.org/?q=globby - 23 dependencies
https://npmgraph.js.org/?q=tinyglobby - 2 dependencies

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@benmccann benmccann requested a review from pi0 as a code owner February 19, 2025 22:11
@pi0
Copy link
Member

pi0 commented Feb 19, 2025

I appreciate the PR.

I'm aware of tinyglobyy and we are progressively migrating to it (or alternatives) across unjs, however it has a big difference from globby where it does not have integration with npm ignore to auto support gitignore and other repo ignore paths (gitignore patterns are not same as glob ignore patterns, and they are relative to git root)

This lack of feature had caused significant runtime performance regressions (with unbuild/mkdist for one instance) which was far beyond the small install size benefits, therefore I want to be careful about migration.

Do you think we can either followup this first in upstream or help making an internal util that uses tinyglobby+ignore?

@benmccann
Copy link
Author

Oh, that's good to know! I wasn't aware that it was causing performance issues that you'd run into. I've filed an issue upstream and will check to see what the tinyglobby author thinks: SuperchupuDev/tinyglobby#92

@SuperchupuDev
Copy link

FYI many performance issues were solved with the release of 0.2.11 which happened this week

@benmccann
Copy link
Author

I do know that the one nuxt performance issue I saw was reported as being fixed with 0.2.11: nuxt/nuxt#30137

@pi0 would you be able to check if it fixes your issue too or whether the .gitignore functionality is still needed to address the performance issue you saw?

@pi0
Copy link
Member

pi0 commented Feb 19, 2025

(will test and confirm locally) I think more generally it would be also a behavior change if certain paths from public/ for example previously being ignored with respect to gitignore and now become scanned.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

All is good in terms of gitignore support (globby seems was opt-in so not breaking)

The only remaining issue is negated support for ignore (see fixture and test) ~> pending SuperchupuDev/tinyglobby#70

@pi0 pi0 marked this pull request as draft February 25, 2025 19:09
@pi0 pi0 changed the title chore: switch to tinyglobby refactor: switch globby to tinyglobby Feb 25, 2025
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.

3 participants