Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
15.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Apr 11, 2017
1 parent 5cb1d81 commit c17dda4
Show file tree
Hide file tree
Showing 8 changed files with 346 additions and 295 deletions.
151 changes: 81 additions & 70 deletions react-dom-server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* ReactDOMServer v15.5.0
* ReactDOMServer v15.5.4
*/

;(function(f) {
Expand Down Expand Up @@ -11146,7 +11146,7 @@ module.exports = ReactUpdates;

'use strict';

module.exports = '15.5.0';
module.exports = '15.5.4';
},{}],77:[function(_dereq_,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
Expand Down Expand Up @@ -16302,12 +16302,12 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {

'use strict';

var invariant = _dereq_(140);
var warning = _dereq_(147);

var ReactPropTypesSecret = _dereq_(151);

var loggedTypeFailures = {};
if ("development" !== 'production') {
var invariant = _dereq_(140);
var warning = _dereq_(147);
var ReactPropTypesSecret = _dereq_(152);
var loggedTypeFailures = {};
}

/**
* Assert that the values match with the type specs.
Expand Down Expand Up @@ -16336,15 +16336,15 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
} catch (ex) {
error = ex;
}
"development" !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error) : void 0;
warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
// Only monitor this failure once because there tends to be a lot of the
// same error.
loggedTypeFailures[error.message] = true;

var stack = getStack ? getStack() : '';

"development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '') : void 0;
warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
}
}
}
Expand All @@ -16353,7 +16353,30 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {

module.exports = checkPropTypes;

},{"140":140,"147":147,"151":151}],150:[function(_dereq_,module,exports){
},{"140":140,"147":147,"152":152}],150:[function(_dereq_,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

'use strict';

// React 15.5 references this module, and assumes PropTypes are still callable in production.
// Therefore we re-export development-only version with all the PropTypes checks here.
// However if one is migrating to the `prop-types` npm library, they will go through the
// `index.js` entry point, and it will branch depending on the environment.
var factory = _dereq_(151);
module.exports = function(isValidElement) {
// It is still allowed in 15.5.
var throwOnDirectAccess = false;
return factory(isValidElement, throwOnDirectAccess);
};

},{"151":151}],151:[function(_dereq_,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
Expand All @@ -16369,10 +16392,10 @@ var emptyFunction = _dereq_(132);
var invariant = _dereq_(140);
var warning = _dereq_(147);

var ReactPropTypesSecret = _dereq_(151);
var ReactPropTypesSecret = _dereq_(152);
var checkPropTypes = _dereq_(149);

module.exports = function (isValidElement) {
module.exports = function(isValidElement, throwOnDirectAccess) {
/* global Symbol */
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
Expand Down Expand Up @@ -16447,58 +16470,27 @@ module.exports = function (isValidElement) {

var ANONYMOUS = '<<anonymous>>';

var ReactPropTypes;

if ("development" !== 'production') {
// Keep in sync with production version below
ReactPropTypes = {
array: createPrimitiveTypeChecker('array'),
bool: createPrimitiveTypeChecker('boolean'),
func: createPrimitiveTypeChecker('function'),
number: createPrimitiveTypeChecker('number'),
object: createPrimitiveTypeChecker('object'),
string: createPrimitiveTypeChecker('string'),
symbol: createPrimitiveTypeChecker('symbol'),

any: createAnyTypeChecker(),
arrayOf: createArrayOfTypeChecker,
element: createElementTypeChecker(),
instanceOf: createInstanceTypeChecker,
node: createNodeChecker(),
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker
};
} else {
var productionTypeChecker = function () {
invariant(false, 'React.PropTypes type checking code is stripped in production.');
};
productionTypeChecker.isRequired = productionTypeChecker;
var getProductionTypeChecker = function () {
return productionTypeChecker;
};
// Keep in sync with development version above
ReactPropTypes = {
array: productionTypeChecker,
bool: productionTypeChecker,
func: productionTypeChecker,
number: productionTypeChecker,
object: productionTypeChecker,
string: productionTypeChecker,
symbol: productionTypeChecker,

any: productionTypeChecker,
arrayOf: getProductionTypeChecker,
element: productionTypeChecker,
instanceOf: getProductionTypeChecker,
node: productionTypeChecker,
objectOf: getProductionTypeChecker,
oneOf: getProductionTypeChecker,
oneOfType: getProductionTypeChecker,
shape: getProductionTypeChecker
};
}
// Important!
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
var ReactPropTypes = {
array: createPrimitiveTypeChecker('array'),
bool: createPrimitiveTypeChecker('boolean'),
func: createPrimitiveTypeChecker('function'),
number: createPrimitiveTypeChecker('number'),
object: createPrimitiveTypeChecker('object'),
string: createPrimitiveTypeChecker('string'),
symbol: createPrimitiveTypeChecker('symbol'),

any: createAnyTypeChecker(),
arrayOf: createArrayOfTypeChecker,
element: createElementTypeChecker(),
instanceOf: createInstanceTypeChecker,
node: createNodeChecker(),
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker
};

/**
* inlined Object.is polyfill to avoid requiring consumers ship their own
Expand Down Expand Up @@ -16539,11 +16531,30 @@ module.exports = function (isValidElement) {
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
componentName = componentName || ANONYMOUS;
propFullName = propFullName || propName;
if ("development" !== 'production') {
if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {

if (secret !== ReactPropTypesSecret) {
if (throwOnDirectAccess) {
// New behavior only for users of `prop-types` package
invariant(
false,
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
'Use `PropTypes.checkPropTypes()` to call them. ' +
'Read more at http://fb.me/use-check-prop-types'
);
} else if ("development" !== 'production' && typeof console !== 'undefined') {
// Old behavior for people using React.PropTypes
var cacheKey = componentName + ':' + propName;
if (!manualPropTypeCallCache[cacheKey]) {
"development" !== 'production' ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName) : void 0;
warning(
false,
'You are manually calling a React.PropTypes validation ' +
'function for the `%s` prop on `%s`. This is deprecated ' +
'and will throw in the standalone `prop-types` package. ' +
'You may be seeing this warning due to a third-party PropTypes ' +
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
propFullName,
componentName
);
manualPropTypeCallCache[cacheKey] = true;
}
}
Expand Down Expand Up @@ -16839,7 +16850,7 @@ module.exports = function (isValidElement) {
return ReactPropTypes;
};

},{"132":132,"140":140,"147":147,"149":149,"151":151}],151:[function(_dereq_,module,exports){
},{"132":132,"140":140,"147":147,"149":149,"152":152}],152:[function(_dereq_,module,exports){
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
Expand All @@ -16851,7 +16862,7 @@ module.exports = function (isValidElement) {

'use strict';

const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';

module.exports = ReactPropTypesSecret;

Expand Down
10 changes: 5 additions & 5 deletions react-dom-server.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit c17dda4

Please sign in to comment.