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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * ReactDOMServer v15.5.3
2
+ * ReactDOMServer v15.5.4
3
3
  */
4
4
 
5
5
  ;(function(f) {
@@ -11146,7 +11146,7 @@ module.exports = ReactUpdates;
11146
11146
 
11147
11147
  'use strict';
11148
11148
 
11149
- module.exports = '15.5.3';
11149
+ module.exports = '15.5.4';
11150
11150
  },{}],77:[function(_dereq_,module,exports){
11151
11151
  /**
11152
11152
  * Copyright 2013-present, Facebook, Inc.
@@ -16302,12 +16302,12 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
16302
16302
 
16303
16303
  'use strict';
16304
16304
 
16305
- var invariant = _dereq_(140);
16306
- var warning = _dereq_(147);
16307
-
16308
- var ReactPropTypesSecret = _dereq_(151);
16309
-
16310
- var loggedTypeFailures = {};
16305
+ if ("development" !== 'production') {
16306
+ var invariant = _dereq_(140);
16307
+ var warning = _dereq_(147);
16308
+ var ReactPropTypesSecret = _dereq_(152);
16309
+ var loggedTypeFailures = {};
16310
+ }
16311
16311
 
16312
16312
  /**
16313
16313
  * Assert that the values match with the type specs.
@@ -16336,7 +16336,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
16336
16336
  } catch (ex) {
16337
16337
  error = ex;
16338
16338
  }
16339
- "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;
16339
+ 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);
16340
16340
  if (error instanceof Error && !(error.message in loggedTypeFailures)) {
16341
16341
  // Only monitor this failure once because there tends to be a lot of the
16342
16342
  // same error.
@@ -16344,7 +16344,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
16344
16344
 
16345
16345
  var stack = getStack ? getStack() : '';
16346
16346
 
16347
- "development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '') : void 0;
16347
+ warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
16348
16348
  }
16349
16349
  }
16350
16350
  }
@@ -16353,7 +16353,30 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
16353
16353
 
16354
16354
  module.exports = checkPropTypes;
16355
16355
 
16356
- },{"140":140,"147":147,"151":151}],150:[function(_dereq_,module,exports){
16356
+ },{"140":140,"147":147,"152":152}],150:[function(_dereq_,module,exports){
16357
+ /**
16358
+ * Copyright 2013-present, Facebook, Inc.
16359
+ * All rights reserved.
16360
+ *
16361
+ * This source code is licensed under the BSD-style license found in the
16362
+ * LICENSE file in the root directory of this source tree. An additional grant
16363
+ * of patent rights can be found in the PATENTS file in the same directory.
16364
+ */
16365
+
16366
+ 'use strict';
16367
+
16368
+ // React 15.5 references this module, and assumes PropTypes are still callable in production.
16369
+ // Therefore we re-export development-only version with all the PropTypes checks here.
16370
+ // However if one is migrating to the `prop-types` npm library, they will go through the
16371
+ // `index.js` entry point, and it will branch depending on the environment.
16372
+ var factory = _dereq_(151);
16373
+ module.exports = function(isValidElement) {
16374
+ // It is still allowed in 15.5.
16375
+ var throwOnDirectAccess = false;
16376
+ return factory(isValidElement, throwOnDirectAccess);
16377
+ };
16378
+
16379
+ },{"151":151}],151:[function(_dereq_,module,exports){
16357
16380
  /**
16358
16381
  * Copyright 2013-present, Facebook, Inc.
16359
16382
  * All rights reserved.
@@ -16369,10 +16392,10 @@ var emptyFunction = _dereq_(132);
16369
16392
  var invariant = _dereq_(140);
16370
16393
  var warning = _dereq_(147);
16371
16394
 
16372
- var ReactPropTypesSecret = _dereq_(151);
16395
+ var ReactPropTypesSecret = _dereq_(152);
16373
16396
  var checkPropTypes = _dereq_(149);
16374
16397
 
16375
- module.exports = function (isValidElement) {
16398
+ module.exports = function(isValidElement, throwOnDirectAccess) {
16376
16399
  /* global Symbol */
16377
16400
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
16378
16401
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
@@ -16447,58 +16470,27 @@ module.exports = function (isValidElement) {
16447
16470
 
16448
16471
  var ANONYMOUS = '<<anonymous>>';
16449
16472
 
16450
- var ReactPropTypes;
16451
-
16452
- if ("development" !== 'production') {
16453
- // Keep in sync with production version below
16454
- ReactPropTypes = {
16455
- array: createPrimitiveTypeChecker('array'),
16456
- bool: createPrimitiveTypeChecker('boolean'),
16457
- func: createPrimitiveTypeChecker('function'),
16458
- number: createPrimitiveTypeChecker('number'),
16459
- object: createPrimitiveTypeChecker('object'),
16460
- string: createPrimitiveTypeChecker('string'),
16461
- symbol: createPrimitiveTypeChecker('symbol'),
16462
-
16463
- any: createAnyTypeChecker(),
16464
- arrayOf: createArrayOfTypeChecker,
16465
- element: createElementTypeChecker(),
16466
- instanceOf: createInstanceTypeChecker,
16467
- node: createNodeChecker(),
16468
- objectOf: createObjectOfTypeChecker,
16469
- oneOf: createEnumTypeChecker,
16470
- oneOfType: createUnionTypeChecker,
16471
- shape: createShapeTypeChecker
16472
- };
16473
- } else {
16474
- var productionTypeChecker = function () {
16475
- invariant(false, 'React.PropTypes type checking code is stripped in production.');
16476
- };
16477
- productionTypeChecker.isRequired = productionTypeChecker;
16478
- var getProductionTypeChecker = function () {
16479
- return productionTypeChecker;
16480
- };
16481
- // Keep in sync with development version above
16482
- ReactPropTypes = {
16483
- array: productionTypeChecker,
16484
- bool: productionTypeChecker,
16485
- func: productionTypeChecker,
16486
- number: productionTypeChecker,
16487
- object: productionTypeChecker,
16488
- string: productionTypeChecker,
16489
- symbol: productionTypeChecker,
16490
-
16491
- any: productionTypeChecker,
16492
- arrayOf: getProductionTypeChecker,
16493
- element: productionTypeChecker,
16494
- instanceOf: getProductionTypeChecker,
16495
- node: productionTypeChecker,
16496
- objectOf: getProductionTypeChecker,
16497
- oneOf: getProductionTypeChecker,
16498
- oneOfType: getProductionTypeChecker,
16499
- shape: getProductionTypeChecker
16500
- };
16501
- }
16473
+ // Important!
16474
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
16475
+ var ReactPropTypes = {
16476
+ array: createPrimitiveTypeChecker('array'),
16477
+ bool: createPrimitiveTypeChecker('boolean'),
16478
+ func: createPrimitiveTypeChecker('function'),
16479
+ number: createPrimitiveTypeChecker('number'),
16480
+ object: createPrimitiveTypeChecker('object'),
16481
+ string: createPrimitiveTypeChecker('string'),
16482
+ symbol: createPrimitiveTypeChecker('symbol'),
16483
+
16484
+ any: createAnyTypeChecker(),
16485
+ arrayOf: createArrayOfTypeChecker,
16486
+ element: createElementTypeChecker(),
16487
+ instanceOf: createInstanceTypeChecker,
16488
+ node: createNodeChecker(),
16489
+ objectOf: createObjectOfTypeChecker,
16490
+ oneOf: createEnumTypeChecker,
16491
+ oneOfType: createUnionTypeChecker,
16492
+ shape: createShapeTypeChecker
16493
+ };
16502
16494
 
16503
16495
  /**
16504
16496
  * inlined Object.is polyfill to avoid requiring consumers ship their own
@@ -16539,11 +16531,30 @@ module.exports = function (isValidElement) {
16539
16531
  function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
16540
16532
  componentName = componentName || ANONYMOUS;
16541
16533
  propFullName = propFullName || propName;
16542
- if ("development" !== 'production') {
16543
- if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {
16534
+
16535
+ if (secret !== ReactPropTypesSecret) {
16536
+ if (throwOnDirectAccess) {
16537
+ // New behavior only for users of `prop-types` package
16538
+ invariant(
16539
+ false,
16540
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
16541
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
16542
+ 'Read more at http://fb.me/use-check-prop-types'
16543
+ );
16544
+ } else if ("development" !== 'production' && typeof console !== 'undefined') {
16545
+ // Old behavior for people using React.PropTypes
16544
16546
  var cacheKey = componentName + ':' + propName;
16545
16547
  if (!manualPropTypeCallCache[cacheKey]) {
16546
- "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;
16548
+ warning(
16549
+ false,
16550
+ 'You are manually calling a React.PropTypes validation ' +
16551
+ 'function for the `%s` prop on `%s`. This is deprecated ' +
16552
+ 'and will throw in the standalone `prop-types` package. ' +
16553
+ 'You may be seeing this warning due to a third-party PropTypes ' +
16554
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
16555
+ propFullName,
16556
+ componentName
16557
+ );
16547
16558
  manualPropTypeCallCache[cacheKey] = true;
16548
16559
  }
16549
16560
  }
@@ -16839,7 +16850,7 @@ module.exports = function (isValidElement) {
16839
16850
  return ReactPropTypes;
16840
16851
  };
16841
16852
 
16842
- },{"132":132,"140":140,"147":147,"149":149,"151":151}],151:[function(_dereq_,module,exports){
16853
+ },{"132":132,"140":140,"147":147,"149":149,"152":152}],152:[function(_dereq_,module,exports){
16843
16854
  /**
16844
16855
  * Copyright 2013-present, Facebook, Inc.
16845
16856
  * All rights reserved.