react-test-renderer 16.11.0 → 16.12.0

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/build-info.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "branch": "master",
3
- "buildNumber": "54423",
4
- "checksum": "3b849cc",
5
- "commit": "5faf377df",
3
+ "buildNumber": "59518",
4
+ "checksum": "6f449c4",
5
+ "commit": "b53ea6ca0",
6
6
  "environment": "ci",
7
- "reactVersion": "16.10.2-5faf377df"
7
+ "reactVersion": "16.11.0-b53ea6ca0"
8
8
  }
@@ -1,4 +1,4 @@
1
- /** @license React v16.11.0
1
+ /** @license React v16.12.0
2
2
  * react-test-renderer-shallow.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -781,7 +781,7 @@ function () {
781
781
  }
782
782
  }
783
783
 
784
- if (!(reactIs.isForwardRef(element) || typeof element.type === 'function' || reactIs.isMemo(element.type))) {
784
+ if (!(reactIs.isForwardRef(element) || typeof element.type === 'function' || reactIs.isMemo(element))) {
785
785
  {
786
786
  throw Error("ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was `" + (Array.isArray(element.type) ? 'array' : element.type === null ? 'null' : typeof element.type) + "`.");
787
787
  }
@@ -795,13 +795,13 @@ function () {
795
795
  this._reset();
796
796
  }
797
797
 
798
- var elementType = reactIs.isMemo(element.type) ? element.type.type : element.type;
798
+ var elementType = reactIs.isMemo(element) ? element.type.type : element.type;
799
799
  var previousElement = this._element;
800
800
  this._rendering = true;
801
801
  this._element = element;
802
802
  this._context = getMaskedContext(elementType.contextTypes, context); // Inner memo component props aren't currently validated in createElement.
803
803
 
804
- if (reactIs.isMemo(element.type) && elementType.propTypes) {
804
+ if (reactIs.isMemo(element) && elementType.propTypes) {
805
805
  currentlyValidatingElement = element;
806
806
  checkPropTypes(elementType.propTypes, element.props, 'prop', getComponentName(elementType), getStackAddendum);
807
807
  }
@@ -830,7 +830,7 @@ function () {
830
830
  } else {
831
831
  var shouldRender = true;
832
832
 
833
- if (reactIs.isMemo(element.type) && previousElement !== null) {
833
+ if (reactIs.isMemo(element) && previousElement !== null) {
834
834
  // This is a Memo component that is being re-rendered.
835
835
  var compare = element.type.compare || shallowEqual;
836
836
 
@@ -997,7 +997,7 @@ function getDisplayName(element) {
997
997
  } else if (typeof element.type === 'string') {
998
998
  return element.type;
999
999
  } else {
1000
- var elementType = reactIs.isMemo(element.type) ? element.type.type : element.type;
1000
+ var elementType = reactIs.isMemo(element) ? element.type.type : element.type;
1001
1001
  return elementType.displayName || elementType.name || 'Unknown';
1002
1002
  }
1003
1003
  }
@@ -1,4 +1,4 @@
1
- /** @license React v16.11.0
1
+ /** @license React v16.12.0
2
2
  * react-test-renderer-shallow.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -23,12 +23,12 @@ return a._currentValue},useDebugValue:a,useEffect:a,useImperativeHandle:a,useLay
23
23
  d._dispatchAction=function(a,b){if(!(25>this._numberOfReRenders))throw Error(p(301));if(this._rendering){this._didScheduleRenderPhaseUpdate=!0;b={action:b,next:null};var e=this._renderPhaseUpdates;null===e&&(this._renderPhaseUpdates=e=new Map);var c=e.get(a);if(void 0===c)e.set(a,b);else{for(a=c;null!==a.next;)a=a.next;a.next=b}}else{b={action:b,next:null};e=a.first;if(null===e)a.first=b;else{for(;null!==e.next;)e=e.next;e.next=b}this.render(this._element,this._context)}};d._createWorkInProgressHook=
24
24
  function(){null===this._workInProgressHook?null===this._firstWorkInProgressHook?(this._isReRender=!1,this._firstWorkInProgressHook=this._workInProgressHook=O()):(this._isReRender=!0,this._workInProgressHook=this._firstWorkInProgressHook):null===this._workInProgressHook.next?(this._isReRender=!1,this._workInProgressHook=this._workInProgressHook.next=O()):(this._isReRender=!0,this._workInProgressHook=this._workInProgressHook.next);return this._workInProgressHook};d._finishHooks=function(a,b){this._didScheduleRenderPhaseUpdate?
25
25
  (this._didScheduleRenderPhaseUpdate=!1,this._numberOfReRenders+=1,this._workInProgressHook=null,this._rendering=!1,this.render(a,b)):(this._renderPhaseUpdates=this._workInProgressHook=null,this._numberOfReRenders=0)};d.getMountedInstance=function(){return this._instance};d.getRenderOutput=function(){return this._rendered};d.render=function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:M;if(!l.isValidElement(a))throw Error(p(12,"function"===typeof a?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":
26
- ""));if("string"===typeof a.type)throw Error(p(13,a.type));if(!m.isForwardRef(a)&&"function"!==typeof a.type&&!m.isMemo(a.type))throw Error(p(249,Array.isArray(a.type)?"array":null===a.type?"null":typeof a.type));if(!this._rendering){null!=this._element&&this._element.type!==a.type&&this._reset();var e=m.isMemo(a.type)?a.type.type:a.type,c=this._element;this._rendering=!0;this._element=a;var d;if((d=e.contextTypes)&&b){var k={},g;for(g in d)k[g]=b[g];d=k}else d=M;this._context=d;m.isMemo(a.type)&&
27
- e.propTypes&&(Q=a,n(e.propTypes,a.props,"prop",G(e),R));if(this._instance)this._updateClassComponent(e,a,this._context);else if(e.prototype&&e.prototype.isReactComponent)this._instance=new e(a.props,this._context,this._updater),"function"===typeof e.getDerivedStateFromProps&&(b=e.getDerivedStateFromProps.call(null,a.props,this._instance.state),null!=b&&(this._instance.state=h({},this._instance.state,b))),e.contextTypes&&(Q=a,b=(b=this._instance)&&b.constructor,n(e.contextTypes,this._context,"context",
28
- e.displayName||b&&b.displayName||e.name||b&&b.name||null,R),Q=null),this._mountClassComponent(e,a,this._context);else if(d=!0,m.isMemo(a.type)&&null!==c&&(a.type.compare||K)(c.props,a.props)&&(d=!1),d){c=L.current;L.current=this._dispatcher;try{if(e.$$typeof===m.ForwardRef){if("function"!==typeof e.render)throw Error(p(322,typeof e.render));this._rendered=e.render.call(void 0,a.props,a.ref)}else this._rendered=e(a.props,this._context)}finally{L.current=c}this._finishHooks(a,b)}this._rendering=!1;
29
- this._updater._invokeCallbacks();return this.getRenderOutput()}};d.unmount=function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount();this._reset()};d._mountClassComponent=function(a,b,c){this._instance.context=c;this._instance.props=b.props;this._instance.state=this._instance.state||null;this._instance.updater=this._updater;if("function"===typeof this._instance.UNSAFE_componentWillMount||"function"===typeof this._instance.componentWillMount)b=
30
- this._newState,"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&&this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&this._instance.UNSAFE_componentWillMount()),b!==this._newState&&(this._instance.state=this._newState||M);this._rendered=this._instance.render()};d._updateClassComponent=function(a,b,c){b=b.props;var d=this._instance.state||M,
31
- e=this._instance.props;e!==b&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&&this._instance.componentWillReceiveProps(b,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(b,c));var k=this._newState||d;if("function"===typeof a.getDerivedStateFromProps){var g=a.getDerivedStateFromProps.call(null,b,k);null!=g&&
32
- (k=h({},k,g))}g=!0;this._forcedUpdate?(g=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?g=!!this._instance.shouldComponentUpdate(b,k,c):a.prototype&&a.prototype.isPureReactComponent&&(g=!K(e,b)||!K(d,k));g&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&&this._instance.componentWillUpdate(b,k,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&
33
- this._instance.UNSAFE_componentWillUpdate(b,k,c));this._instance.context=c;this._instance.props=b;this._instance.state=k;this._newState=null;g&&(this._rendered=this._instance.render())};return c}();S.createRenderer=function(){return new S};var Q=null;function T(c){if(null==c)return"#empty";if("string"===typeof c||"number"===typeof c)return"#text";if("string"===typeof c.type)return c.type;c=m.isMemo(c.type)?c.type.type:c.type;return c.displayName||c.name||"Unknown"}
26
+ ""));if("string"===typeof a.type)throw Error(p(13,a.type));if(!m.isForwardRef(a)&&"function"!==typeof a.type&&!m.isMemo(a))throw Error(p(249,Array.isArray(a.type)?"array":null===a.type?"null":typeof a.type));if(!this._rendering){null!=this._element&&this._element.type!==a.type&&this._reset();var e=m.isMemo(a)?a.type.type:a.type,c=this._element;this._rendering=!0;this._element=a;var d;if((d=e.contextTypes)&&b){var k={},g;for(g in d)k[g]=b[g];d=k}else d=M;this._context=d;m.isMemo(a)&&e.propTypes&&(Q=
27
+ a,n(e.propTypes,a.props,"prop",G(e),R));if(this._instance)this._updateClassComponent(e,a,this._context);else if(e.prototype&&e.prototype.isReactComponent)this._instance=new e(a.props,this._context,this._updater),"function"===typeof e.getDerivedStateFromProps&&(b=e.getDerivedStateFromProps.call(null,a.props,this._instance.state),null!=b&&(this._instance.state=h({},this._instance.state,b))),e.contextTypes&&(Q=a,b=(b=this._instance)&&b.constructor,n(e.contextTypes,this._context,"context",e.displayName||
28
+ b&&b.displayName||e.name||b&&b.name||null,R),Q=null),this._mountClassComponent(e,a,this._context);else if(d=!0,m.isMemo(a)&&null!==c&&(a.type.compare||K)(c.props,a.props)&&(d=!1),d){c=L.current;L.current=this._dispatcher;try{if(e.$$typeof===m.ForwardRef){if("function"!==typeof e.render)throw Error(p(322,typeof e.render));this._rendered=e.render.call(void 0,a.props,a.ref)}else this._rendered=e(a.props,this._context)}finally{L.current=c}this._finishHooks(a,b)}this._rendering=!1;this._updater._invokeCallbacks();
29
+ return this.getRenderOutput()}};d.unmount=function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount();this._reset()};d._mountClassComponent=function(a,b,c){this._instance.context=c;this._instance.props=b.props;this._instance.state=this._instance.state||null;this._instance.updater=this._updater;if("function"===typeof this._instance.UNSAFE_componentWillMount||"function"===typeof this._instance.componentWillMount)b=this._newState,"function"!==
30
+ typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&&this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&this._instance.UNSAFE_componentWillMount()),b!==this._newState&&(this._instance.state=this._newState||M);this._rendered=this._instance.render()};d._updateClassComponent=function(a,b,c){b=b.props;var d=this._instance.state||M,e=this._instance.props;e!==
31
+ b&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&&this._instance.componentWillReceiveProps(b,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(b,c));var k=this._newState||d;if("function"===typeof a.getDerivedStateFromProps){var g=a.getDerivedStateFromProps.call(null,b,k);null!=g&&(k=h({},k,g))}g=!0;this._forcedUpdate?
32
+ (g=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?g=!!this._instance.shouldComponentUpdate(b,k,c):a.prototype&&a.prototype.isPureReactComponent&&(g=!K(e,b)||!K(d,k));g&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&&this._instance.componentWillUpdate(b,k,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(b,
33
+ k,c));this._instance.context=c;this._instance.props=b;this._instance.state=k;this._newState=null;g&&(this._rendered=this._instance.render())};return c}();S.createRenderer=function(){return new S};var Q=null;function T(c){if(null==c)return"#empty";if("string"===typeof c||"number"===typeof c)return"#text";if("string"===typeof c.type)return c.type;c=m.isMemo(c)?c.type.type:c.type;return c.displayName||c.name||"Unknown"}
34
34
  function R(){var c="";if(Q){var d=T(Q),a=Q._owner,b=Q._source;a=a&&G(a.type);var e="";b?e=" (at "+b.fileName.replace(r,"")+":"+b.lineNumber+")":a&&(e=" (created by "+a+")");c+="\n in "+(d||"Unknown")+e}return c}var U={default:S},V=U&&S||U;module.exports=V.default||V;
@@ -1,4 +1,4 @@
1
- /** @license React v16.11.0
1
+ /** @license React v16.12.0
2
2
  * react-test-renderer.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -422,7 +422,6 @@ var ShouldCapture =
422
422
  /* */
423
423
  4096;
424
424
 
425
- var debugRenderPhaseSideEffects = false;
426
425
  var debugRenderPhaseSideEffectsForStrictMode = false;
427
426
  var enableUserTimingAPI = true;
428
427
  var warnAboutDeprecatedLifecycles = true;
@@ -447,6 +446,7 @@ var warnAboutDefaultPropsOnFunctionComponents = false;
447
446
  var warnAboutStringRefs = false;
448
447
  var disableLegacyContext = false;
449
448
  var disableSchedulerTimeoutBasedOnReactExpirationTime = false;
449
+
450
450
  // Only used in www builds.
451
451
 
452
452
  // Flow magic to verify the exports of this file match the original version.
@@ -1897,7 +1897,7 @@ function findCurrentUnmaskedContext(fiber) {
1897
1897
  }
1898
1898
 
1899
1899
  var LegacyRoot = 0;
1900
- var BatchedRoot = 1;
1900
+ var BlockingRoot = 1;
1901
1901
  var ConcurrentRoot = 2;
1902
1902
 
1903
1903
  // Intentionally not named imports because Rollup would use dynamic dispatch for
@@ -2081,10 +2081,10 @@ function flushSyncCallbackQueueImpl() {
2081
2081
  }
2082
2082
 
2083
2083
  var NoMode = 0;
