Skip to content

Commit 43c3157

Browse files
feat: bumped glob dependency from 8 to 10 (#5250)
* feat: bumped glob dependency from 8 to 10 * feat: bumped glob dependency from 8 to 10 * test: add --sort to --no-parallel tests * Switch from --sort in tests to preserving glob@8 sorting * Update glob sorting comment link * revert parallel.spec.js changes
1 parent 34e0e52 commit 43c3157

File tree

3 files changed

+194
-168
lines changed

3 files changed

+194
-168
lines changed

lib/cli/lookup-files.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,15 @@ module.exports = function lookupFiles(
8787
debug('looking for files using glob pattern: %s', pattern);
8888
}
8989
files.push(
90-
...glob.sync(pattern, {
91-
nodir: true,
92-
windowsPathsNoEscape: true
93-
})
90+
...glob
91+
.sync(pattern, {
92+
nodir: true,
93+
windowsPathsNoEscape: true
94+
})
95+
// glob@8 and earlier sorted results in en; glob@9 depends on OS sorting.
96+
// This preserves the older glob behavior.
97+
// https://github.com/mochajs/mocha/pull/5250/files#r1840469747
98+
.sort((a, b) => a.localeCompare(b, 'en'))
9499
);
95100
if (!files.length) {
96101
throw createNoFilesMatchPatternError(

0 commit comments

Comments
 (0)