react-test-renderer 16.6.2 → 16.6.3

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.
@@ -6461,9 +6461,6 @@ function updateMemoComponent(current$$1, workInProgress, Component, nextProps, u
6461
6461
  // to a SimpleMemoComponent to allow fast path updates.
6462
6462
  workInProgress.tag = SimpleMemoComponent;
6463
6463
  workInProgress.type = type;
6464
- {
6465
- validateFunctionComponentInDev(workInProgress, type);
6466
- }
6467
6464
  return updateSimpleMemoComponent(current$$1, workInProgress, type, nextProps, updateExpirationTime, renderExpirationTime);
6468
6465
  }
6469
6466
  var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
@@ -6926,52 +6923,48 @@ function mountIndeterminateComponent(_current, workInProgress, Component, render
6926
6923
  // Proceed under the assumption that this is a function component
6927
6924
  workInProgress.tag = FunctionComponent;
6928
6925
  value = finishHooks(Component, props, value, context);
6929
- reconcileChildren(null, workInProgress, value, renderExpirationTime);
6930
6926
  {
6931
- validateFunctionComponentInDev(workInProgress, Component);
6932
- }
6933
- return workInProgress.child;
6934
- }
6935
- }
6936
-
6937
- function validateFunctionComponentInDev(workInProgress, Component) {
6938
- if (Component) {
6939
- !!Component.childContextTypes ? warningWithoutStack$1(false, '%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component') : void 0;
6940
- }
6941
- if (workInProgress.ref !== null) {
6942
- var info = '';
6943
- var ownerName = getCurrentFiberOwnerNameInDevOrNull();
6944
- if (ownerName) {
6945
- info += '\n\nCheck the render method of `' + ownerName + '`.';
6946
- }
6927
+ if (Component) {
6928
+ !!Component.childContextTypes ? warningWithoutStack$1(false, '%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component') : void 0;
6929
+ }
6930
+ if (workInProgress.ref !== null) {
6931
+ var info = '';
6932
+ var ownerName = getCurrentFiberOwnerNameInDevOrNull();
6933
+ if (ownerName) {
6934
+ info += '\n\nCheck the render method of `' + ownerName + '`.';
6935
+ }
6947
6936
 
6948
- var warningKey = ownerName || workInProgress._debugID || '';
6949
- var debugSource = workInProgress._debugSource;
6950
- if (debugSource) {
6951
- warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
6952
- }
6953
- if (!didWarnAboutFunctionRefs[warningKey]) {
6954
- didWarnAboutFunctionRefs[warningKey] = true;
6955
- warning$1(false, 'Function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s', info);
6956
- }
6957
- }
6937
+ var warningKey = ownerName || workInProgress._debugID || '';
6938
+ var debugSource = workInProgress._debugSource;
6939
+ if (debugSource) {
6940
+ warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
6941
+ }
6942
+ if (!didWarnAboutFunctionRefs[warningKey]) {
6943
+ didWarnAboutFunctionRefs[warningKey] = true;
6944
+ warning$1(false, 'Function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s', info);
6945
+ }
6946
+ }
6958
6947
 
6959
- if (typeof Component.getDerivedStateFromProps === 'function') {
6960
- var componentName = getComponentName(Component) || 'Unknown';
6948
+ if (typeof Component.getDerivedStateFromProps === 'function') {
6949
+ var _componentName = getComponentName(Component) || 'Unknown';
6961
6950
 
6962
- if (!didWarnAboutGetDerivedStateOnFunctionComponent[componentName]) {
6963
- warningWithoutStack$1(false, '%s: Function components do not support getDerivedStateFromProps.', componentName);
6964
- didWarnAboutGetDerivedStateOnFunctionComponent[componentName] = true;
6965
- }
6966
- }
6951
+ if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName]) {
6952
+ warningWithoutStack$1(false, '%s: Function components do not support getDerivedStateFromProps.', _componentName);
6953
+ didWarnAboutGetDerivedStateOnFunctionComponent[_componentName] = true;
6954
+ }
6955
+ }
6967
6956
 
6968
- if (typeof Component.contextType === 'object' && Component.contextType !== null) {
6969
- var _componentName = getComponentName(Component) || 'Unknown';
6957
+ if (typeof Component.contextType === 'object' && Component.contextType !== null) {
6958
+ var _componentName2 = getComponentName(Component) || 'Unknown';
6970
6959
 
6971
- if (!didWarnAboutContextTypeOnFunctionComponent[_componentName]) {
6972
- warningWithoutStack$1(false, '%s: Function components do not support contextType.', _componentName);
6973
- didWarnAboutContextTypeOnFunctionComponent[_componentName] = true;
6960
+ if (!didWarnAboutContextTypeOnFunctionComponent[_componentName2]) {
6961
+ warningWithoutStack$1(false, '%s: Function components do not support contextType.', _componentName2);
6962
+ didWarnAboutContextTypeOnFunctionComponent[_componentName2] = true;
6963
+ }
6964
+ }
6974
6965
  }
6966
+ reconcileChildren(null, workInProgress, value, renderExpirationTime);
6967
+ return workInProgress.child;
6975
6968
  }
6976
6969
  }
6977
6970
 
@@ -11493,7 +11486,7 @@ function batchedUpdates$1(fn, bookkeeping) {
11493
11486
 
11494
11487
  // TODO: this is special because it gets imported during build.
11495
11488
 
11496
- var ReactVersion = '16.6.2';
11489
+ var ReactVersion = '16.6.3';
11497
11490
 
11498
11491
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
11499
11492