[Snyk] Upgrade mocha from 8.1.3 to 8.4.0 #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade mocha from 8.1.3 to 8.4.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version fixes:
SNYK-JS-Y18N-1021887
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-GLOBPARENT-1016905
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-FLAT-596927
Why? Proof of Concept exploit, CVSS 7.3
(*) Note that the real score may have changed since the PR was raised.
Release notes
Package name: mocha
-
8.4.0 - 2021-05-07
- #4502: CLI file parsing errors now have error codes (@ evaline-ju)
- #4614: Watch: fix crash when reloading files (@ outsideris)
- #4630: Add
- #4617: Dynamically generating tests with
- #4608: Update default file extensions (@ outsideris)
-
8.3.2 - 2021-03-12
- #4599: Fix regression in
- #4601: Add build to GH actions run (@ christian-bromann)
- #4596: Filter active sponsors/backers (@ juergba)
- #4225: Update config file examples (@ pkuczynski)
-
8.3.1 - 2021-03-06
- #4577: Browser: fix
- #4574: ESM: allow
-
8.3.0 - 2021-02-11
- #4506: Add error code for test timeout errors (@ boneskull)
- #4112: Add BigInt support to stringify util function (@ JosejeSinohui)
- #4557: Add file location when SyntaxError happens in ESM (@ giltayar)
- #4521: Fix
- #4507: Add support for typescript-style docstrings (@ boneskull)
- #4503: Add GH Actions workflow status badge (@ outsideris)
- #4494: Add example of generating tests dynamically with a closure (@ maxwellgerber)
- #4556: Upgrade all dependencies to latest stable (@ AviVahl)
- #4543: Update dependencies yargs and yargs-parser (@ juergba)
-
8.2.1 - 2020-11-02
- #4489: Fix problematic handling of otherwise-unhandled
- #4496: Avoid
-
8.2.0 - 2020-10-16
// fixtures.js
- #4308: Support run-once global setup & teardown fixtures (@ boneskull)
- #4442: Multi-part extensions (e.g.,
- #4472: Leading dots (e.g.,
- #4434: Output of
- #4464: Errors thrown by serializer in parallel mode now have error codes (@ evaline-ju)
- #4409: Parallel mode and custom reporter improvements (@ boneskull):
- Support custom worker-process-only reporters (
- Allow opt-in of object reference matching for "sufficiently advanced" custom reporters (
- Enable detection of parallel mode (
- #4476: Workaround for profoundly bizarre issue affecting
- #4465: Worker processes guaranteed (as opposed to "very likely") to exit before Mocha does; fixes a problem when using
- #4419: Restore
-
8.1.3 - 2020-08-28
- #4425: Restore
from mocha GitHub release notes8.4.0 / 2021-05-07
🎉 Enhancements
🐛 Fixes
📖 Documentation
options.requireto Mocha constructor forroot hookplugins on parallel runs (@ juergba)top-level awaitand ESM test files (@ juergba)Also thanks to @ outsideris for various improvements on our GH actions workflows.
8.3.2 / 2021-03-12
🐛 Fixes
requireinterface (@ alexander-fenster)📖 Documentation
8.3.1 / 2021-03-06
🐛 Fixes
EvalErrorcaused by regenerator-runtime (@ snoack)importfrom mocha in parallel mode (@ nicojs)8.3.0 / 2021-02-11
🎉 Enhancements
🐛 Fixes
requireerror when bundling Mocha with Webpack (@ devhazem)📖 Documentation
🔩 Other
Also thanks to @ outsideris and @ HyunSangHan for various fixes to our website and documentation.
8.2.1 / 2020-11-02
Fixed stuff.
🐛 Fixes
Promiserejections and erroneous "done()called twice" errors (@ boneskull)MaxListenersExceededWarningin watch mode (@ boneskull)Also thanks to @ akeating for a documentation fix!
8.2.0 / 2020-10-16
The major feature added in v8.2.0 is addition of support for global fixtures.
While Mocha has always had the ability to run setup and teardown via a hook (e.g., a
before()at the top level of a test file) when running tests in serial, Mocha v8.0.0 added support for parallel runs. Parallel runs are incompatible with this strategy; e.g., a top-levelbefore()would only run for the file in which it was defined.With global fixtures, Mocha can now perform user-defined setup and teardown regardless of mode, and these fixtures are guaranteed to run once and only once. This holds for parallel mode, serial mode, and even "watch" mode (the teardown will run once you hit Ctrl-C, just before Mocha finally exits). Tasks such as starting and stopping servers are well-suited to global fixtures, but not sharing resources--global fixtures do not share context with your test files (but they do share context with each other).
Here's a short example of usage:
// can be async or not
exports.mochaGlobalSetup = async function() {
this.server = await startSomeServer({port: process.env.TEST_PORT});
console.log(
server running on port <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">server</span><span class="pl-kos">.</span><span class="pl-c1">port</span><span class="pl-kos">}</span></span>);};
exports.mochaGlobalTeardown = async function() {
// the context (
this) is shared, but not with the test filesawait this.server.stop();
console.log(
server on port <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">server</span><span class="pl-kos">.</span><span class="pl-c1">port</span><span class="pl-kos">}</span></span> stopped);};
// this file can contain root hook plugins as well!
// exports.mochaHooks = { ... }
Fixtures are loaded with
--require, e.g.,mocha --require fixtures.js.For detailed information, please see the documentation and this handy-dandy flowchart to help understand the differences between hooks, root hook plugins, and global fixtures (and when you should use each).
🎉 Enhancements
test.js) now usable with--extensionoption (@ jordanstephens).js,.test.js) now usable with--extensionoption (@ boneskull)jsonreporter now containsspeed("fast"/"medium"/"slow") property (@ wwhurin)For implementors of custom reporters:
Runner.prototype.workerReporter()); reporters should subclassParallelBufferedReporterinmocha/lib/nodejs/reporters/parallel-bufferedRunner.prototype.linkPartialObjects()); use if strict object equality is needed when consumingRunnerevent dataRunner.prototype.isParallelMode())🐛 Fixes
npmv6.x causing some of Mocha's deps to be installed whenmochais present in a package'sdevDependenciesandnpm install --productionis run the package's working copy (@ boneskull)nycwith Mocha in parallel mode (@ boneskull)lookupFiles()inmocha/lib/utils, which was broken/missing in Mocha v8.1.0; it now prints a deprecation warning (useconst {lookupFiles} = require('mocha/lib/cli')instead) (@ boneskull)Thanks to @ AviVahl, @ donghoon-song, @ ValeriaVG, @ znarf, @ sujin-park, and @ majecty for other helpful contributions!
8.1.3 / 2020-08-28
🐛 Fixes
Mocha.utils.lookupFiles()and Webpack compatibility (both broken since v8.1.0);Mocha.utils.lookupFiles()is now deprecated and will be removed in the next major revision of Mocha; userequire('mocha/lib/cli').lookupFilesinstead (@ boneskull)Commit messages
Package name: mocha
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs