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

leading ../ pattern with ignore: ["**/*"] might not be working as expected #53

Open
hi-ogawa opened this issue Oct 1, 2024 · 3 comments

Comments

@hi-ogawa
Copy link

hi-ogawa commented Oct 1, 2024

reproduction: https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/tinyglobby-dot-dot-ignore?file=repro.mjs
potentially related: vitest-dev/vitest#6600 (however this behavior seems same for v0.2.6, so not sure)

When using a combination of leading ../ pattern and ignore, it requires .. on ignore side pattern as well. For example:

 glob(["../b/**/*.txt"], {
    ignore: [
       // [not ok]
       "**/ignore/**",
       // [ok] 
       "../**/ignore/**"
     ],
  })

I compared it with fast-glob and it actually works same, so I'm not sure what's the best behavior though.

@SuperchupuDev
Copy link
Owner

does glob have the same behavior too? if not it might be a fast-glob bug

@SuperchupuDev
Copy link
Owner

by the way this can be worked around by doing ignore: ['*(../)**/*']

@benmccann
Copy link
Contributor

tinyglobby version 0.2.12 behaves the same way

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

No branches or pull requests

3 participants