2084
- var StrictMode = 1; // TODO: Remove BatchedMode and ConcurrentMode by reading from the root
2084
+ var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
2085
2085
  // tag instead
2086
2086
 
2087
- var BatchedMode = 2;
2087
+ var BlockingMode = 2;
2088
2088
  var ConcurrentMode = 4;
2089
2089
  var ProfileMode = 8;
2090
2090
 
@@ -3501,7 +3501,7 @@ function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps,
3501
3501
  {
3502
3502
  enterDisallowedContextReadInDEV();
3503
3503
 
3504
- if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
3504
+ if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
3505
3505
  payload.call(instance, prevState, nextProps);
3506
3506
  }
3507
3507
  }
@@ -3535,7 +3535,7 @@ function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps,
3535
3535
  {
3536
3536
  enterDisallowedContextReadInDEV();
3537
3537
 
3538
- if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
3538
+ if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
3539
3539
  _payload.call(instance, prevState, nextProps);
3540
3540
  }
3541
3541
  }
@@ -3848,7 +3848,7 @@ function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromPro
3848
3848
  var prevState = workInProgress.memoizedState;
3849
3849
 
3850
3850
  {
3851
- if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
3851
+ if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
3852
3852
  // Invoke the function an extra time to help detect side-effects.
3853
3853
  getDerivedStateFromProps(nextProps, prevState);
3854
3854
  }
@@ -4095,7 +4095,7 @@ function constructClassInstance(workInProgress, ctor, props, renderExpirationTim
4095
4095
 
4096
4096
 
4097
4097
  {
4098
- if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
4098
+ if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
4099
4099
  new ctor(props, context); // eslint-disable-line no-new
4100
4100
  }
4101
4101
  }
