Skip to content

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

@hi-ogawa

Description

@hi-ogawa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions