[Snyk] Upgrade mocha from 8.1.3 to 8.4.0 #14
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-Y18N-1021887
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-Y18N-1021887
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-UAPARSERJS-1023599
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-NORMALIZEURL-1296539
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-LODASH-590103
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-LODASH-1040724
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-INI-1048974
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-COPYPROPS-1082870
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-AJV-584908
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-WS-1296835
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-URIJS-1078286
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-URIJS-1055003
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-UNDERSCORE-1080984
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-UAPARSERJS-1072471
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-PATHVAL-596926
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-PATHPARSE-1077067
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-MINIMIST-559764
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-MINIMIST-559764
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-MARKED-584281
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-MARKDOWNIT-459438
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-LODASH-1018905
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-HOSTEDGITINFO-1088355
Why? Proof of Concept exploit, CVSS 7.3
SNYK-JS-HOSTEDGITINFO-1088355
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
🎉 Enhancements
🐛 Fixes
📖 Documentation
options.require
to Mocha constructor forroot hook
plugins on parallel runs (@ juergba)top-level await
and ESM test files (@ juergba)Also thanks to @ outsideris for various improvements on our GH actions workflows.
8.3.2 / 2021-03-12
🐛 Fixes
require
interface (@ alexander-fenster)📖 Documentation
8.3.1 / 2021-03-06
🐛 Fixes
EvalError
caused by regenerator-runtime (@ snoack)import
from mocha in parallel mode (@ nicojs)8.3.0 / 2021-02-11
🎉 Enhancements
🐛 Fixes
require
error 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
Promise
rejections and erroneous "done()
called twice" errors (@ boneskull)MaxListenersExceededWarning
in 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--extension
option (@ jordanstephens).js
,.test.js
) now usable with--extension
option (@ boneskull)json
reporter now containsspeed
("fast"/"medium"/"slow") property (@ wwhurin)For implementors of custom reporters:
Runner.prototype.workerReporter()
); reporters should subclassParallelBufferedReporter
inmocha/lib/nodejs/reporters/parallel-buffered
Runner.prototype.linkPartialObjects()
); use if strict object equality is needed when consumingRunner
event dataRunner.prototype.isParallelMode()
)🐛 Fixes
npm
v6.x causing some of Mocha's deps to be installed whenmocha
is present in a package'sdevDependencies
andnpm install --production
is run the package's working copy (@ boneskull)nyc
with 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').lookupFiles
instead (@ 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