-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: bumped glob dependency from 8 to 10 #5250
Conversation
// 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 | ||
.sort((a, b) => a.localeCompare(b, 'en')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was "fun" to debug. The order of tests is different with the newer version of glob
.
From npx mocha "test/integration/fixtures/options/parallel/test-*"
:
main
:a
,b
,c
,d
glob-10
:d
,c
,b
,a
This is isaacs/node-glob#576: that it's determined by OS latency. glob@8
used to sort (https://github.com/isaacs/node-glob/blob/v8.1.0/common.js#L20).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Yeah, the internal dependencies for this repo have a ways to go 🥲. A lot of them come from the very old docs website setup we have. It's going to be a bit more till we internally are clean & up to date. Tracked in #5207. |
PR Checklist
status: accepting prs
Overview
Bumps the
glob
version range inpackage.json
. We can't yet useglob@11
, as it only supports Node.js 20 up and Mocha 11 still supports Node.js 18.The only change to JS source code is a manual
'en'
alphabetical sort ofglob.sync
results. This is to preserve the legacy behavior of what order test files are found and run: https://github.com/mochajs/mocha/pull/5250/files#r1840469747.I tested this on the https://github.com/eslint/eslint and https://github.com/Microsoft/TypeScript projects and all tests reported passing.