This commit is contained in:
2025-04-17 19:16:42 +02:00
parent 94a90edabd
commit ab2db755ef
88 changed files with 8427 additions and 10994 deletions

View File

@@ -1,6 +1,5 @@
'use strict';
const path = require('path');
const scan = require('./scan');
const parse = require('./parse');
const utils = require('./utils');
@@ -49,7 +48,7 @@ const picomatch = (glob, options, returnState = false) => {
}
const opts = options || {};
const posix = utils.isWindows(options);
const posix = opts.windows;
const regex = isState
? picomatch.compileRe(glob, options)
: picomatch.makeRe(glob, options, false, true);
@@ -158,9 +157,9 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
* @api public
*/
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
picomatch.matchBase = (input, glob, options) => {
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
return regex.test(path.basename(input));
return regex.test(utils.basename(input));
};
/**