react-dom 15.5.3 → 15.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-dom.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * ReactDOM v15.5.3
2
+ * ReactDOM v15.5.4
3
3
  */
4
4
 
5
5
  ;(function(f) {
@@ -12162,6 +12162,12 @@ var ReactShallowRenderer = function () {
12162
12162
  }
12163
12163
  };
12164
12164
 
12165
+ ReactShallowRenderer.prototype.unstable_batchedUpdates = function unstable_batchedUpdates(callback, bookkeeping) {
12166
+ // This is used by Enzyme for fake-simulating events in shallow mode.
12167
+ injectDefaults();
12168
+ return ReactUpdates.batchedUpdates(callback, bookkeeping);
12169
+ };
12170
+
12165
12171
  ReactShallowRenderer.prototype._render = function _render(element, transaction, context) {
12166
12172
  if (this._instance) {
12167
12173
  ReactReconciler.receiveComponent(this._instance, element, transaction, context);
@@ -13102,7 +13108,7 @@ module.exports = ReactUpdates;
13102
13108
 
13103
13109
  'use strict';
13104
13110
 
13105
- module.exports = '15.5.3';
13111
+ module.exports = '15.5.4';
13106
13112
  },{}],84:[function(_dereq_,module,exports){
13107
13113
  /**
13108
13114
  * Copyright 2013-present, Facebook, Inc.
@@ -18364,12 +18370,12 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
18364
18370
 
18365
18371
  'use strict';
18366
18372
 
18367
- var invariant = _dereq_(150);
18368
- var warning = _dereq_(157);
18369
-
18370
- var ReactPropTypesSecret = _dereq_(161);
18371
-
18372
- var loggedTypeFailures = {};
18373
+ if ("development" !== 'production') {
18374
+ var invariant = _dereq_(150);
18375
+ var warning = _dereq_(157);
18376
+ var ReactPropTypesSecret = _dereq_(162);
18377
+ var loggedTypeFailures = {};
18378
+ }
18373
18379
 
18374
18380
  /**
18375
18381
  * Assert that the values match with the type specs.
@@ -18398,7 +18404,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
18398
18404
  } catch (ex) {
18399
18405
  error = ex;
18400
18406
  }
18401
- "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;
18407
+ 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);
18402
18408
  if (error instanceof Error && !(error.message in loggedTypeFailures)) {
18403
18409
  // Only monitor this failure once because there tends to be a lot of the
18404
18410
  // same error.
@@ -18406,7 +18412,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
18406
18412
 
18407
18413
  var stack = getStack ? getStack() : '';
18408
18414
 
18409
- "development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '') : void 0;
18415
+ warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
18410
18416
  }
18411
18417
  }
18412
18418
  }
@@ -18415,7 +18421,30 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
18415
18421
 
18416
18422
  module.exports = checkPropTypes;
18417
18423
 
18418
- },{"150":150,"157":157,"161":161}],160:[function(_dereq_,module,exports){
18424
+ },{"150":150,"157":157,"162":162}],160:[function(_dereq_,module,exports){
18425
+ /**
18426
+ * Copyright 2013-present, Facebook, Inc.
18427
+ * All rights reserved.
18428
+ *
18429
+ * This source code is licensed under the BSD-style license found in the
18430
+ * LICENSE file in the root directory of this source tree. An additional grant
18431
+ * of patent rights can be found in the PATENTS file in the same directory.
18432
+ */
18433
+
18434
+ 'use strict';
18435
+
18436
+ // React 15.5 references this module, and assumes PropTypes are still callable in production.
18437
+ // Therefore we re-export development-only version with all the PropTypes checks here.
18438
+ // However if one is migrating to the `prop-types` npm library, they will go through the
18439
+ // `index.js` entry point, and it will branch depending on the environment.
18440
+ var factory = _dereq_(161);
18441
+ module.exports = function(isValidElement) {
18442
+ // It is still allowed in 15.5.
18443
+ var throwOnDirectAccess = false;
18444
+ return factory(isValidElement, throwOnDirectAccess);
18445
+ };
18446
+
18447
+ },{"161":161}],161:[function(_dereq_,module,exports){
18419
18448
  /**
18420
18449
  * Copyright 2013-present, Facebook, Inc.
18421
18450
  * All rights reserved.
@@ -18431,10 +18460,10 @@ var emptyFunction = _dereq_(142);
18431
18460
  var invariant = _dereq_(150);
18432
18461
  var warning = _dereq_(157);
18433
18462
 
18434
- var ReactPropTypesSecret = _dereq_(161);
18463
+ var ReactPropTypesSecret = _dereq_(162);
18435
18464
  var checkPropTypes = _dereq_(159);
18436
18465
 
18437
- module.exports = function (isValidElement) {
18466
+ module.exports = function(isValidElement, throwOnDirectAccess) {
18438
18467
  /* global Symbol */
18439
18468
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
18440
18469
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
@@ -18509,58 +18538,27 @@ module.exports = function (isValidElement) {
18509
18538
 
18510
18539
  var ANONYMOUS = '<<anonymous>>';
18511
18540
 
18512
- var ReactPropTypes;
18513
-
18514
- if ("development" !== 'production') {
18515
- // Keep in sync with production version below
18516
- ReactPropTypes = {
18517
- array: createPrimitiveTypeChecker('array'),
18518
- bool: createPrimitiveTypeChecker('boolean'),
18519
- func: createPrimitiveTypeChecker('function'),
18520
- number: createPrimitiveTypeChecker('number'),
18521
- object: createPrimitiveTypeChecker('object'),
18522
- string: createPrimitiveTypeChecker('string'),
18523
- symbol: createPrimitiveTypeChecker('symbol'),
18524
-
18525
- any: createAnyTypeChecker(),
18526
- arrayOf: createArrayOfTypeChecker,
18527
- element: createElementTypeChecker(),
18528
- instanceOf: createInstanceTypeChecker,
18529
- node: createNodeChecker(),
18530
- objectOf: createObjectOfTypeChecker,
18531
- oneOf: createEnumTypeChecker,
18532
- oneOfType: createUnionTypeChecker,
18533
- shape: createShapeTypeChecker
18534
- };
18535
- } else {
18536
- var productionTypeChecker = function () {
18537
- invariant(false, 'React.PropTypes type checking code is stripped in production.');
18538
- };
18539
- productionTypeChecker.isRequired = productionTypeChecker;
18540
- var getProductionTypeChecker = function () {
18541
- return productionTypeChecker;
18542
- };
18543
- // Keep in sync with development version above
18544
- ReactPropTypes = {
18545
- array: productionTypeChecker,
18546
- bool: productionTypeChecker,
18547
- func: productionTypeChecker,
18548
- number: productionTypeChecker,
18549
- object: productionTypeChecker,
18550
- string: productionTypeChecker,
18551
- symbol: productionTypeChecker,
18552
-
18553
- any: productionTypeChecker,
18554
- arrayOf: getProductionTypeChecker,
18555
- element: productionTypeChecker,
18556
- instanceOf: getProductionTypeChecker,
18557
- node: productionTypeChecker,
18558
- objectOf: getProductionTypeChecker,
18559
- oneOf: getProductionTypeChecker,
18560
- oneOfType: getProductionTypeChecker,
18561
- shape: getProductionTypeChecker
18562
- };
18563
- }
18541
+ // Important!
18542
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
18543
+ var ReactPropTypes = {
18544
+ array: createPrimitiveTypeChecker('array'),
18545
+ bool: createPrimitiveTypeChecker('boolean'),
18546
+ func: createPrimitiveTypeChecker('function'),
18547
+ number: createPrimitiveTypeChecker('number'),
18548
+ object: createPrimitiveTypeChecker('object'),
18549
+ string: createPrimitiveTypeChecker('string'),
18550
+ symbol: createPrimitiveTypeChecker('symbol'),
18551
+
18552
+ any: createAnyTypeChecker(),
18553
+ arrayOf: createArrayOfTypeChecker,
18554
+ element: createElementTypeChecker(),
18555
+ instanceOf: createInstanceTypeChecker,
18556
+ node: createNodeChecker(),
18557
+ objectOf: createObjectOfTypeChecker,
18558
+ oneOf: createEnumTypeChecker,
18559
+ oneOfType: createUnionTypeChecker,
18560
+ shape: createShapeTypeChecker
18561
+ };
18564
18562
 
18565
18563
  /**
18566
18564
  * inlined Object.is polyfill to avoid requiring consumers ship their own
@@ -18601,11 +18599,30 @@ module.exports = function (isValidElement) {
18601
18599
  function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
18602
18600
  componentName = componentName || ANONYMOUS;
18603
18601
  propFullName = propFullName || propName;
18604
- if ("development" !== 'production') {
18605
- if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {
18602
+
18603
+ if (secret !== ReactPropTypesSecret) {
18604
+ if (throwOnDirectAccess) {
18605
+ // New behavior only for users of `prop-types` package
18606
+ invariant(
18607
+ false,
18608
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
18609
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
18610
+ 'Read more at http://fb.me/use-check-prop-types'
18611
+ );
18612
+ } else if ("development" !== 'production' && typeof console !== 'undefined') {
18613
+ // Old behavior for people using React.PropTypes
18606
18614
  var cacheKey = componentName + ':' + propName;
18607
18615
  if (!manualPropTypeCallCache[cacheKey]) {
18608
- "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;
18616
+ warning(
18617
+ false,
18618
+ 'You are manually calling a React.PropTypes validation ' +
18619
+ 'function for the `%s` prop on `%s`. This is deprecated ' +
18620
+ 'and will throw in the standalone `prop-types` package. ' +
18621
+ 'You may be seeing this warning due to a third-party PropTypes ' +
18622
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
18623
+ propFullName,
18624
+ componentName
18625
+ );
18609
18626
  manualPropTypeCallCache[cacheKey] = true;
18610
18627
  }
18611
18628
  }
@@ -18901,7 +18918,7 @@ module.exports = function (isValidElement) {
18901
18918
  return ReactPropTypes;
18902
18919
  };
18903
18920
 
18904
- },{"142":142,"150":150,"157":157,"159":159,"161":161}],161:[function(_dereq_,module,exports){
18921
+ },{"142":142,"150":150,"157":157,"159":159,"162":162}],162:[function(_dereq_,module,exports){
18905
18922
  /**
18906
18923
  * Copyright 2013-present, Facebook, Inc.
18907
18924
  * All rights reserved.