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: replace globby w/ fast-glob #418

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Jul 11, 2024

Under the hood, globby is powered by fast-glob with extra features, but none of them are utilized by the unbuild.

Since the unbuild doesn't utilize those extra features, I propose replacing globby with fast-glob to reduce the installation size.

Here is globby's feature description:

  • Promise API
    • fast-glob also has promise-based API
  • Multiple patterns
    • globby's multiple patterns support is powered by fast-glob directly
  • Negated patterns: ['foo*', '!foobar']
    • globby's negated patterns support is also powered by fast-glob directly
  • Expands directories: foo → foo/**/*
    • unbuild doesn't rely on this feature
  • Supports .gitignore and similar ignore config files
    • unbuild doesn't rely on this feature since globby disabled this feature by default and unbuild doesn't enable it.
  • Supports URL as cwd
    • Currently unbuild passed the string path to cwd, and we can use Node.js built-in url.fileURLToPath in case we encounter URLs in the future.

See also typescript-eslint/typescript-eslint#9453

@pi0 pi0 merged commit dd4b1a7 into unjs:main Jul 16, 2024
2 checks passed
JayFate added a commit to JayFate/unbuild that referenced this pull request Aug 16, 2024
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