micromatch / picomatch

Blazing fast and accurate glob matcher written JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions. Used by GraphQL, Jest, Astro, Snowpack, Storybook, bulma, Serverless, fdir, Netlify, AWS Amplify, Revogrid, rollup, routify, open-wc, imba, ava, docusaurus, fast-glob, globby, chokidar, anymatch, cloudflare/miniflare, pts, and more than 5 million projects! Please follow picomatch's author: https://github.com/jonschlinkert
https://github.com/micromatch
MIT License
972 stars 56 forks source link

Wrong result for file with leading `.` #127

Closed vvscode closed 10 months ago

vvscode commented 10 months ago
require('picomatch')('src/microfrontends/**')('src/microfrontends/xxxx/.eslintrcjs') // false
require('picomatch')('src/microfrontends/**')('src/microfrontends/xxxx/x.eslintrcjs') // true

Discovered on version 2.3.1, but it's still there for 3.0.1

I even see tests for such cases https://github.com/micromatch/picomatch/blob/master/test/globstars.js#L83 but don't understand the idea behind those tests (looks like it's done on purpose)

jonschlinkert commented 10 months ago

Hi @vvscode, we follow bash and minimatch conventions and this is expected behavior. See the dot option in the readme.