Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mocha

Package Overview
Dependencies
Maintainers
3
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha - npm Package Compare versions

Comparing version 10.8.0 to 10.8.1

30

lib/cli/options.js

@@ -184,4 +184,20 @@ 'use strict';

if (filepath) {
let configData;
try {
const pkg = JSON.parse(fs.readFileSync(filepath, 'utf8'));
configData = fs.readFileSync(filepath, 'utf8');
} catch (err) {
// If `args.package` was explicitly specified, throw an error
if (filepath == args.package) {
throw createUnparsableFileError(
`Unable to read ${filepath}: ${err}`,
filepath
);
} else {
debug('failed to read default package.json at %s; ignoring',
filepath);
return result;
}
}
try {
const pkg = JSON.parse(configData);
if (pkg.mocha) {

@@ -194,9 +210,7 @@ debug('`mocha` prop of package.json parsed: %O', pkg.mocha);

} catch (err) {
if (args.package) {
throw createUnparsableFileError(
`Unable to read/parse ${filepath}: ${err}`,
filepath
);
}
debug('failed to read default package.json at %s; ignoring', filepath);
// If JSON failed to parse, throw an error.
throw createUnparsableFileError(
`Unable to parse ${filepath}: ${err}`,
filepath
);
}

@@ -203,0 +217,0 @@ }

@@ -297,3 +297,3 @@ 'use strict';

'grep=' +
encodeURIComponent(escapeRe(s))
encodeURIComponent(s)
);

@@ -308,3 +308,3 @@ }

HTML.prototype.suiteURL = function (suite) {
return makeUrl(suite.fullTitle());
return makeUrl('^' + escapeRe(suite.fullTitle()) + ' ');
};

@@ -318,3 +318,3 @@

HTML.prototype.testURL = function (test) {
return makeUrl(test.fullTitle());
return makeUrl('^' + escapeRe(test.fullTitle()) + '$');
};

@@ -321,0 +321,0 @@

{
"name": "mocha",
"version": "10.8.0",
"version": "10.8.1",
"type": "commonjs",

@@ -5,0 +5,0 @@ "description": "simple, flexible, fun test framework",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc