Skip to content

Commit 3fb9c0b

Browse files
committed
lib: new matchesGlob method to use micromatch over minimatch
Refs: nodejs#52881
1 parent 7169bd4 commit 3fb9c0b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/path.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ const {
5454
isMacOS,
5555
} = require('internal/util');
5656

57-
const lazyMinimatch = getLazy(() => require('internal/deps/minimatch/index'));
58-
57+
const lazyMicromatch = getLazy(() => require('internal/deps/micromatch/index'));
5958

6059
function isPathSeparator(code) {
6160
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
@@ -165,15 +164,9 @@ function glob(path, pattern, windows) {
165164
emitExperimentalWarning('glob');
166165
validateString(path, 'path');
167166
validateString(pattern, 'pattern');
168-
return lazyMinimatch().minimatch(path, pattern, {
169-
__proto__: null,
167+
return lazyMicromatch().isMatch(path, pattern, {
170168
nocase: isWindows || isMacOS,
171-
windowsPathsNoEscape: true,
172169
nonegate: true,
173-
nocomment: true,
174-
optimizationLevel: 2,
175-
platform: windows ? 'win32' : 'posix',
176-
nocaseMagicOnly: true,
177170
});
178171
}
179172

0 commit comments

Comments
 (0)