unexpected
Advanced tools
Comparing version 10.32.1 to 10.33.0
@@ -999,3 +999,3 @@ var utils = require('./utils'); | ||
var constructorName = intOrUint + numBits + 'Array', | ||
Constructor = this[constructorName]; | ||
Constructor = global[constructorName]; | ||
if (typeof Constructor !== 'undefined') { | ||
@@ -1002,0 +1002,0 @@ expect.addType({ |
@@ -786,4 +786,3 @@ var createStandardErrorMessage = require('./createStandardErrorMessage'); | ||
if ((typeof plugin !== 'function' && (typeof plugin !== 'object' || typeof plugin.installInto !== 'function')) || | ||
(typeof plugin.name !== 'undefined' && typeof plugin.name !== 'string') || | ||
(typeof plugin.dependencies !== 'undefined' && !Array.isArray(plugin.dependencies))) { | ||
(typeof plugin.name !== 'undefined' && typeof plugin.name !== 'string')) { | ||
throw new Error( | ||
@@ -794,3 +793,2 @@ 'Plugins must be functions or adhere to the following interface\n' + | ||
' version: <an optional semver version string>,\n' + | ||
' dependencies: <an optional list of dependencies>,\n' + | ||
' installInto: <a function that will update the given expect instance>\n' + | ||
@@ -832,24 +830,2 @@ '}' | ||
if (plugin.dependencies) { | ||
var installedPlugins = this.installedPlugins; | ||
var instance = this.parent; | ||
while (instance) { | ||
Array.prototype.push.apply(installedPlugins, instance.installedPlugins); | ||
instance = instance.parent; | ||
} | ||
var unfulfilledDependencies = plugin.dependencies.filter(function (dependency) { | ||
return !installedPlugins.some(function (plugin) { | ||
return getPluginName(plugin) === dependency; | ||
}); | ||
}); | ||
if (unfulfilledDependencies.length === 1) { | ||
throw new Error(pluginName + ' requires plugin ' + unfulfilledDependencies[0]); | ||
} else if (unfulfilledDependencies.length > 1) { | ||
throw new Error(pluginName + ' requires plugins ' + | ||
unfulfilledDependencies.slice(0, -1).join(', ') + | ||
' and ' + unfulfilledDependencies[unfulfilledDependencies.length - 1]); | ||
} | ||
} | ||
this.installedPlugins.push(plugin); | ||
@@ -856,0 +832,0 @@ if (typeof plugin === 'function') { |
{ | ||
"name": "unexpected", | ||
"version": "10.32.1", | ||
"version": "10.33.0", | ||
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>", | ||
@@ -35,4 +35,2 @@ "keywords": [ | ||
"devDependencies": { | ||
"browserify": "14.3.0", | ||
"bundle-collapser": "1.2.1", | ||
"chewbacca": "1.10.0", | ||
@@ -53,2 +51,7 @@ "coveralls": "^2.11.9", | ||
"nyc": "6.1.1", | ||
"rollup": "0.45.2", | ||
"rollup-plugin-commonjs": "8.0.2", | ||
"rollup-plugin-node-globals": "1.1.0", | ||
"rollup-plugin-node-resolve": "3.0.0", | ||
"rollup-plugin-uglify": "2.0.1", | ||
"rsvp": "3.0.18", | ||
@@ -55,0 +58,0 @@ "serve": "*", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1372989
52
3
1
25
6611