micromatch / nanomatch

Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but without support for extended globs (extglobs), posix brackets or braces, and with complete Bash 4.3 wildcard support: ("*", "**", and "?").
https://github.com/micromatch
MIT License
95 stars 20 forks source link

Pattern with plus not works as expected #13

Closed NAlexandrov closed 6 years ago

NAlexandrov commented 6 years ago
const nanomatch = require('nanomatch');

const soft = ['Microsoft Visual C++ 2013 x86 Additional Runtime - 12.0.21005'];
const rule = '*Microsoft Visual C++*';

const match = nanomatch.match(soft, rule);

console.log(match);

What is happening (but shouldn't):

match = [];

What should be happening instead?

match = ['Microsoft Visual C++ 2013 x86 Additional Runtime - 12.0.21005'];

Why?

P.S. All will be as expect if you change require('nanomatch') to require('minimatch')

jonschlinkert commented 6 years ago

P.S. All will be as expect if you change require('nanomatch') to require('minimatch')

Oh cool, you found something that minimatch doesn't fail on ;)

jonschlinkert commented 6 years ago

fixed, published and released as 1.2.11. (In case anyone is wondering why a patch version is missing, I pubilshed 1.2.10 initially and noticed a bug right after I hit enter... So I unpublished 1.2.10, fixed the bug and republished as 1.2.11)

Thanks for reporting the issue @NAlexandrov!