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

Support ignores in Bun.Glob options #8182

Open
kmartinezmedia opened this issue Jan 15, 2024 · 1 comment
Open

Support ignores in Bun.Glob options #8182

kmartinezmedia opened this issue Jan 15, 2024 · 1 comment
Labels
bun.js Something to do with a Bun-specific API enhancement New feature or request glob Related to Bun.Glob

Comments

@kmartinezmedia
Copy link

What is the problem this feature would solve?

The pattern matching support isn't extensive enough. Currently I'm having to do the following

const COMPONENTS = Array.from(
  new Glob(`**/*.tsx`).scanSync({ cwd: componentsDir, dot: false, absolute: true }),
).filter((name) => !['.test.', '.stories.'].includes(name));

What is the feature you are proposing to solve the problem?

Add support for ignores option like fast-glob

What alternatives have you considered?

Expanding glob patterns with more extensive negative lookups or the like still isn't best devx experience / readable

@kmartinezmedia kmartinezmedia added the enhancement New feature or request label Jan 15, 2024
@Electroid Electroid added the bun.js Something to do with a Bun-specific API label Jan 15, 2024
@Electroid Electroid changed the title Bun.Glob sync options supports ignores option Support ignores in Bun.Glob options Jan 15, 2024
@paperdave
Copy link
Collaborator

I wanted this exact feature a couple of days ago. While working on the tooling for #8166, this is a feature I wanted but it would be too slow to filter the glob after matching it, so I had to use lame readdirRecursive implementations that shouldn't be written anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun.js Something to do with a Bun-specific API enhancement New feature or request glob Related to Bun.Glob
Projects
None yet
Development

No branches or pull requests

4 participants