Skip to content

Commit

Permalink
feat: bumped glob dependency from 8 to 10 (#5250)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
JoshuaKGoldberg authored Nov 23, 2024
1 parent 34e0e52 commit 43c3157
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 168 deletions.
13 changes: 9 additions & 4 deletions lib/cli/lookup-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,15 @@ module.exports = function lookupFiles(
debug('looking for files using glob pattern: %s', pattern);
}
files.push(
...glob.sync(pattern, {
nodir: true,
windowsPathsNoEscape: true
})
...glob
.sync(pattern, {
nodir: true,
windowsPathsNoEscape: true
})
// glob@8 and earlier sorted results in en; glob@9 depends on OS sorting.
// This preserves the older glob behavior.
// https://github.com/mochajs/mocha/pull/5250/files#r1840469747
.sort((a, b) => a.localeCompare(b, 'en'))
);
if (!files.length) {
throw createNoFilesMatchPatternError(
Expand Down
Loading

0 comments on commit 43c3157

Please sign in to comment.