@@ -8038,7 +8038,7 @@ function updateForwardRef(current$$1, workInProgress, Component, nextProps, rend
8038
8038
  setCurrentPhase('render');
8039
8039
  nextChildren = renderWithHooks(current$$1, workInProgress, render, nextProps, ref, renderExpirationTime);
8040
8040
 
8041
- if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
8041
+ if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
8042
8042
  // Only double-render components with Hooks
8043
8043
  if (workInProgress.memoizedState !== null) {
8044
8044
  nextChildren = renderWithHooks(current$$1, workInProgress, render, nextProps, ref, renderExpirationTime);
@@ -8242,7 +8242,7 @@ function updateFunctionComponent(current$$1, workInProgress, Component, nextProp
8242
8242
  setCurrentPhase('render');
8243
8243
  nextChildren = renderWithHooks(current$$1, workInProgress, Component, nextProps, context, renderExpirationTime);
8244
8244
 
8245
- if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
8245
+ if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
8246
8246
  // Only double-render components with Hooks
8247
8247
  if (workInProgress.memoizedState !== null) {
8248
8248
  nextChildren = renderWithHooks(current$$1, workInProgress, Component, nextProps, context, renderExpirationTime);
@@ -8365,7 +8365,7 @@ function finishClassComponent(current$$1, workInProgress, Component, shouldUpdat
8365
8365
  setCurrentPhase('render');
8366
8366
  nextChildren = instance.render();
8367
8367
 
8368
- if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
8368
+ if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
8369
8369
  instance.render();
8370
8370
  }
8371
8371
 
@@ -8738,7 +8738,7 @@ function mountIndeterminateComponent(_current, workInProgress, Component, render
8738
8738
  warningWithoutStack$1(false, '%s uses the legacy contextTypes API which is no longer supported. ' + 'Use React.createContext() with React.useContext() instead.', getComponentName(Component) || 'Unknown');
8739
8739
  }
8740
8740
 
8741
- if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
8741
+ if (debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
8742
8742
  // Only double-render components with Hooks
8743
8743
  if (workInProgress.memoizedState !== null) {
8744
8744
  value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
@@ -8914,8 +8914,8 @@ function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTim
8914
8914
  var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);
8915
8915
  primaryChildFragment.return = workInProgress;
8916
8916
 
8917
- if ((workInProgress.mode & BatchedMode) === NoMode) {
8918
- // Outside of batched mode, we commit the effects from the
8917
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
8918
+ // Outside of blocking mode, we commit the effects from the
8919
8919
  // partially completed, timed-out tree, too.
8920
8920
  var progressedState = workInProgress.memoizedState;
8921
8921
  var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;
@@ -8978,8 +8978,8 @@ function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTim
8978
8978
 
8979
8979
  _primaryChildFragment.child = null;
8980
8980
 
8981
- if ((workInProgress.mode & BatchedMode) === NoMode) {
8982
- // Outside of batched mode, we commit the effects from the
8981
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
8982
+ // Outside of blocking mode, we commit the effects from the
8983
8983
  // partially completed, timed-out tree, too.
8984
8984
  var _progressedChild = _primaryChildFragment.child = workInProgress.child;
8985
8985
 
@@ -9038,8 +9038,8 @@ function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTim
9038
9038
 
9039
9039
  _primaryChildFragment2.return = workInProgress;
9040
9040
 
9041
- if ((workInProgress.mode & BatchedMode) === NoMode) {
9042
- // Outside of batched mode, we commit the effects from the
9041
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
9042
+ // Outside of blocking mode, we commit the effects from the
9043
9043
  // partially completed, timed-out tree, too.
9044
9044
  var _progressedState = workInProgress.memoizedState;
9045
9045
 
@@ -9123,8 +9123,8 @@ function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTim
9123
9123
  // primaryChildFragment.effectTag |= Placement;
9124
9124
 
9125
9125
 
9126
- if ((workInProgress.mode & BatchedMode) === NoMode) {
9127
- // Outside of batched mode, we commit the effects from the
9126
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
9127
+ // Outside of blocking mode, we commit the effects from the
9128
9128
  // partially completed, timed-out tree, too.
9129
9129
  var _progressedState2 = workInProgress.memoizedState;
9130
9130
 
@@ -9193,9 +9193,9 @@ function retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, rend
9193
9193
  function mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderExpirationTime) {
9194
9194
  // During the first pass, we'll bail out and not drill into the children.
9195
9195
  // Instead, we'll leave the content in place and try to hydrate it later.
9196
- if ((workInProgress.mode & BatchedMode) === NoMode) {
9196
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
9197
9197
  {
9198
- warning$1(false, 'Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOM.createSyncRoot(container, { hydrate: true })' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');
9198
+ warning$1(false, 'Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOM.createBlockingRoot(container, { hydrate: true })' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');
9199
9199
  }
9200
9200
 
9201
9201
  workInProgress.expirationTime = Sync;
@@ -9237,7 +9237,7 @@ function updateDehydratedSuspenseComponent(current$$1, workInProgress, suspenseI
9237
9237
  // but after we've already committed once.
9238
9238
  warnIfHydrating();
9239
9239
 
9240
- if ((workInProgress.mode & BatchedMode) === NoMode) {
9240
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
9241
9241
  return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime);
9242
9242
  }
9243
9243
 
@@ -9559,8 +9559,8 @@ function updateSuspenseListComponent(current$$1, workInProgress, renderExpiratio
9559
9559
 
9560
9560
  pushSuspenseContext(workInProgress, suspenseContext);
9561
9561
 
9562
- if ((workInProgress.mode & BatchedMode) === NoMode) {
9563
- // Outside of batched mode, SuspenseList doesn't work so we just
9562
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
9563
+ // Outside of blocking mode, SuspenseList doesn't work so we just
9564
9564
  // use make it a noop by treating it as the default revealOrder.
9565
9565
  workInProgress.memoizedState = null;
9566
9566
  } else {
@@ -9932,7 +9932,12 @@ function beginWork$1(current$$1, workInProgress, renderExpirationTime) {
9932
9932
 
9933
9933
  case Profiler:
9934
9934
  if (enableProfilerTimer) {
9935
- workInProgress.effectTag |= Update;
9935
+ // Profiler should only call onRender when one of its descendants actually rendered.
9936
+ var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
9937
+
9938
+ if (hasChildWork) {
9939
+ workInProgress.effectTag |= Update;
9940
+ }
9936
9941
  }
9937
9942
 
9938
9943
  break;
@@ -9988,10 +9993,11 @@ function beginWork$1(current$$1, workInProgress, renderExpirationTime) {
9988
9993
  case SuspenseListComponent:
9989
9994
  {
9990
9995
  var didSuspendBefore = (current$$1.effectTag & DidCapture) !== NoEffect;
9991
- var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
9996
+
9997
+ var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
9992
9998
 
9993
9999
  if (didSuspendBefore) {
9994
- if (hasChildWork) {
10000
+ if (_hasChildWork) {
9995
10001
  // If something was in fallback state last time, and we have all the
9996
10002
  // same children then we're still in progressive loading state.
9997
10003
  // Something might get unblocked by state updates or retries in the
@@ -10020,7 +10026,7 @@ function beginWork$1(current$$1, workInProgress, renderExpirationTime) {
10020
10026
 
10021
10027
  pushSuspenseContext(workInProgress, suspenseStackCursor.current);
10022
10028
 
10023
- if (hasChildWork) {
10029
+ if (_hasChildWork) {
10024
10030
  break;
10025
10031
  } else {
10026
10032
  // If none of the children had any work, that means that none of
@@ -10203,14 +10209,19 @@ function getSuspenseFallbackChild(fiber) {
10203
10209
  return fiber.child.sibling.child;
10204
10210
  }
10205
10211
 
10212
+ var emptyObject$1 = {};
10213
+
10206
10214
  function collectScopedNodes(node, fn, scopedNodes) {
10207
10215
  if (enableScopeAPI) {
10208
10216
  if (node.tag === HostComponent) {
10209
10217
  var _type = node.type,
10210
- memoizedProps = node.memoizedProps;
10218
+ memoizedProps = node.memoizedProps,
10219
+ stateNode = node.stateNode;
10220
+
10221
+ var _instance = getPublicInstance(stateNode);
10211
10222
 
10212
- if (fn(_type, memoizedProps) === true) {
10213
- scopedNodes.push(getPublicInstance(node.stateNode));
10223
+ if (_instance !== null && fn(_type, memoizedProps || emptyObject$1, _instance) === true) {
10224
+ scopedNodes.push(_instance);
10214
10225
  }
10215
10226
  }
10216
10227
 
@@ -10230,10 +10241,13 @@ function collectFirstScopedNode(node, fn) {
10230
10241
  if (enableScopeAPI) {
10231
10242
  if (node.tag === HostComponent) {
10232
10243
  var _type2 = node.type,
10233
- memoizedProps = node.memoizedProps;
10244
+ memoizedProps = node.memoizedProps,
10245
+ stateNode = node.stateNode;
10234
10246
 
10235
- if (fn(_type2, memoizedProps) === true) {
10236
- return getPublicInstance(node.stateNode);
10247
+ var _instance2 = getPublicInstance(stateNode);
10248
+
10249
+ if (_instance2 !== null && fn(_type2, memoizedProps, _instance2) === true) {
10250
+ return _instance2;
10237
10251
  }
10238
10252
  }
10239
10253
 
@@ -11117,12 +11131,12 @@ function completeWork(current, workInProgress, renderExpirationTime) {
11117
11131
  }
11118
11132
 
11119
11133
  if (nextDidTimeout && !prevDidTimeout) {
11120
- // If this subtreee is running in batched mode we can suspend,
11134
+ // If this subtreee is running in blocking mode we can suspend,
11121
11135
  // otherwise we won't suspend.
11122
11136
  // TODO: This will still suspend a synchronous tree if anything
11123
11137
  // in the concurrent tree already suspended during this render.
11124
11138
  // This is a known bug.
11125
- if ((workInProgress.mode & BatchedMode) !== NoMode) {
11139
+ if ((workInProgress.mode & BlockingMode) !== NoMode) {
11126
11140
  // TODO: Move this back to throwException because this is too late
11127
11141
  // if this is a large tree which is common for initial loads. We
11128
11142
  // don't know if we should restart a render or not until we get
@@ -11311,9 +11325,9 @@ function completeWork(current, workInProgress, renderExpirationTime) {
11311
11325
 
11312
11326
  cutOffTailIfNeeded(renderState, true); // This might have been modified.
11313
11327
 
11314
- if (renderState.tail === null && renderState.tailMode === 'hidden') {
11328
+ if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate) {
11315
11329
  // We need to delete the row we just rendered.
11316
- // Reset the effect list to what it w as before we rendered this
11330
+ // Reset the effect list to what it was before we rendered this
11317
11331
  // child. The nested children have already appended themselves.
11318
11332
  var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
11319
11333
 
@@ -13446,17 +13460,17 @@ function throwException(root, returnFiber, sourceFiber, value, renderExpirationT
13446
13460
  _workInProgress.updateQueue = updateQueue;
13447
13461
  } else {
13448
13462
  thenables.add(thenable);
13449
- } // If the boundary is outside of batched mode, we should *not*
13463
+ } // If the boundary is outside of blocking mode, we should *not*
13450
13464
  // suspend the commit. Pretend as if the suspended component rendered
13451
13465
  // null and keep rendering. In the commit phase, we'll schedule a
13452
13466
  // subsequent synchronous update to re-render the Suspense.
13453
13467
  //
13454
13468
  // Note: It doesn't matter whether the component that suspended was
13455
- // inside a batched mode tree. If the Suspense is outside of it, we
13469
+ // inside a blocking mode tree. If the Suspense is outside of it, we
13456
13470
  // should *not* suspend the commit.
13457
13471
 
13458
13472
 
13459
- if ((_workInProgress.mode & BatchedMode) === NoMode) {
13473
+ if ((_workInProgress.mode & BlockingMode) === NoMode) {
13460
13474
  _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete.
13461
13475
  // But we shouldn't call any lifecycle methods or callbacks. Remove
13462
13476
  // all lifecycle effect tags.
@@ -13700,7 +13714,7 @@ function getCurrentTime() {
13700
13714
  function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
13701
13715
  var mode = fiber.mode;
13702
13716
 
13703
- if ((mode & BatchedMode) === NoMode) {
13717
+ if ((mode & BlockingMode) === NoMode) {
13704
13718
  return Sync;
13705
13719
  }
13706
13720
 
@@ -13801,7 +13815,7 @@ function scheduleUpdateOnFiber(fiber, expirationTime) {
13801
13815
  // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
13802
13816
  // scheduleCallbackForFiber to preserve the ability to schedule a callback
13803
13817
  // without immediately flushing it. We only do this for user-initiated
13804
- // updates, to preserve historical behavior of sync mode.
13818
+ // updates, to preserve historical behavior of legacy mode.
13805
13819
  flushSyncCallbackQueue();
13806
13820
  }
13807
13821
  }
@@ -14920,7 +14934,16 @@ function commitRoot(root) {
14920
14934
  }
14921
14935
 
14922
14936
  function commitRootImpl(root, renderPriorityLevel) {
14923
- flushPassiveEffects();
14937
+ do {
14938
+ // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
14939
+ // means `flushPassiveEffects` will sometimes result in additional
14940
+ // passive effects. So we need to keep flushing in a loop until there are
14941
+ // no more pending effects.
14942
+ // TODO: Might be better if `flushPassiveEffects` did not automatically
14943
+ // flush synchronous work at the end, to avoid factoring hazards like this.
14944
+ flushPassiveEffects();
14945
+ } while (rootWithPendingPassiveEffects !== null);
14946
+
14924
14947
  flushRenderPhaseStrictModeWarningsInDEV();
14925
14948
 
14926
14949
  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
@@ -15847,7 +15870,7 @@ var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent
15847
15870
  function warnIfUnmockedScheduler(fiber) {
15848
15871
  {
15849
15872
  if (didWarnAboutUnmockedScheduler === false && Scheduler$1.unstable_flushAllWithoutAsserting === undefined) {
15850
- if (fiber.mode & BatchedMode || fiber.mode & ConcurrentMode) {
15873
+ if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
15851
15874
  didWarnAboutUnmockedScheduler = true;
15852
15875
  warningWithoutStack$1(false, 'In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler');
15853
15876
  } else if (warnAboutUnmockedScheduler === true) {
@@ -16490,9 +16513,9 @@ function createHostRootFiber(tag) {
16490
16513
  var mode;
16491
16514
 
16492
16515
  if (tag === ConcurrentRoot) {
16493
- mode = ConcurrentMode | BatchedMode | StrictMode;
16494
- } else if (tag === BatchedRoot) {
16495
- mode = BatchedMode | StrictMode;
16516
+ mode = ConcurrentMode | BlockingMode | StrictMode;
16517
+ } else if (tag === BlockingRoot) {
16518
+ mode = BlockingMode | StrictMode;
16496
16519
  } else {
16497
16520
  mode = NoMode;
16498
16521
  }
@@ -16534,7 +16557,7 @@ key, pendingProps, owner, mode, expirationTime) {
16534
16557
 
16535
16558
  case REACT_CONCURRENT_MODE_TYPE:
16536
16559
  fiberTag = Mode;
16537
- mode |= ConcurrentMode | BatchedMode | StrictMode;
16560
+ mode |= ConcurrentMode | BlockingMode | StrictMode;
16538
16561
  break;
16539
16562
 
16540
16563
  case REACT_STRICT_MODE_TYPE:
@@ -17153,7 +17176,7 @@ function injectIntoDevTools(devToolsConfig) {
17153
17176
 
17154
17177
  // TODO: this is special because it gets imported during build.
17155
17178
 
17156
- var ReactVersion = '16.11.0';
17179
+ var ReactVersion = '16.12.0';
17157
17180
 
17158
17181
  var didWarnAboutMessageChannel = false;
17159
17182
  var enqueueTask;
@@ -1,4 +1,4 @@
1
- /** @license React v16.11.0
1
+ /** @license React v16.12.0
2
2
  * react-test-renderer.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -132,16 +132,16 @@ internalInstanceHandle:b,rootContainerInstance:f,tag:"INSTANCE"},Ed(c,b,!1,!1),b
132
132
  c&&(d=c.memoizedState,f=null!==d,!e&&null!==d&&(d=c.child.sibling,null!==d))){var g=b.firstEffect;null!==g?(b.firstEffect=d,d.nextEffect=g):(b.firstEffect=b.lastEffect=d,d.nextEffect=null);d.effectTag=8}if(e&&!f&&0!==(b.mode&2))if(null===c&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(K.current&1))X===ne&&(X=qe);else{if(X===ne||X===qe)X=re;0!==xe&&null!==U&&(Je(U,W),Ke(U,xe))}if(e||f)b.effectTag|=4;break;case 7:break;case 8:break;case 12:break;case 4:xc(b);Fd(b);break;case 10:Gb(b);break;
133
133
  case 9:break;case 14:break;case 17:C(b.type)&&Sa(b);break;case 19:x(K,b);e=b.memoizedState;if(null===e)break;f=0!==(b.effectTag&64);g=e.rendering;if(null===g)if(f)Id(e,!1);else{if(X!==ne||null!==c&&0!==(c.effectTag&64))for(c=b.child;null!==c;){g=Ac(c);if(null!==g){b.effectTag|=64;Id(e,!1);c=g.updateQueue;null!==c&&(b.updateQueue=c,b.effectTag|=4);null===e.lastEffect&&(b.firstEffect=null);b.lastEffect=e.lastEffect;c=d;for(e=b.child;null!==e;)f=e,d=c,f.effectTag&=2,f.nextEffect=null,f.firstEffect=null,
134
134
  f.lastEffect=null,g=f.alternate,null===g?(f.childExpirationTime=0,f.expirationTime=d,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null):(f.childExpirationTime=g.childExpirationTime,f.expirationTime=g.expirationTime,f.child=g.child,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,d=g.dependencies,f.dependencies=null===d?null:{expirationTime:d.expirationTime,firstContext:d.firstContext,responders:d.responders}),e=
135
- e.sibling;z(K,K.current&1|2,b);b=b.child;break a}c=c.sibling}}else{if(!f)if(c=Ac(g),null!==c){if(b.effectTag|=64,f=!0,c=c.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),Id(e,!0),null===e.tail&&"hidden"===e.tailMode){b=b.lastEffect=e.lastEffect;null!==b&&(b.nextEffect=null);break}}else E()>e.tailExpiration&&1<d&&(b.effectTag|=64,f=!0,Id(e,!1),b.expirationTime=b.childExpirationTime=d-1);e.isBackwards?(g.sibling=b.child,b.child=g):(c=e.last,null!==c?c.sibling=g:b.child=g,e.last=g)}if(null!==
136
- e.tail){0===e.tailExpiration&&(e.tailExpiration=E()+500);c=e.tail;e.rendering=c;e.tail=c.sibling;e.lastEffect=b.lastEffect;c.sibling=null;e=K.current;e=f?e&1|2:e&1;z(K,e,b);b=c;break a}break;case 20:break;case 21:break;default:throw Error(p(156,b.tag));}b=null}c=V;if(1===W||1!==c.childExpirationTime){e=0;for(f=c.child;null!==f;)d=f.expirationTime,g=f.childExpirationTime,d>e&&(e=d),g>e&&(e=g),f=f.sibling;c.childExpirationTime=e}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&
137
- (a.firstEffect=V.firstEffect),null!==V.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=V.firstEffect),a.lastEffect=V.lastEffect),1<V.effectTag&&(null!==a.lastEffect?a.lastEffect.nextEffect=V:a.firstEffect=V,a.lastEffect=V))}else{b=Jd(V,W);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=V.sibling;if(null!==b)return b;V=a}while(null!==V);X===ne&&(X=se);return null}
135
+ e.sibling;z(K,K.current&1|2,b);b=b.child;break a}c=c.sibling}}else{if(!f)if(c=Ac(g),null!==c){if(b.effectTag|=64,f=!0,c=c.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),Id(e,!0),null===e.tail&&"hidden"===e.tailMode&&!g.alternate){b=b.lastEffect=e.lastEffect;null!==b&&(b.nextEffect=null);break}}else E()>e.tailExpiration&&1<d&&(b.effectTag|=64,f=!0,Id(e,!1),b.expirationTime=b.childExpirationTime=d-1);e.isBackwards?(g.sibling=b.child,b.child=g):(c=e.last,null!==c?c.sibling=g:b.child=g,e.last=
136
+ g)}if(null!==e.tail){0===e.tailExpiration&&(e.tailExpiration=E()+500);c=e.tail;e.rendering=c;e.tail=c.sibling;e.lastEffect=b.lastEffect;c.sibling=null;e=K.current;e=f?e&1|2:e&1;z(K,e,b);b=c;break a}break;case 20:break;case 21:break;default:throw Error(p(156,b.tag));}b=null}c=V;if(1===W||1!==c.childExpirationTime){e=0;for(f=c.child;null!==f;)d=f.expirationTime,g=f.childExpirationTime,d>e&&(e=d),g>e&&(e=g),f=f.sibling;c.childExpirationTime=e}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===
137
+ a.firstEffect&&(a.firstEffect=V.firstEffect),null!==V.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=V.firstEffect),a.lastEffect=V.lastEffect),1<V.effectTag&&(null!==a.lastEffect?a.lastEffect.nextEffect=V:a.firstEffect=V,a.lastEffect=V))}else{b=Jd(V,W);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=V.sibling;if(null!==b)return b;V=a}while(null!==V);X===ne&&(X=se);return null}
138
138
  function Te(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function Ue(a){var b=pb();rb(99,af.bind(null,a,b));return null}
139
- function af(a,b){Oe();if((T&(le|me))!==S)throw Error(p(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(p(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Te(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=d-1);d<=a.lastPingedTime&&
140
- (a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===U&&(V=U=null,W=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=T;T|=me;je.current=null;Y=e;do try{bf()}catch(Aa){if(null===Y)throw Error(p(330));Od(Y,Aa);Y=Y.nextEffect}while(null!==Y);Y=e;do try{for(var g=a,k=b;null!==Y;){var h=Y.effectTag;if(h&128){var l=Y.alternate;if(null!==l){var n=l.ref;null!==n&&("function"===typeof n?n(null):n.current=null)}}switch(h&
141
- 1038){case 2:Xd(Y);Y.effectTag&=-3;break;case 6:Xd(Y);Y.effectTag&=-3;Yd(Y.alternate,Y);break;case 1024:Y.effectTag&=-1025;break;case 1028:Y.effectTag&=-1025;Yd(Y.alternate,Y);break;case 4:Yd(Y.alternate,Y);break;case 8:var D=Y;Ud(g,D,k);Vd(D)}Y=Y.nextEffect}}catch(Aa){if(null===Y)throw Error(p(330));Od(Y,Aa);Y=Y.nextEffect}while(null!==Y);a.current=c;Y=e;do try{for(h=d;null!==Y;){var y=Y.effectTag;if(y&36){var F=Y.alternate;l=Y;n=h;switch(l.tag){case 0:case 11:case 15:Rd(16,32,l);break;case 1:var ea=
142
- l.stateNode;if(l.effectTag&4)if(null===F)ea.componentDidMount();else{var fa=l.elementType===l.type?F.memoizedProps:G(l.type,F.memoizedProps);ea.componentDidUpdate(fa,F.memoizedState,ea.__reactInternalSnapshotBeforeUpdate)}var q=l.updateQueue;null!==q&&Vb(l,q,ea,n);break;case 3:var r=l.updateQueue;if(null!==r){g=null;if(null!==l.child)switch(l.child.tag){case 5:g=Ia(l.child.stateNode);break;case 1:g=l.child.stateNode}Vb(l,r,g,n)}break;case 5:break;case 6:break;case 4:break;case 12:break;case 13:break;
143
- case 19:case 17:case 20:case 21:break;default:throw Error(p(163));}}if(y&128){l=void 0;var w=Y.ref;if(null!==w){var M=Y.stateNode;switch(Y.tag){case 5:l=Ia(M);break;default:l=M}"function"===typeof w?w(l):w.current=l}}Y=Y.nextEffect}}catch(Aa){if(null===Y)throw Error(p(330));Od(Y,Aa);Y=Y.nextEffect}while(null!==Y);Y=null;kb();T=f}else a.current=c;if(Ae)Ae=!1,Be=a,Ce=b;else for(Y=e;null!==Y;)b=Y.nextEffect,Y.nextEffect=null,Y=b;b=a.firstPendingTime;0===b&&(ge=null);1073741823===b?a===Fe?Ee++:(Ee=0,
144
- Fe=a):Ee=0;"function"===typeof cf&&cf(c.stateNode,d);Z(a);if(de)throw de=!1,a=ee,ee=null,a;if((T&ke)!==S)return null;vb();return null}function bf(){for(;null!==Y;){var a=Y.effectTag;0!==(a&256)&&Qd(Y.alternate,Y);0===(a&512)||Ae||(Ae=!0,sb(97,function(){Oe();return null}));Y=Y.nextEffect}}function Oe(){if(90!==Ce){var a=97<Ce?97:Ce;Ce=90;return rb(a,df)}}
139
+ function af(a,b){do Oe();while(null!==Be);if((T&(le|me))!==S)throw Error(p(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(p(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Te(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=
140
+ d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===U&&(V=U=null,W=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=T;T|=me;je.current=null;Y=e;do try{bf()}catch(Aa){if(null===Y)throw Error(p(330));Od(Y,Aa);Y=Y.nextEffect}while(null!==Y);Y=e;do try{for(var g=a,k=b;null!==Y;){var h=Y.effectTag;if(h&128){var l=Y.alternate;if(null!==l){var n=l.ref;null!==n&&("function"===typeof n?n(null):
141
+ n.current=null)}}switch(h&1038){case 2:Xd(Y);Y.effectTag&=-3;break;case 6:Xd(Y);Y.effectTag&=-3;Yd(Y.alternate,Y);break;case 1024:Y.effectTag&=-1025;break;case 1028:Y.effectTag&=-1025;Yd(Y.alternate,Y);break;case 4:Yd(Y.alternate,Y);break;case 8:var D=Y;Ud(g,D,k);Vd(D)}Y=Y.nextEffect}}catch(Aa){if(null===Y)throw Error(p(330));Od(Y,Aa);Y=Y.nextEffect}while(null!==Y);a.current=c;Y=e;do try{for(h=d;null!==Y;){var y=Y.effectTag;if(y&36){var F=Y.alternate;l=Y;n=h;switch(l.tag){case 0:case 11:case 15:Rd(16,
142
+ 32,l);break;case 1:var ea=l.stateNode;if(l.effectTag&4)if(null===F)ea.componentDidMount();else{var fa=l.elementType===l.type?F.memoizedProps:G(l.type,F.memoizedProps);ea.componentDidUpdate(fa,F.memoizedState,ea.__reactInternalSnapshotBeforeUpdate)}var q=l.updateQueue;null!==q&&Vb(l,q,ea,n);break;case 3:var r=l.updateQueue;if(null!==r){g=null;if(null!==l.child)switch(l.child.tag){case 5:g=Ia(l.child.stateNode);break;case 1:g=l.child.stateNode}Vb(l,r,g,n)}break;case 5:break;case 6:break;case 4:break;
143
+ case 12:break;case 13:break;case 19:case 17:case 20:case 21:break;default:throw Error(p(163));}}if(y&128){l=void 0;var w=Y.ref;if(null!==w){var M=Y.stateNode;switch(Y.tag){case 5:l=Ia(M);break;default:l=M}"function"===typeof w?w(l):w.current=l}}Y=Y.nextEffect}}catch(Aa){if(null===Y)throw Error(p(330));Od(Y,Aa);Y=Y.nextEffect}while(null!==Y);Y=null;kb();T=f}else a.current=c;if(Ae)Ae=!1,Be=a,Ce=b;else for(Y=e;null!==Y;)b=Y.nextEffect,Y.nextEffect=null,Y=b;b=a.firstPendingTime;0===b&&(ge=null);1073741823===
144
+ b?a===Fe?Ee++:(Ee=0,Fe=a):Ee=0;"function"===typeof cf&&cf(c.stateNode,d);Z(a);if(de)throw de=!1,a=ee,ee=null,a;if((T&ke)!==S)return null;vb();return null}function bf(){for(;null!==Y;){var a=Y.effectTag;0!==(a&256)&&Qd(Y.alternate,Y);0===(a&512)||Ae||(Ae=!0,sb(97,function(){Oe();return null}));Y=Y.nextEffect}}function Oe(){if(90!==Ce){var a=97<Ce?97:Ce;Ce=90;return rb(a,df)}}
145
145
  function df(){if(null===Be)return!1;var a=Be;Be=null;if((T&(le|me))!==S)throw Error(p(331));var b=T;T|=me;for(a=a.current.firstEffect;null!==a;){try{var c=a;if(0!==(c.effectTag&512))switch(c.tag){case 0:case 11:case 15:Rd(128,0,c),Rd(0,64,c)}}catch(d){if(null===a)throw Error(p(330));Od(a,d)}c=a.nextEffect;a.nextEffect=null;a=c}T=b;vb();return!0}function ef(a,b,c){b=Kd(c,b);b=ce(a,b,1073741823);Ob(a,b);a=He(a,1073741823);null!==a&&Z(a)}
146
146
  function Od(a,b){if(3===a.tag)ef(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){ef(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===ge||!ge.has(d))){a=Kd(b,a);a=fe(c,a,1073741823);Ob(c,a);c=He(c,1073741823);null!==c&&Z(c);break}}c=c.return}}
147
147
  function Xe(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);U===a&&W===c?X===re||X===qe&&1073741823===ue&&E()-Zd<ze?Pe(a,W):ye=!0:Me(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,a.finishedExpirationTime===c&&(a.finishedExpirationTime=0,a.finishedWork=null),Z(a)))}function ae(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=$b(),b=ac(b,a,null));a=He(a,b);null!==a&&Z(a)}var $e;
@@ -181,4 +181,4 @@ f.current)return null;a:{var a=f.current;if(a.child)switch(a.child.tag){case 5:a
181
181
  a.length)throw Error("Can't access .root on unmounted test renderer");return 1===a.length?a[0]:Ef(f.current)}});return a},unstable_batchedUpdates:We,act:function(a){function b(){uf--;qf.current=c}!1===vf&&(vf=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));uf++;var c=qf.current;qf.current=!0;try{var d=We(a)}catch(e){throw b(),e;}if(null!==d&&"object"===typeof d&&"function"===typeof d.then)return{then:function(a,f){d.then(function(){1<
182
182
  uf||!0===rf&&!0===c?(b(),a()):tf(function(c){b();c?f(c):a()})},function(a){b();f(a)})}};try{1!==uf||!1!==rf&&!1!==c||sf(),b()}catch(e){throw b(),e;}return{then:function(a){a()}}}},Jf=new WeakMap;function Ef(a){var b=Jf.get(a);void 0===b&&null!==a.alternate&&(b=Jf.get(a.alternate));void 0===b&&(b=new Hf(a),Jf.set(a,b));return b}
183
183
  (function(a){var b=a.findFiberByHostInstance;return gf(aa({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:t.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=Da(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:function(){throw Error("TestRenderer does not support findFiberByHostInstance()");
184
- },bundleType:0,version:"16.11.0",rendererPackageName:"react-test-renderer"});var Kf={default:If},Lf=Kf&&If||Kf;module.exports=Lf.default||Lf;
184
+ },bundleType:0,version:"16.12.0",rendererPackageName:"react-test-renderer"});var Kf={default:If},Lf=Kf&&If||Kf;module.exports=Lf.default||Lf;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-test-renderer",
3
- "version": "16.11.0",
3
+ "version": "16.12.0",
4
4
  "description": "React package for snapshot testing.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "object-assign": "^4.1.1",
23
23
  "prop-types": "^15.6.2",
24
24
  "react-is": "^16.8.6",
25
- "scheduler": "^0.17.0"
25
+ "scheduler": "^0.18.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^16.0.0"
@@ -1,4 +1,4 @@
1
- /** @license React v16.11.0
1
+ /** @license React v16.12.0
2
2
  * react-test-renderer-shallow.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -82,6 +82,8 @@ function typeOf(object) {
82
82
  switch ($$typeofType) {
83
83
  case REACT_CONTEXT_TYPE:
84
84
  case REACT_FORWARD_REF_TYPE:
85
+ case REACT_LAZY_TYPE:
86
+ case REACT_MEMO_TYPE:
85
87
  case REACT_PROVIDER_TYPE:
86
88
  return $$typeofType;
87
89
 
@@ -91,8 +93,6 @@ function typeOf(object) {
91
93
 
92
94
  }
93
95
 
94
- case REACT_LAZY_TYPE:
95
- case REACT_MEMO_TYPE:
96
96
  case REACT_PORTAL_TYPE:
97
97
  return $$typeof;
98
98
  }
@@ -981,7 +981,7 @@ function () {
981
981
  }
982
982
  }
983
983
 
984
- if (!(isForwardRef(element) || typeof element.type === 'function' || isMemo(element.type))) {
984
+ if (!(isForwardRef(element) || typeof element.type === 'function' || isMemo(element))) {
985
985
  {
986
986
  throw Error("ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was `" + (Array.isArray(element.type) ? 'array' : element.type === null ? 'null' : typeof element.type) + "`.");
987
987
  }
@@ -995,13 +995,13 @@ function () {
995
995
  this._reset();
996
996
  }
997
997
 
998
- var elementType = isMemo(element.type) ? element.type.type : element.type;
998
+ var elementType = isMemo(element) ? element.type.type : element.type;
999
999
  var previousElement = this._element;
1000
1000
  this._rendering = true;
1001
1001
  this._element = element;
1002
1002
  this._context = getMaskedContext(elementType.contextTypes, context); // Inner memo component props aren't currently validated in createElement.
1003
1003
 
1004
- if (isMemo(element.type) && elementType.propTypes) {
1004
+ if (isMemo(element) && elementType.propTypes) {
1005
1005
  currentlyValidatingElement = element;
1006
1006
  checkPropTypes_1(elementType.propTypes, element.props, 'prop', getComponentName(elementType), getStackAddendum);
1007
1007
  }
@@ -1030,7 +1030,7 @@ function () {
1030
1030
  } else {
1031
1031
  var shouldRender = true;
1032
1032
 
1033
- if (isMemo(element.type) && previousElement !== null) {
1033
+ if (isMemo(element) && previousElement !== null) {
1034
1034
  // This is a Memo component that is being re-rendered.
1035
1035
  var compare = element.type.compare || shallowEqual;
1036
1036
 
@@ -1197,7 +1197,7 @@ function getDisplayName(element) {
1197
1197
  } else if (typeof element.type === 'string') {
1198
1198
  return element.type;
1199
1199
  } else {
1200
- var elementType = isMemo(element.type) ? element.type.type : element.type;
1200
+ var elementType = isMemo(element) ? element.type.type : element.type;
1201
1201
  return elementType.displayName || elementType.name || 'Unknown';
1202
1202
  }
1203
1203
  }