react-test-renderer
Advanced tools
Comparing version 15.4.1 to 15.4.2
@@ -68,3 +68,13 @@ /** | ||
var element = node; | ||
!(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0; | ||
var type = element.type; | ||
if (typeof type !== 'function' && typeof type !== 'string') { | ||
var info = ''; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { | ||
info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.'; | ||
} | ||
} | ||
info += getDeclarationErrorAddendum(element._owner); | ||
!false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0; | ||
} | ||
@@ -71,0 +81,0 @@ // Special case string values |
@@ -69,13 +69,2 @@ /** | ||
var fiveArgumentPooler = function (a1, a2, a3, a4, a5) { | ||
var Klass = this; | ||
if (Klass.instancePool.length) { | ||
var instance = Klass.instancePool.pop(); | ||
Klass.call(instance, a1, a2, a3, a4, a5); | ||
return instance; | ||
} else { | ||
return new Klass(a1, a2, a3, a4, a5); | ||
} | ||
}; | ||
var standardReleaser = function (instance) { | ||
@@ -120,6 +109,5 @@ var Klass = this; | ||
threeArgumentPooler: threeArgumentPooler, | ||
fourArgumentPooler: fourArgumentPooler, | ||
fiveArgumentPooler: fiveArgumentPooler | ||
fourArgumentPooler: fourArgumentPooler | ||
}; | ||
module.exports = PooledClass; |
@@ -235,3 +235,3 @@ /** | ||
// catch them here, at initialization time, instead. | ||
process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; | ||
process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0; | ||
process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0; | ||
@@ -238,0 +238,0 @@ process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0; |
@@ -13,4 +13,3 @@ /** | ||
var _prodInvariant = require('./reactProdInvariant'), | ||
_assign = require('object-assign'); | ||
var _prodInvariant = require('./reactProdInvariant'); | ||
@@ -20,4 +19,2 @@ var invariant = require('fbjs/lib/invariant'); | ||
var genericComponentClass = null; | ||
// This registry keeps track of wrapper classes around host tags. | ||
var tagToComponentClass = {}; | ||
var textComponentClass = null; | ||
@@ -35,7 +32,2 @@ | ||
textComponentClass = componentClass; | ||
}, | ||
// This accepts a keyed object with classes as values. Each key represents a | ||
// tag. That particular tag will use this class instead of the generic one. | ||
injectComponentClasses: function (componentClasses) { | ||
_assign(tagToComponentClass, componentClasses); | ||
} | ||
@@ -42,0 +34,0 @@ }; |
@@ -13,2 +13,2 @@ /** | ||
module.exports = '15.4.1'; | ||
module.exports = '15.4.2'; |
{ | ||
"name": "react-test-renderer", | ||
"version": "15.4.1", | ||
"version": "15.4.2", | ||
"description": "React package for snapshot testing.", | ||
@@ -17,4 +17,8 @@ "main": "index.js", | ||
"homepage": "https://facebook.github.io/react/", | ||
"dependencies": { | ||
"fbjs": "^0.8.4", | ||
"object-assign": "^4.1.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^15.4.1" | ||
"react": "^15.4.2" | ||
}, | ||
@@ -21,0 +25,0 @@ "files": [ |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
345856
3
8406
181
+ Addedfbjs@^0.8.4
+ Addedobject-assign@^4.1.0