Upgrading mocha 11 to 12
Breaking11.8.0 → 12.0.3Breaking11Platform1New7Changed33Fixed39Other275
11 breaking changes and a platform requirement change.
- The internal launcher script is gone and the package's entry points are now ES modules, which can break setups that relied on the old CommonJS layout.
- Some old helper functions in the errors module are gone, so code importing them will break.
- Mocha no longer supports running tests on Sauce Labs.
- The old --compilers command-line option is no longer mentioned anywhere in Mocha.
Node.js requirement changed in 12.0.0-alpha-issue-5899.1: ^18.18.0 || ^20.9.0 || >=21.1.0 → ^20.19.0 || >=22.12.0.
Adds find-up-simple ^1.0.1, is-unicode-supported ^0.1.0.
Drops escape-string-regexp, find-up, he, log-symbols, yargs, yargs-parser, yargs-unparser.
Installs 24 packages in all (was 93).
No longer installs @isaacs/cliui, @pkgjs/parseargs, ansi-regex, ansi-styles, camelcase, chalk, cliui, color-convert, color-name, cross-spawn, decamelize, eastasianwidth, emoji-regex, escalade, flat and 24 more.
Moves argparse 2.0.1 → 3.0.4, balanced-match 1.0.2 → 4.0.4, brace-expansion 2.1.7 → 5.0.12, chokidar 4.0.3 → 5.0.0, diff 7.0.0 → 9.0.0, glob 10.5.0 → 13.0.6, is-path-inside 3.0.3 → 4.0.0, js-yaml 4.3.2 → 5.5.0, lru-cache 10.4.3 → 11.5.3, minimatch 9.0.9 → 10.2.6, path-scurry 1.11.1 → 2.0.2, readdirp 4.1.2 → 5.1.1, serialize-javascript 6.0.2 → 7.1.4, strip-json-comments 3.1.1 → 5.0.3, supports-color 7.2.0, 8.1.1 → 8.1.1 and 1 more. Your build may pick other versions.
What you must change
bin/_mochaerrors.js--compilers--opts--forbid-onlyprocess.env.CIutil.parseArgsyargsyargs-parseryargs-unparserhe