react-addons-test-utils
Advanced tools
Comparing version 15.5.1 to 15.6.0-rc.0
58
index.js
@@ -12,13 +12,65 @@ /** | ||
var warning = require('fbjs/lib/warning'); | ||
var lowPriorityWarning = function lowPriorityWarning() {}; | ||
if (process.env.NODE_ENV !== 'production') { | ||
var printWarning = function(format) { | ||
for ( | ||
var _len = arguments.length, | ||
args = Array(_len > 1 ? _len - 1 : 0), | ||
_key = 1; | ||
_key < _len; | ||
_key++ | ||
) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
var argIndex = 0; | ||
var message = | ||
'Warning: ' + | ||
format.replace(/%s/g, function() { | ||
return args[argIndex++]; | ||
}); | ||
if (typeof console !== 'undefined') { | ||
console.warn(message); | ||
} | ||
try { | ||
// --- Welcome to debugging React --- | ||
// This error was thrown as a convenience so that you can use this stack | ||
// to find the callsite that caused this warning to fire. | ||
throw new Error(message); | ||
} catch (x) {} | ||
}; | ||
lowPriorityWarning = function(condition, format) { | ||
if (format === undefined) { | ||
throw new Error( | ||
'`warning(condition, format, ...args)` requires a warning ' + | ||
'message argument' | ||
); | ||
} | ||
if (!condition) { | ||
for ( | ||
var _len2 = arguments.length, | ||
args = Array(_len2 > 2 ? _len2 - 2 : 0), | ||
_key2 = 2; | ||
_key2 < _len2; | ||
_key2++ | ||
) { | ||
args[_key2 - 2] = arguments[_key2]; | ||
} | ||
printWarning.apply(undefined, [format].concat(args)); | ||
} | ||
}; | ||
} | ||
// This package has been deprecated in NPM as of version 15.5.0 | ||
// But NPM deprecation warnings are easy to overlook | ||
// So a more explicit runtime warning seemed appropriate | ||
warning( | ||
lowPriorityWarning( | ||
false, | ||
'ReactTestUtils has been moved to react-dom/test-utils. ' + | ||
'Update references to remove this warning.' | ||
'Update references to remove this warning.' | ||
); | ||
module.exports = require('react-dom/lib/ReactTestUtils'); |
{ | ||
"name": "react-addons-test-utils", | ||
"version": "15.5.1", | ||
"version": "15.6.0-rc.0", | ||
"main": "index.js", | ||
@@ -11,9 +11,9 @@ "repository": "facebook/react", | ||
"license": "BSD-3-Clause", | ||
"dependencies": { | ||
"fbjs": "^0.8.4", | ||
"object-assign": "^4.1.0" | ||
}, | ||
"peerDependencies": { | ||
"react-dom": "^15.4.2" | ||
}, | ||
"scripts": { | ||
"test": "jest", | ||
"prepublish": "npm test" | ||
}, | ||
"devDependencies": { | ||
@@ -20,0 +20,0 @@ "jest": "^19.0.2", |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
6397
1
67
2
2
- Removedfbjs@^0.8.4
- Removedobject-assign@^4.1.0