@samitouri / QOS-React / commits / 036ae3c6e2

Use native event dispatching instead of Simulate or SimulateNative (#13023)

* Use native event dispatching instead of Simulate or SimulateNative In #12629 @gaearon suggested that it would be better to drop usage of `ReactTestUtils.Simulate` and `ReactTestUtils.SimulateNative`. In this PR I’m attempting at removing it from a lot of places with only a few leftovers. Those leftovers can be categorized into three groups: 1. Anything that tests that `SimulateNative` throws. This is a property that native event dispatching doesn’t have so I can’t convert that easily. Affected test suites: `EventPluginHub-test`, `ReactBrowserEventEmitter-test`. 2. Anything that tests `ReactTestUtils` directly. Affected test suites: `ReactBrowserEventEmitter-test` (this file has one test that reads "should have mouse enter simulated by test utils"), `ReactTestUtils-test`. 3. Anything that dispatches a `change` event. The reason here goes a bit deeper and is rooted in the way we shim onChange. Usually when using native event dispatching, you would set the node’s `.value` and then dispatch the event. However inside [`inputValueTracking.js`][] we install a setter on the node’s `.value` that will ignore the next `change` event (I found [this][near-perfect-oninput-shim] article from Sophie that explains that this is to avoid onChange when updating the value via JavaScript). All remaining usages of `Simulate` or `SimulateNative` can be avoided by mounting the containers inside the `document` and dispatching native events. Here some remarks: 1. I’m using `Element#click()` instead of `dispatchEvent`. In the jsdom changelog I read that `click()` now properly sets the correct values (you can also verify it does the same thing by looking at the [source][jsdom-source]). 2. I had to update jsdom in order to get `TouchEvent` constructors working (and while doing so also updated jest). There was one unexpected surprise: `ReactScheduler-test` was relying on not having `window.performance` available. I’ve recreated the previous environment by deleting this property from the global object. 3. I was a bit confused that `ReactTestUtils.renderIntoDocument()` does not render into the document 🤷‍ [`inputValueTracking.js`]: https://github.com/facebook/react/blob/392530104c00c25074ce38e1f7e1dd363018c7ce/packages/react-dom/src/client/inputValueTracking.js#L79 [near-perfect-oninput-shim]: https://sophiebits.com/2013/06/18/a-near-perfect-oninput-shim-for-ie-8-and-9.html [jsdom-source]: https://github.com/jsdom/jsdom/blob/45b77f5d21cef74cad278d089937d8462c29acce/lib/jsdom/living/nodes/HTMLElement-impl.js#L43-L76 * Make sure contains are unlinked from the document even if the test fails * Remove unnecessary findDOMNode calls

Philipp Spieß committed Jun 13, 2018 at 13:41 UTC 036ae3c6e2f056adffc31dfb78d1b6f0c63272f0
23 files changed +959 -832
package.json
+1 -1
@@ -69,7 +69,7 @@
69 "gzip-js": "~0.3.2",
70 "gzip-size": "^3.0.0",
71 "jasmine-check": "^1.0.0-rc.0",
72 - "jest": "^23.0.1",
72 + "jest": "^23.1.0",
73 "jest-diff": "^23.0.1",
74 "merge-stream": "^1.0.0",
75 "minimatch": "^3.0.4",
packages/react-dom/src/__tests__/ReactBrowserEventEmitter-test.internal.js
+22 -14
@@ -42,6 +42,8 @@ let getListener;
42 let putListener;
43 let deleteAllListeners;
44
45 +let container;
46 +
47 function registerSimpleTestHandler() {
48 putListener(CHILD, ON_CLICK_KEY, LISTENER);
49 const listener = getListener(CHILD, ON_CLICK_KEY);
@@ -63,7 +65,8 @@ describe('ReactBrowserEventEmitter', () => {
65 ReactBrowserEventEmitter = require('../events/ReactBrowserEventEmitter');
66 ReactTestUtils = require('react-dom/test-utils');
67
66 - const container = document.createElement('div');
68 + container = document.createElement('div');
69 + document.body.appendChild(container);
70
71 let GRANDPARENT_PROPS = {};
72 let PARENT_PROPS = {};
@@ -129,6 +132,11 @@ describe('ReactBrowserEventEmitter', () => {
132 idCallOrder = [];
133 });
134
135 + afterEach(() => {
136 + document.body.removeChild(container);
137 + container = null;
138 + });
139 +
140 it('should store a listener correctly', () => {
141 registerSimpleTestHandler();
142 const listener = getListener(CHILD, ON_CLICK_KEY);
@@ -150,17 +158,17 @@ describe('ReactBrowserEventEmitter', () => {
158
159 it('should invoke a simple handler registered on a node', () => {
160 registerSimpleTestHandler();
153 - ReactTestUtils.Simulate.click(CHILD);
161 + CHILD.click();
162 expect(LISTENER).toHaveBeenCalledTimes(1);
163 });
164
165 it('should not invoke handlers if ReactBrowserEventEmitter is disabled', () => {
166 registerSimpleTestHandler();
167 ReactBrowserEventEmitter.setEnabled(false);
160 - ReactTestUtils.SimulateNative.click(CHILD);
168 + CHILD.click();
169 expect(LISTENER).toHaveBeenCalledTimes(0);
170 ReactBrowserEventEmitter.setEnabled(true);
163 - ReactTestUtils.SimulateNative.click(CHILD);
171 + CHILD.click();
172 expect(LISTENER).toHaveBeenCalledTimes(1);
173 });
174
@@ -168,7 +176,7 @@ describe('ReactBrowserEventEmitter', () => {
176 putListener(CHILD, ON_CLICK_KEY, recordID.bind(null, CHILD));
177 putListener(PARENT, ON_CLICK_KEY, recordID.bind(null, PARENT));
178 putListener(GRANDPARENT, ON_CLICK_KEY, recordID.bind(null, GRANDPARENT));
171 - ReactTestUtils.Simulate.click(CHILD);
179 + CHILD.click();
180 expect(idCallOrder.length).toBe(3);
181 expect(idCallOrder[0]).toBe(CHILD);
182 expect(idCallOrder[1]).toBe(PARENT);
@@ -179,7 +187,7 @@ describe('ReactBrowserEventEmitter', () => {
187 putListener(GRANDPARENT, ON_CLICK_KEY, recordID.bind(null, 'GRANDPARENT'));
188 putListener(PARENT, ON_CLICK_KEY, recordID.bind(null, 'PARENT'));
189 putListener(CHILD, ON_CLICK_KEY, recordID.bind(null, 'CHILD'));
182 - ReactTestUtils.Simulate.click(CHILD);
190 + CHILD.click();
191 expect(idCallOrder).toEqual(['CHILD', 'PARENT', 'GRANDPARENT']);
192
193 idCallOrder = [];
@@ -191,7 +199,7 @@ describe('ReactBrowserEventEmitter', () => {
199 recordID.bind(null, 'UPDATED_GRANDPARENT'),
200 );
201
194 - ReactTestUtils.Simulate.click(CHILD);
202 + CHILD.click();
203 expect(idCallOrder).toEqual(['CHILD', 'PARENT', 'UPDATED_GRANDPARENT']);
204 });
205
@@ -224,7 +232,7 @@ describe('ReactBrowserEventEmitter', () => {
232 recordID(GRANDPARENT);
233 expect(event.currentTarget).toBe(GRANDPARENT);
234 });
227 - ReactTestUtils.Simulate.click(CHILD);
235 + CHILD.click();
236 expect(idCallOrder.length).toBe(3);
237 expect(idCallOrder[0]).toBe(CHILD);
238 expect(idCallOrder[1]).toBe(PARENT);
@@ -239,7 +247,7 @@ describe('ReactBrowserEventEmitter', () => {
247 recordIDAndStopPropagation.bind(null, PARENT),
248 );
249 putListener(GRANDPARENT, ON_CLICK_KEY, recordID.bind(null, GRANDPARENT));
242 - ReactTestUtils.Simulate.click(CHILD);
250 + CHILD.click();
251 expect(idCallOrder.length).toBe(2);
252 expect(idCallOrder[0]).toBe(CHILD);
253 expect(idCallOrder[1]).toBe(PARENT);
@@ -254,7 +262,7 @@ describe('ReactBrowserEventEmitter', () => {
262 e.isPropagationStopped = () => true;
263 });
264 putListener(GRANDPARENT, ON_CLICK_KEY, recordID.bind(null, GRANDPARENT));
257 - ReactTestUtils.Simulate.click(CHILD);
265 + CHILD.click();
266 expect(idCallOrder.length).toBe(2);
267 expect(idCallOrder[0]).toBe(CHILD);
268 expect(idCallOrder[1]).toBe(PARENT);
@@ -268,7 +276,7 @@ describe('ReactBrowserEventEmitter', () => {
276 );
277 putListener(PARENT, ON_CLICK_KEY, recordID.bind(null, PARENT));
278 putListener(GRANDPARENT, ON_CLICK_KEY, recordID.bind(null, GRANDPARENT));
271 - ReactTestUtils.Simulate.click(CHILD);
279 + CHILD.click();
280 expect(idCallOrder.length).toBe(1);
281 expect(idCallOrder[0]).toBe(CHILD);
282 });
@@ -277,7 +285,7 @@ describe('ReactBrowserEventEmitter', () => {
285 putListener(CHILD, ON_CLICK_KEY, recordIDAndReturnFalse.bind(null, CHILD));
286 putListener(PARENT, ON_CLICK_KEY, recordID.bind(null, PARENT));
287 putListener(GRANDPARENT, ON_CLICK_KEY, recordID.bind(null, GRANDPARENT));
280 - ReactTestUtils.Simulate.click(CHILD);
288 + CHILD.click();
289 expect(idCallOrder.length).toBe(3);
290 expect(idCallOrder[0]).toBe(CHILD);
291 expect(idCallOrder[1]).toBe(PARENT);
@@ -300,7 +308,7 @@ describe('ReactBrowserEventEmitter', () => {
308 };
309 putListener(CHILD, ON_CLICK_KEY, handleChildClick);
310 putListener(PARENT, ON_CLICK_KEY, handleParentClick);
303 - ReactTestUtils.Simulate.click(CHILD);
311 + CHILD.click();
312 expect(handleParentClick).toHaveBeenCalledTimes(1);
313 });
314
@@ -310,7 +318,7 @@ describe('ReactBrowserEventEmitter', () => {
318 putListener(PARENT, ON_CLICK_KEY, handleParentClick);
319 };
320 putListener(CHILD, ON_CLICK_KEY, handleChildClick);
313 - ReactTestUtils.Simulate.click(CHILD);
321 + CHILD.click();
322 expect(handleParentClick).toHaveBeenCalledTimes(0);
323 });
324
packages/react-dom/src/__tests__/ReactComponent-test.js
+1 -1
@@ -278,7 +278,7 @@ describe('ReactComponent', () => {
278 componentDidMount() {
279 // Check .props.title to make sure we got the right elements back
280 expect(this.wrapperRef.getTitle()).toBe('wrapper');
281 - expect(ReactDOM.findDOMNode(this.innerRef).className).toBe('inner');
281 + expect(this.innerRef.className).toBe('inner');
282 mounted = true;
283 }
284 }
packages/react-dom/src/__tests__/ReactComponentLifeCycle-test.js
+16 -10
@@ -1065,16 +1065,22 @@ describe('ReactComponentLifeCycle', () => {
1065 }
1066 }
1067
1068 - ReactTestUtils.renderIntoDocument(<Parent />);
1069 - expect(divRef.current.textContent).toBe('remote:0, local:0');
1070 -
1071 - // Trigger setState() calls
1072 - childInstance.updateState();
1073 - expect(divRef.current.textContent).toBe('remote:1, local:1');
1074 -
1075 - // Trigger batched setState() calls
1076 - ReactTestUtils.Simulate.click(divRef.current);
1077 - expect(divRef.current.textContent).toBe('remote:2, local:2');
1068 + const container = document.createElement('div');
1069 + document.body.appendChild(container);
1070 + try {
1071 + ReactDOM.render(<Parent />, container);
1072 + expect(divRef.current.textContent).toBe('remote:0, local:0');
1073 +
1074 + // Trigger setState() calls
1075 + childInstance.updateState();
1076 + expect(divRef.current.textContent).toBe('remote:1, local:1');
1077 +
1078 + // Trigger batched setState() calls
1079 + divRef.current.click();
1080 + expect(divRef.current.textContent).toBe('remote:2, local:2');
1081 + } finally {
1082 + document.body.removeChild(container);
1083 + }
1084 });
1085
1086 it('should pass the return value from getSnapshotBeforeUpdate to componentDidUpdate', () => {
packages/react-dom/src/__tests__/ReactCompositeComponent-test.js
+15 -10
@@ -140,23 +140,28 @@ describe('ReactCompositeComponent', () => {
140 });
141
142 it('should react to state changes from callbacks', () => {
143 - const instance = ReactTestUtils.renderIntoDocument(<MorphingComponent />);
144 - let el = ReactDOM.findDOMNode(instance);
145 - expect(el.tagName).toBe('A');
146 -
147 - ReactTestUtils.Simulate.click(el);
148 - el = ReactDOM.findDOMNode(instance);
149 - expect(el.tagName).toBe('B');
143 + const container = document.createElement('div');
144 + document.body.appendChild(container);
145 + try {
146 + const instance = ReactDOM.render(<MorphingComponent />, container);
147 + let el = ReactDOM.findDOMNode(instance);
148 + expect(el.tagName).toBe('A');
149 + el.click();
150 + el = ReactDOM.findDOMNode(instance);
151 + expect(el.tagName).toBe('B');
152 + } finally {
153 + document.body.removeChild(container);
154 + }
155 });
156
157 it('should rewire refs when rendering to different child types', () => {
158 const instance = ReactTestUtils.renderIntoDocument(<MorphingComponent />);
159
155 - expect(ReactDOM.findDOMNode(instance.refs.x).tagName).toBe('A');
160 + expect(instance.refs.x.tagName).toBe('A');
161 instance._toggleActivatedState();
157 - expect(ReactDOM.findDOMNode(instance.refs.x).tagName).toBe('B');
162 + expect(instance.refs.x.tagName).toBe('B');
163 instance._toggleActivatedState();
159 - expect(ReactDOM.findDOMNode(instance.refs.x).tagName).toBe('A');
164 + expect(instance.refs.x.tagName).toBe('A');
165 });
166
167 it('should not cache old DOM nodes when switching constructors', () => {
packages/react-dom/src/__tests__/ReactCompositeComponentNestedState-test.js
+1 -3
@@ -11,13 +11,11 @@
11
12 let React;
13 let ReactDOM;
14 -let ReactTestUtils;
14
15 describe('ReactCompositeComponentNestedState-state', () => {
16 beforeEach(() => {
17 React = require('react');
18 ReactDOM = require('react-dom');
20 - ReactTestUtils = require('react-dom/test-utils');
19 });
20
21 it('should provide up to date values for props', () => {
@@ -102,7 +100,7 @@ describe('ReactCompositeComponentNestedState-state', () => {
100 void ReactDOM.render(<ParentComponent logger={logger} />, container);
101
102 // click "light green"
105 - ReactTestUtils.Simulate.click(container.childNodes[0].childNodes[3]);
103 + container.childNodes[0].childNodes[3].click();
104
105 expect(logger.mock.calls).toEqual([
106 ['parent-render', 'blue'],
packages/react-dom/src/__tests__/ReactDOM-test.js
+48 -49
@@ -45,23 +45,21 @@ describe('ReactDOM', () => {
45
46 it('allows a DOM element to be used with a string', () => {
47 const element = React.createElement('div', {className: 'foo'});
48 - const instance = ReactTestUtils.renderIntoDocument(element);
49 - expect(ReactDOM.findDOMNode(instance).tagName).toBe('DIV');
48 + const node = ReactTestUtils.renderIntoDocument(element);
49 + expect(node.tagName).toBe('DIV');
50 });
51
52 it('should allow children to be passed as an argument', () => {
53 - const argDiv = ReactTestUtils.renderIntoDocument(
53 + const argNode = ReactTestUtils.renderIntoDocument(
54 React.createElement('div', null, 'child'),
55 );
56 - const argNode = ReactDOM.findDOMNode(argDiv);
56 expect(argNode.innerHTML).toBe('child');
57 });
58
59 it('should overwrite props.children with children argument', () => {
61 - const conflictDiv = ReactTestUtils.renderIntoDocument(
60 + const conflictNode = ReactTestUtils.renderIntoDocument(
61 React.createElement('div', {children: 'fakechild'}, 'child'),
62 );
64 - const conflictNode = ReactDOM.findDOMNode(conflictDiv);
63 expect(conflictNode.innerHTML).toBe('child');
64 });
65
@@ -103,8 +101,7 @@ describe('ReactDOM', () => {
101 <div key="theBird" className="bird" />,
102 </div>,
103 );
106 - const root = ReactDOM.findDOMNode(myDiv);
107 - const dog = root.childNodes[0];
104 + const dog = myDiv.childNodes[0];
105 expect(dog.className).toBe('bigdog');
106 });
107
@@ -242,34 +239,37 @@ describe('ReactDOM', () => {
239 const log = [];
240 const container = document.createElement('div');
241 document.body.appendChild(container);
245 - ReactDOM.render(<A showTwo={false} />, container);
246 - input.focus();
247 -
248 - // When the second input is added, let's simulate losing focus, which is
249 - // something that could happen when manipulating DOM nodes (but is hard to
250 - // deterministically force without relying intensely on React DOM
251 - // implementation details)
252 - const div = container.firstChild;
253 - ['appendChild', 'insertBefore'].forEach(name => {
254 - const mutator = div[name];
255 - div[name] = function() {
256 - if (input) {
257 - input.blur();
258 - expect(document.activeElement.tagName).toBe('BODY');
259 - log.push('input2 inserted');
260 - }
261 - return mutator.apply(this, arguments);
262 - };
263 - });
242 + try {
243 + ReactDOM.render(<A showTwo={false} />, container);
244 + input.focus();
245 +
246 + // When the second input is added, let's simulate losing focus, which is
247 + // something that could happen when manipulating DOM nodes (but is hard to
248 + // deterministically force without relying intensely on React DOM
249 + // implementation details)
250 + const div = container.firstChild;
251 + ['appendChild', 'insertBefore'].forEach(name => {
252 + const mutator = div[name];
253 + div[name] = function() {
254 + if (input) {
255 + input.blur();
256 + expect(document.activeElement.tagName).toBe('BODY');
257 + log.push('input2 inserted');
258 + }
259 + return mutator.apply(this, arguments);
260 + };
261 + });
262
265 - expect(document.activeElement.id).toBe('one');
266 - ReactDOM.render(<A showTwo={true} />, container);
267 - // input2 gets added, which causes input to get blurred. Then
268 - // componentDidUpdate focuses input2 and that should make it down to here,
269 - // not get overwritten by focus restoration.
270 - expect(document.activeElement.id).toBe('two');
271 - expect(log).toEqual(['input2 inserted', 'input2 focused']);
272 - document.body.removeChild(container);
263 + expect(document.activeElement.id).toBe('one');
264 + ReactDOM.render(<A showTwo={true} />, container);
265 + // input2 gets added, which causes input to get blurred. Then
266 + // componentDidUpdate focuses input2 and that should make it down to here,
267 + // not get overwritten by focus restoration.
268 + expect(document.activeElement.id).toBe('two');
269 + expect(log).toEqual(['input2 inserted', 'input2 focused']);
270 + } finally {
271 + document.body.removeChild(container);
272 + }
273 });
274
275 it('calls focus() on autoFocus elements after they have been mounted to the DOM', () => {
@@ -308,15 +308,9 @@ describe('ReactDOM', () => {
308 it("shouldn't fire duplicate event handler while handling other nested dispatch", () => {
309 const actual = [];
310
311 - function click(node) {
312 - ReactTestUtils.Simulate.click(node, {
313 - path: [node, container],
314 - });
315 - }
316 -
311 class Wrapper extends React.Component {
312 componentDidMount() {
319 - click(this.ref1);
313 + this.ref1.click();
314 }
315
316 render() {
@@ -325,7 +319,7 @@ describe('ReactDOM', () => {
319 <div
320 onClick={() => {
321 actual.push('1st node clicked');
328 - click(this.ref2);
322 + this.ref2.click();
323 }}
324 ref={ref => (this.ref1 = ref)}
325 />
@@ -341,13 +335,18 @@ describe('ReactDOM', () => {
335 }
336
337 const container = document.createElement('div');
344 - ReactDOM.render(<Wrapper />, container);
338 + document.body.appendChild(container);
339 + try {
340 + ReactDOM.render(<Wrapper />, container);
341
346 - const expected = [
347 - '1st node clicked',
348 - "2nd node clicked imperatively from 1st's handler",
349 - ];
350 - expect(actual).toEqual(expected);
342 + const expected = [
343 + '1st node clicked',
344 + "2nd node clicked imperatively from 1st's handler",
345 + ];
346 + expect(actual).toEqual(expected);
347 + } finally {
348 + document.body.removeChild(container);
349 + }
350 });
351
352 it('should not crash with devtools installed', () => {
packages/react-dom/src/__tests__/ReactDOMFiber-test.js
+139 -120
@@ -11,7 +11,6 @@
11
12 const React = require('react');
13 const ReactDOM = require('react-dom');
14 -const ReactTestUtils = require('react-dom/test-utils');
14 const PropTypes = require('prop-types');
15
16 describe('ReactDOMFiber', () => {
@@ -843,33 +842,39 @@ describe('ReactDOMFiber', () => {
842
843 it('should bubble events from the portal to the parent', () => {
844 const portalContainer = document.createElement('div');
845 + document.body.appendChild(portalContainer);
846 + try {
847 + const ops = [];
848 + let portal = null;
849
847 - const ops = [];
848 - let portal = null;
849 -
850 - ReactDOM.render(
851 - <div onClick={() => ops.push('parent clicked')}>
852 - {ReactDOM.createPortal(
853 - <div
854 - onClick={() => ops.push('portal clicked')}
855 - ref={n => (portal = n)}>
856 - portal
857 - </div>,
858 - portalContainer,
859 - )}
860 - </div>,
861 - container,
862 - );
850 + ReactDOM.render(
851 + <div onClick={() => ops.push('parent clicked')}>
852 + {ReactDOM.createPortal(
853 + <div
854 + onClick={() => ops.push('portal clicked')}
855 + ref={n => (portal = n)}>
856 + portal
857 + </div>,
858 + portalContainer,
859 + )}
860 + </div>,
861 + container,
862 + );
863
864 - expect(portal.tagName).toBe('DIV');
864 + expect(portal.tagName).toBe('DIV');
865
866 - ReactTestUtils.Simulate.click(portal);
866 + portal.click();
867
868 - expect(ops).toEqual(['portal clicked', 'parent clicked']);
868 + expect(ops).toEqual(['portal clicked', 'parent clicked']);
869 + } finally {
870 + document.body.removeChild(portalContainer);
871 + }
872 });
873
874 it('should not onMouseLeave when staying in the portal', () => {
875 const portalContainer = document.createElement('div');
876 + document.body.appendChild(container);
877 + document.body.appendChild(portalContainer);
878
879 let ops = [];
880 let firstTarget = null;
@@ -878,56 +883,69 @@ describe('ReactDOMFiber', () => {
883
884 function simulateMouseMove(from, to) {
885 if (from) {
881 - ReactTestUtils.SimulateNative.mouseOut(from, {
882 - relatedTarget: to,
883 - });
886 + from.dispatchEvent(
887 + new MouseEvent('mouseout', {
888 + bubbles: true,
889 + cancelable: true,
890 + relatedTarget: to,
891 + }),
892 + );
893 }
894 if (to) {
886 - ReactTestUtils.SimulateNative.mouseOver(to, {
887 - relatedTarget: from,
888 - });
895 + to.dispatchEvent(
896 + new MouseEvent('mouseover', {
897 + bubbles: true,
898 + cancelable: true,
899 + relatedTarget: from,
900 + }),
901 + );
902 }
903 }
904
892 - ReactDOM.render(
893 - <div>
894 - <div
895 - onMouseEnter={() => ops.push('enter parent')}
896 - onMouseLeave={() => ops.push('leave parent')}>
897 - <div ref={n => (firstTarget = n)} />
898 - {ReactDOM.createPortal(
899 - <div
900 - onMouseEnter={() => ops.push('enter portal')}
901 - onMouseLeave={() => ops.push('leave portal')}
902 - ref={n => (secondTarget = n)}>
903 - portal
904 - </div>,
905 - portalContainer,
906 - )}
907 - </div>
908 - <div ref={n => (thirdTarget = n)} />
909 - </div>,
910 - container,
911 - );
905 + try {
906 + ReactDOM.render(
907 + <div>
908 + <div
909 + onMouseEnter={() => ops.push('enter parent')}
910 + onMouseLeave={() => ops.push('leave parent')}>
911 + <div ref={n => (firstTarget = n)} />
912 + {ReactDOM.createPortal(
913 + <div
914 + onMouseEnter={() => ops.push('enter portal')}
915 + onMouseLeave={() => ops.push('leave portal')}
916 + ref={n => (secondTarget = n)}>
917 + portal
918 + </div>,
919 + portalContainer,
920 + )}
921 + </div>
922 + <div ref={n => (thirdTarget = n)} />
923 + </div>,
924 + container,
925 + );
926
913 - simulateMouseMove(null, firstTarget);
914 - expect(ops).toEqual(['enter parent']);
927 + simulateMouseMove(null, firstTarget);
928 + expect(ops).toEqual(['enter parent']);
929
916 - ops = [];
930 + ops = [];
931
918 - simulateMouseMove(firstTarget, secondTarget);
919 - expect(ops).toEqual([
920 - // Parent did not invoke leave because we're still inside the portal.
921 - 'enter portal',
922 - ]);
932 + simulateMouseMove(firstTarget, secondTarget);
933 + expect(ops).toEqual([
934 + // Parent did not invoke leave because we're still inside the portal.
935 + 'enter portal',
936 + ]);
937
924 - ops = [];
938 + ops = [];
939
926 - simulateMouseMove(secondTarget, thirdTarget);
927 - expect(ops).toEqual([
928 - 'leave portal',
929 - 'leave parent', // Only when we leave the portal does onMouseLeave fire.
930 - ]);
940 + simulateMouseMove(secondTarget, thirdTarget);
941 + expect(ops).toEqual([
942 + 'leave portal',
943 + 'leave parent', // Only when we leave the portal does onMouseLeave fire.
944 + ]);
945 + } finally {
946 + document.body.removeChild(container);
947 + document.body.removeChild(portalContainer);
948 + }
949 });
950
951 it('should throw on bad createPortal argument', () => {
@@ -967,81 +985,82 @@ describe('ReactDOMFiber', () => {
985 });
986
987 it('should not update event handlers until commit', () => {
970 - let ops = [];
971 - const handlerA = () => ops.push('A');
972 - const handlerB = () => ops.push('B');
973 -
974 - class Example extends React.Component {
975 - state = {flip: false, count: 0};
976 - flip() {
977 - this.setState({flip: true, count: this.state.count + 1});
978 - }
979 - tick() {
980 - this.setState({count: this.state.count + 1});
981 - }
982 - render() {
983 - const useB = !this.props.forceA && this.state.flip;
984 - return <div onClick={useB ? handlerB : handlerA} />;
988 + document.body.appendChild(container);
989 + try {
990 + let ops = [];
991 + const handlerA = () => ops.push('A');
992 + const handlerB = () => ops.push('B');
993 +
994 + class Example extends React.Component {
995 + state = {flip: false, count: 0};
996 + flip() {
997 + this.setState({flip: true, count: this.state.count + 1});
998 + }
999 + tick() {
1000 + this.setState({count: this.state.count + 1});
1001 + }
1002 + render() {
1003 + const useB = !this.props.forceA && this.state.flip;
1004 + return <div onClick={useB ? handlerB : handlerA} />;
1005 + }
1006 }
986 - }
1007
988 - class Click extends React.Component {
989 - constructor() {
990 - super();
991 - click(node);
992 - }
993 - render() {
994 - return null;
1008 + class Click extends React.Component {
1009 + constructor() {
1010 + super();
1011 + node.click();
1012 + }
1013 + render() {
1014 + return null;
1015 + }
1016 }
996 - }
997 -
998 - let inst;
999 - ReactDOM.render([<Example key="a" ref={n => (inst = n)} />], container);
1000 - const node = container.firstChild;
1001 - expect(node.tagName).toEqual('DIV');
1017
1003 - function click(target) {
1004 - ReactTestUtils.Simulate.click(target);
1005 - }
1018 + let inst;
1019 + ReactDOM.render([<Example key="a" ref={n => (inst = n)} />], container);
1020 + const node = container.firstChild;
1021 + expect(node.tagName).toEqual('DIV');
1022
1007 - click(node);
1023 + node.click();
1024
1009 - expect(ops).toEqual(['A']);
1010 - ops = [];
1025 + expect(ops).toEqual(['A']);
1026 + ops = [];
1027
1012 - // Render with the other event handler.
1013 - inst.flip();
1028 + // Render with the other event handler.
1029 + inst.flip();
1030
1015 - click(node);
1031 + node.click();
1032
1017 - expect(ops).toEqual(['B']);
1018 - ops = [];
1033 + expect(ops).toEqual(['B']);
1034 + ops = [];
1035
1020 - // Rerender without changing any props.
1021 - inst.tick();
1036 + // Rerender without changing any props.
1037 + inst.tick();
1038
1023 - click(node);
1039 + node.click();
1040
1025 - expect(ops).toEqual(['B']);
1026 - ops = [];
1041 + expect(ops).toEqual(['B']);
1042 + ops = [];
1043
1028 - // Render a flip back to the A handler. The second component invokes the
1029 - // click handler during render to simulate a click during an aborted
1030 - // render. I use this hack because at current time we don't have a way to
1031 - // test aborted ReactDOM renders.
1032 - ReactDOM.render(
1033 - [<Example key="a" forceA={true} />, <Click key="b" />],
1034 - container,
1035 - );
1044 + // Render a flip back to the A handler. The second component invokes the
1045 + // click handler during render to simulate a click during an aborted
1046 + // render. I use this hack because at current time we don't have a way to
1047 + // test aborted ReactDOM renders.
1048 + ReactDOM.render(
1049 + [<Example key="a" forceA={true} />, <Click key="b" />],
1050 + container,
1051 + );
1052
1037 - // Because the new click handler has not yet committed, we should still
1038 - // invoke B.
1039 - expect(ops).toEqual(['B']);
1040 - ops = [];
1053 + // Because the new click handler has not yet committed, we should still
1054 + // invoke B.
1055 + expect(ops).toEqual(['B']);
1056 + ops = [];
1057
1042 - // Any click that happens after commit, should invoke A.
1043 - click(node);
1044 - expect(ops).toEqual(['A']);
1058 + // Any click that happens after commit, should invoke A.
1059 + node.click();
1060 + expect(ops).toEqual(['A']);
1061 + } finally {
1062 + document.body.removeChild(container);
1063 + }
1064 });
1065
1066 it('should not crash encountering low-priority tree', () => {
packages/react-dom/src/__tests__/ReactDOMIframe-test.js
+1 -3
@@ -11,12 +11,10 @@
11
12 describe('ReactDOMIframe', () => {
13 let React;
14 - let ReactDOM;
14 let ReactTestUtils;
15
16 beforeEach(() => {
17 React = require('react');
19 - ReactDOM = require('react-dom');
18 ReactTestUtils = require('react-dom/test-utils');
19 });
20
@@ -28,7 +26,7 @@ describe('ReactDOMIframe', () => {
26 const loadEvent = document.createEvent('Event');
27 loadEvent.initEvent('load', false, false);
28
31 - ReactDOM.findDOMNode(iframe).dispatchEvent(loadEvent);
29 + iframe.dispatchEvent(loadEvent);
30
31 expect(onLoadSpy).toHaveBeenCalled();
32 });
packages/react-dom/src/__tests__/ReactDOMInput-test.js
+34 -47
@@ -38,27 +38,27 @@ describe('ReactDOMInput', () => {
38
39 it('should properly control a value even if no event listener exists', () => {
40 const container = document.createElement('div');
41 - let stub;
41 + let node;
42
43 expect(() => {
44 - stub = ReactDOM.render(<input type="text" value="lion" />, container);
44 + node = ReactDOM.render(<input type="text" value="lion" />, container);
45 }).toWarnDev(
46 'Failed prop type: You provided a `value` prop to a form field without an `onChange` handler.',
47 );
48
49 document.body.appendChild(container);
50
51 - const node = ReactDOM.findDOMNode(stub);
52 -
53 - setUntrackedValue.call(node, 'giraffe');
54 -
55 - // This must use the native event dispatching. If we simulate, we will
56 - // bypass the lazy event attachment system so we won't actually test this.
57 - dispatchEventOnNode(node, 'change');
51 + try {
52 + setUntrackedValue.call(node, 'giraffe');
53
59 - expect(node.value).toBe('lion');
54 + // This must use the native event dispatching. If we simulate, we will
55 + // bypass the lazy event attachment system so we won't actually test this.
56 + dispatchEventOnNode(node, 'change');
57
61 - document.body.removeChild(container);
58 + expect(node.value).toBe('lion');
59 + } finally {
60 + document.body.removeChild(container);
61 + }
62 });
63
64 it('should control a value in reentrant events', () => {
@@ -169,26 +169,24 @@ describe('ReactDOMInput', () => {
169
170 describe('switching text inputs between numeric and string numbers', () => {
171 it('does change the number 2 to "2.0" with no change handler', () => {
172 - let stub = <input type="text" value={2} onChange={jest.fn()} />;
173 - stub = ReactTestUtils.renderIntoDocument(stub);
174 - const node = ReactDOM.findDOMNode(stub);
172 + const stub = <input type="text" value={2} onChange={jest.fn()} />;
173 + const node = ReactTestUtils.renderIntoDocument(stub);
174
175 node.value = '2.0';
176
178 - ReactTestUtils.Simulate.change(stub);
177 + ReactTestUtils.Simulate.change(node);
178
179 expect(node.getAttribute('value')).toBe('2');
180 expect(node.value).toBe('2');
181 });
182
183 it('does change the string "2" to "2.0" with no change handler', () => {
185 - let stub = <input type="text" value={'2'} onChange={jest.fn()} />;
186 - stub = ReactTestUtils.renderIntoDocument(stub);
187 - const node = ReactDOM.findDOMNode(stub);
184 + const stub = <input type="text" value={'2'} onChange={jest.fn()} />;
185 + const node = ReactTestUtils.renderIntoDocument(stub);
186
187 node.value = '2.0';
188
191 - ReactTestUtils.Simulate.change(stub);
189 + ReactTestUtils.Simulate.change(node);
190
191 expect(node.getAttribute('value')).toBe('2');
192 expect(node.value).toBe('2');
@@ -315,8 +313,7 @@ describe('ReactDOMInput', () => {
313
314 it('should display `defaultValue` of number 0', () => {
315 let stub = <input type="text" defaultValue={0} />;
318 - stub = ReactTestUtils.renderIntoDocument(stub);
319 - const node = ReactDOM.findDOMNode(stub);
316 + const node = ReactTestUtils.renderIntoDocument(stub);
317
318 expect(node.getAttribute('value')).toBe('0');
319 expect(node.value).toBe('0');
@@ -348,16 +345,14 @@ describe('ReactDOMInput', () => {
345
346 it('should display "true" for `defaultValue` of `true`', () => {
347 let stub = <input type="text" defaultValue={true} />;
351 - stub = ReactTestUtils.renderIntoDocument(stub);
352 - const node = ReactDOM.findDOMNode(stub);
348 + const node = ReactTestUtils.renderIntoDocument(stub);
349
350 expect(node.value).toBe('true');
351 });
352
353 it('should display "false" for `defaultValue` of `false`', () => {
354 let stub = <input type="text" defaultValue={false} />;
359 - stub = ReactTestUtils.renderIntoDocument(stub);
360 - const node = ReactDOM.findDOMNode(stub);
355 + const node = ReactTestUtils.renderIntoDocument(stub);
356
357 expect(node.value).toBe('false');
358 });
@@ -467,17 +462,15 @@ describe('ReactDOMInput', () => {
462 },
463 };
464
470 - let stub = <input type="text" defaultValue={objToString} />;
471 - stub = ReactTestUtils.renderIntoDocument(stub);
472 - const node = ReactDOM.findDOMNode(stub);
465 + const stub = <input type="text" defaultValue={objToString} />;
466 + const node = ReactTestUtils.renderIntoDocument(stub);
467
468 expect(node.value).toBe('foobar');
469 });
470
471 it('should display `value` of number 0', () => {
478 - let stub = <input type="text" value={0} />;
479 - stub = ReactTestUtils.renderIntoDocument(stub);
480 - const node = ReactDOM.findDOMNode(stub);
472 + const stub = <input type="text" value={0} />;
473 + const node = ReactTestUtils.renderIntoDocument(stub);
474
475 expect(node.value).toBe('0');
476 });
@@ -593,9 +586,8 @@ describe('ReactDOMInput', () => {
586 });
587
588 it('should properly control a value of number `0`', () => {
596 - let stub = <input type="text" value={0} onChange={emptyFunction} />;
597 - stub = ReactTestUtils.renderIntoDocument(stub);
598 - const node = ReactDOM.findDOMNode(stub);
589 + const stub = <input type="text" value={0} onChange={emptyFunction} />;
590 + const node = ReactTestUtils.renderIntoDocument(stub);
591
592 node.value = 'giraffe';
593 ReactTestUtils.Simulate.change(node);
@@ -603,9 +595,8 @@ describe('ReactDOMInput', () => {
595 });
596
597 it('should properly control 0.0 for a text input', () => {
606 - let stub = <input type="text" value={0} onChange={emptyFunction} />;
607 - stub = ReactTestUtils.renderIntoDocument(stub);
608 - const node = ReactDOM.findDOMNode(stub);
598 + const stub = <input type="text" value={0} onChange={emptyFunction} />;
599 + const node = ReactTestUtils.renderIntoDocument(stub);
600
601 node.value = '0.0';
602 ReactTestUtils.Simulate.change(node, {target: {value: '0.0'}});
@@ -613,9 +604,8 @@ describe('ReactDOMInput', () => {
604 });
605
606 it('should properly control 0.0 for a number input', () => {
616 - let stub = <input type="number" value={0} onChange={emptyFunction} />;
617 - stub = ReactTestUtils.renderIntoDocument(stub);
618 - const node = ReactDOM.findDOMNode(stub);
607 + const stub = <input type="number" value={0} onChange={emptyFunction} />;
608 + const node = ReactTestUtils.renderIntoDocument(stub);
609
610 node.value = '0.0';
611 ReactTestUtils.Simulate.change(node, {target: {value: '0.0'}});
@@ -702,9 +692,8 @@ describe('ReactDOMInput', () => {
692 });
693
694 it('should not set a value for submit buttons unnecessarily', () => {
705 - let stub = <input type="submit" />;
706 - stub = ReactTestUtils.renderIntoDocument(stub);
707 - const node = ReactDOM.findDOMNode(stub);
695 + const stub = <input type="submit" />;
696 + const node = ReactTestUtils.renderIntoDocument(stub);
697
698 // The value shouldn't be '', or else the button will have no text; it
699 // should have the default "Submit" or "Submit Query" label. Most browsers
@@ -1460,10 +1449,9 @@ describe('ReactDOMInput', () => {
1449 });
1450
1451 it('an uncontrolled number input will not update the value attribute on blur', () => {
1463 - const stub = ReactTestUtils.renderIntoDocument(
1452 + const node = ReactTestUtils.renderIntoDocument(
1453 <input type="number" defaultValue="1" />,
1454 );
1466 - const node = ReactDOM.findDOMNode(stub);
1455
1456 node.value = 4;
1457
@@ -1473,10 +1461,9 @@ describe('ReactDOMInput', () => {
1461 });
1462
1463 it('an uncontrolled text input will not update the value attribute on blur', () => {
1476 - const stub = ReactTestUtils.renderIntoDocument(
1464 + const node = ReactTestUtils.renderIntoDocument(
1465 <input type="text" defaultValue="1" />,
1466 );
1479 - const node = ReactDOM.findDOMNode(stub);
1467
1468 node.value = 4;
1469
packages/react-dom/src/__tests__/ReactDOMOption-test.js
+4 -8
@@ -26,8 +26,7 @@ describe('ReactDOMOption', () => {
26 {1} {'foo'}
27 </option>
28 );
29 - stub = ReactTestUtils.renderIntoDocument(stub);
30 - const node = ReactDOM.findDOMNode(stub);
29 + const node = ReactTestUtils.renderIntoDocument(stub);
30
31 expect(node.innerHTML).toBe('1 foo');
32 });
@@ -59,17 +58,15 @@ describe('ReactDOMOption', () => {
58 {undefined} {2}
59 </option>
60 );
62 - stub = ReactTestUtils.renderIntoDocument(stub);
61 + const node = ReactTestUtils.renderIntoDocument(stub);
62
64 - const node = ReactDOM.findDOMNode(stub);
63 expect(node.innerHTML).toBe('1 2');
64 });
65
66 it('should be able to use dangerouslySetInnerHTML on option', () => {
67 let stub = <option dangerouslySetInnerHTML={{__html: 'foobar'}} />;
70 - stub = ReactTestUtils.renderIntoDocument(stub);
68 + const node = ReactTestUtils.renderIntoDocument(stub);
69
72 - const node = ReactDOM.findDOMNode(stub);
70 expect(node.innerHTML).toBe('foobar');
71 });
72
@@ -95,8 +92,7 @@ describe('ReactDOMOption', () => {
92 );
93 const options = stub.props.children;
94 const container = document.createElement('div');
98 - stub = ReactDOM.render(stub, container);
99 - const node = ReactDOM.findDOMNode(stub);
95 + const node = ReactDOM.render(stub, container);
96
97 expect(node.selectedIndex).toBe(1);
98
packages/react-dom/src/__tests__/ReactDOMSelect-test.js
+18 -37
@@ -35,8 +35,7 @@ describe('ReactDOMSelect', () => {
35 );
36 const options = stub.props.children;
37 const container = document.createElement('div');
38 - stub = ReactDOM.render(stub, container);
39 - const node = ReactDOM.findDOMNode(stub);
38 + const node = ReactDOM.render(stub, container);
39
40 expect(node.value).toBe('giraffe');
41
@@ -65,8 +64,7 @@ describe('ReactDOMSelect', () => {
64 </select>
65 );
66 const container = document.createElement('div');
68 - const stub = ReactDOM.render(el, container);
69 - const node = ReactDOM.findDOMNode(stub);
67 + const node = ReactDOM.render(el, container);
68
69 expect(node.value).toBe('giraffe');
70
@@ -86,8 +84,7 @@ describe('ReactDOMSelect', () => {
84 );
85 const options = stub.props.children;
86 const container = document.createElement('div');
89 - stub = ReactDOM.render(stub, container);
90 - const node = ReactDOM.findDOMNode(stub);
87 + const node = ReactDOM.render(stub, container);
88
89 expect(node.options[0].selected).toBe(false); // monkey
90 expect(node.options[1].selected).toBe(true); // giraffe
@@ -116,8 +113,7 @@ describe('ReactDOMSelect', () => {
113 );
114 const options = stub.props.children;
115 const container = document.createElement('div');
119 - stub = ReactDOM.render(stub, container);
120 - const node = ReactDOM.findDOMNode(stub);
116 + const node = ReactDOM.render(stub, container);
117
118 expect(node.value).toBe('giraffe');
119
@@ -141,8 +137,7 @@ describe('ReactDOMSelect', () => {
137 </select>
138 );
139 const container = document.createElement('div');
144 - stub = ReactDOM.render(stub, container);
145 - const node = ReactDOM.findDOMNode(stub);
140 + const node = ReactDOM.render(stub, container);
141 expect(node.options[0].selected).toBe(false);
142 expect(node.options[2].selected).toBe(true);
143 });
@@ -157,8 +152,7 @@ describe('ReactDOMSelect', () => {
152 );
153 const options = stub.props.children;
154 const container = document.createElement('div');
160 - stub = ReactDOM.render(stub, container);
161 - const node = ReactDOM.findDOMNode(stub);
155 + const node = ReactDOM.render(stub, container);
156
157 expect(node.value).toBe('__proto__');
158
@@ -190,8 +184,7 @@ describe('ReactDOMSelect', () => {
184 );
185 const options = stub.props.children;
186 const container = document.createElement('div');
193 - stub = ReactDOM.render(stub, container);
194 - const node = ReactDOM.findDOMNode(stub);
187 + const node = ReactDOM.render(stub, container);
188
189 expect(node.options[0].selected).toBe(false); // monkey
190 expect(node.options[1].selected).toBe(true); // giraffe
@@ -220,8 +213,7 @@ describe('ReactDOMSelect', () => {
213 );
214 const options = stub.props.children;
215 const container = document.createElement('div');
223 - stub = ReactDOM.render(stub, container);
224 - const node = ReactDOM.findDOMNode(stub);
216 + const node = ReactDOM.render(stub, container);
217
218 expect(node.options[0].selected).toBe(false); // monkey
219 expect(node.options[1].selected).toBe(true); // __proto__
@@ -248,8 +240,7 @@ describe('ReactDOMSelect', () => {
240 <option value="12">twelve</option>
241 </select>
242 );
251 - stub = ReactTestUtils.renderIntoDocument(stub);
252 - const node = ReactDOM.findDOMNode(stub);
243 + const node = ReactTestUtils.renderIntoDocument(stub);
244
245 expect(node.options[0].selected).toBe(false); // one
246 expect(node.options[1].selected).toBe(false); // two
@@ -259,7 +250,7 @@ describe('ReactDOMSelect', () => {
250 it('should reset child options selected when they are changed and `value` is set', () => {
251 let stub = <select multiple={true} value={['a', 'b']} onChange={noop} />;
252 const container = document.createElement('div');
262 - stub = ReactDOM.render(stub, container);
253 + const node = ReactDOM.render(stub, container);
254
255 ReactDOM.render(
256 <select multiple={true} value={['a', 'b']} onChange={noop}>
@@ -270,8 +261,6 @@ describe('ReactDOMSelect', () => {
261 container,
262 );
263
273 - const node = ReactDOM.findDOMNode(stub);
274 -
264 expect(node.options[0].selected).toBe(true); // a
265 expect(node.options[1].selected).toBe(true); // b
266 expect(node.options[2].selected).toBe(false); // c
@@ -293,8 +282,7 @@ describe('ReactDOMSelect', () => {
282 </select>
283 );
284 const container = document.createElement('div');
296 - const stub = ReactDOM.render(el, container);
297 - const node = ReactDOM.findDOMNode(stub);
285 + const node = ReactDOM.render(el, container);
286
287 expect(node.options[0].selected).toBe(false); // monkey
288 expect(node.options[1].selected).toBe(true); // giraffe
@@ -327,8 +315,7 @@ describe('ReactDOMSelect', () => {
315 );
316 const options = stub.props.children;
317 const container = document.createElement('div');
330 - stub = ReactDOM.render(stub, container);
331 - const node = ReactDOM.findDOMNode(stub);
318 + const node = ReactDOM.render(stub, container);
319
320 expect(node.options[0].selected).toBe(false); // monkey
321 expect(node.options[1].selected).toBe(true); // giraffe
@@ -357,8 +344,7 @@ describe('ReactDOMSelect', () => {
344 );
345 const options = stub.props.children;
346 const container = document.createElement('div');
360 - stub = ReactDOM.render(stub, container);
361 - const node = ReactDOM.findDOMNode(stub);
347 + const node = ReactDOM.render(stub, container);
348
349 expect(node.options[0].selected).toBe(false); // monkey
350 expect(node.options[1].selected).toBe(true); // giraffe
@@ -386,8 +372,7 @@ describe('ReactDOMSelect', () => {
372 );
373 const options = stub.props.children;
374 const container = document.createElement('div');
389 - stub = ReactDOM.render(stub, container);
390 - const node = ReactDOM.findDOMNode(stub);
375 + const node = ReactDOM.render(stub, container);
376
377 expect(node.options[0].selected).toBe(false); // monkey
378 expect(node.options[1].selected).toBe(true); // giraffe
@@ -410,8 +395,7 @@ describe('ReactDOMSelect', () => {
395 );
396 const options = stub.props.children;
397 const container = document.createElement('div');
413 - stub = ReactDOM.render(stub, container);
414 - const node = ReactDOM.findDOMNode(stub);
398 + const node = ReactDOM.render(stub, container);
399
400 ReactDOM.render(
401 <select value="gorilla" onChange={noop}>
@@ -476,7 +460,7 @@ describe('ReactDOMSelect', () => {
460 it('should not control defaultValue if readding options', () => {
461 const container = document.createElement('div');
462
479 - const select = ReactDOM.render(
463 + const node = ReactDOM.render(
464 <select multiple={true} defaultValue={['giraffe']}>
465 <option key="monkey" value="monkey">
466 A monkey!
@@ -490,7 +474,6 @@ describe('ReactDOMSelect', () => {
474 </select>,
475 container,
476 );
493 - const node = ReactDOM.findDOMNode(select);
477
478 expect(node.options[0].selected).toBe(false); // monkey
479 expect(node.options[1].selected).toBe(true); // giraffe
@@ -601,8 +584,7 @@ describe('ReactDOMSelect', () => {
584 <option value="gorilla">A gorilla!</option>
585 </select>
586 );
604 - stub = ReactTestUtils.renderIntoDocument(stub);
605 - const node = ReactDOM.findDOMNode(stub);
587 + const node = ReactTestUtils.renderIntoDocument(stub);
588
589 ReactTestUtils.Simulate.change(node);
590
@@ -648,8 +630,7 @@ describe('ReactDOMSelect', () => {
630 <option value="gorilla">A gorilla!</option>
631 </select>
632 );
651 - stub = ReactDOM.render(stub, container);
652 - const node = ReactDOM.findDOMNode(stub);
633 + const node = ReactDOM.render(stub, container);
634
635 expect(() => ReactTestUtils.Simulate.change(node)).not.toThrow();
636 });
packages/react-dom/src/__tests__/ReactDOMTextComponent-test.js
+18 -29
@@ -39,7 +39,7 @@ describe('ReactDOMTextComponent', () => {
39 </div>,
40 el,
41 );
42 - let nodes = filterOutComments(ReactDOM.findDOMNode(inst).childNodes);
42 + let nodes = filterOutComments(inst.childNodes);
43
44 let foo = nodes[1];
45 let bar = nodes[2];
@@ -56,7 +56,7 @@ describe('ReactDOMTextComponent', () => {
56 );
57 // After the update, the text nodes should have stayed in place (as opposed
58 // to getting unmounted and remounted)
59 - nodes = filterOutComments(ReactDOM.findDOMNode(inst).childNodes);
59 + nodes = filterOutComments(inst.childNodes);
60 expect(nodes[1]).toBe(foo);
61 expect(nodes[2]).toBe(bar);
62 expect(foo.data).toBe('baz');
@@ -74,8 +74,7 @@ describe('ReactDOMTextComponent', () => {
74 el,
75 );
76
77 - let container = ReactDOM.findDOMNode(inst);
78 - let childNodes = filterOutComments(container.childNodes);
77 + let childNodes = filterOutComments(inst.childNodes);
78 let childDiv = childNodes[1];
79
80 inst = ReactDOM.render(
@@ -86,8 +85,7 @@ describe('ReactDOMTextComponent', () => {
85 </div>,
86 el,
87 );
89 - container = ReactDOM.findDOMNode(inst);
90 - childNodes = filterOutComments(container.childNodes);
88 + childNodes = filterOutComments(inst.childNodes);
89 expect(childNodes.length).toBe(1);
90 expect(childNodes[0]).toBe(childDiv);
91
@@ -99,8 +97,7 @@ describe('ReactDOMTextComponent', () => {
97 </div>,
98 el,
99 );
102 - container = ReactDOM.findDOMNode(inst);
103 - childNodes = filterOutComments(container.childNodes);
100 + childNodes = filterOutComments(inst.childNodes);
101 expect(childNodes.length).toBe(3);
102 expect(childNodes[0].data).toBe('foo');
103 expect(childNodes[1]).toBe(childDiv);
@@ -125,8 +122,7 @@ describe('ReactDOMTextComponent', () => {
122 el,
123 );
124
128 - let container = ReactDOM.findDOMNode(inst);
129 - container.normalize();
125 + inst.normalize();
126
127 inst = ReactDOM.render(
128 <div>
@@ -138,8 +134,7 @@ describe('ReactDOMTextComponent', () => {
134 </div>,
135 el,
136 );
141 - container = ReactDOM.findDOMNode(inst);
142 - expect(container.textContent).toBe('barbazquxfoo');
137 + expect(inst.textContent).toBe('barbazquxfoo');
138 });
139
140 xit('can reconcile text merged by Node.normalize()', () => {
@@ -153,8 +148,7 @@ describe('ReactDOMTextComponent', () => {
148 el,
149 );
150
156 - let container = ReactDOM.findDOMNode(inst);
157 - container.normalize();
151 + inst.normalize();
152
153 inst = ReactDOM.render(
154 <div>
@@ -164,8 +158,7 @@ describe('ReactDOMTextComponent', () => {
158 </div>,
159 el,
160 );
167 - container = ReactDOM.findDOMNode(inst);
168 - expect(container.textContent).toBe('barbazqux');
161 + expect(inst.textContent).toBe('barbazqux');
162 });
163
164 it('can reconcile text from pre-rendered markup', () => {
@@ -207,15 +200,14 @@ describe('ReactDOMTextComponent', () => {
200 el,
201 );
202
210 - let container = ReactDOM.findDOMNode(inst);
211 - let childNodes = filterOutComments(ReactDOM.findDOMNode(inst).childNodes);
203 + let childNodes = filterOutComments(inst.childNodes);
204 let textNode = childNodes[1];
205 textNode.textContent = 'foo';
214 - container.insertBefore(
206 + inst.insertBefore(
207 document.createTextNode('bar'),
208 childNodes[1].nextSibling,
209 );
218 - container.insertBefore(
210 + inst.insertBefore(
211 document.createTextNode('baz'),
212 childNodes[1].nextSibling,
213 );
@@ -227,8 +219,7 @@ describe('ReactDOMTextComponent', () => {
219 </div>,
220 el,
221 );
230 - container = ReactDOM.findDOMNode(inst);
231 - expect(container.textContent).toBe('barbazqux');
222 + expect(inst.textContent).toBe('barbazqux');
223 });
224
225 xit('can reconcile text arbitrarily split into multiple nodes on some substitutions only', () => {
@@ -246,21 +237,20 @@ describe('ReactDOMTextComponent', () => {
237 el,
238 );
239
249 - let container = ReactDOM.findDOMNode(inst);
250 - let childNodes = filterOutComments(ReactDOM.findDOMNode(inst).childNodes);
240 + let childNodes = filterOutComments(inst.childNodes);
241 let textNode = childNodes[3];
242 textNode.textContent = 'foo';
253 - container.insertBefore(
243 + inst.insertBefore(
244 document.createTextNode('bar'),
245 childNodes[3].nextSibling,
246 );
257 - container.insertBefore(
247 + inst.insertBefore(
248 document.createTextNode('baz'),
249 childNodes[3].nextSibling,
250 );
251 let secondTextNode = childNodes[5];
252 secondTextNode.textContent = 'bar';
263 - container.insertBefore(
253 + inst.insertBefore(
254 document.createTextNode('foo'),
255 childNodes[5].nextSibling,
256 );
@@ -277,8 +267,7 @@ describe('ReactDOMTextComponent', () => {
267 </div>,
268 el,
269 );
280 - container = ReactDOM.findDOMNode(inst);
281 - expect(container.textContent).toBe('bazbarbazquxbarbazbar');
270 + expect(inst.textContent).toBe('bazbarbazquxbarbazbar');
271 });
272
273 xit('can unmount normalized text nodes', () => {
packages/react-dom/src/__tests__/ReactEventIndependence-test.js
+45 -29
@@ -11,7 +11,6 @@
11
12 let React;
13 let ReactDOM;
14 -let ReactTestUtils;
14
15 describe('ReactEventIndependence', () => {
16 beforeEach(() => {
@@ -19,49 +18,66 @@ describe('ReactEventIndependence', () => {
18
19 React = require('react');
20 ReactDOM = require('react-dom');
22 - ReactTestUtils = require('react-dom/test-utils');
21 });
22
23 it('does not crash with other react inside', () => {
24 let clicks = 0;
27 - const div = ReactTestUtils.renderIntoDocument(
28 - <div
29 - onClick={() => clicks++}
30 - dangerouslySetInnerHTML={{
31 - __html: '<button data-reactid=".z">click me</div>',
32 - }}
33 - />,
34 - );
35 - ReactTestUtils.SimulateNative.click(div.firstChild);
36 - expect(clicks).toBe(1);
25 + const container = document.createElement('div');
26 + document.body.appendChild(container);
27 + try {
28 + const div = ReactDOM.render(
29 + <div
30 + onClick={() => clicks++}
31 + dangerouslySetInnerHTML={{
32 + __html: '<button data-reactid=".z">click me</div>',
33 + }}
34 + />,
35 + container,
36 + );
37 +
38 + div.firstChild.click();
39 + expect(clicks).toBe(1);
40 + } finally {
41 + document.body.removeChild(container);
42 + }
43 });
44
45 it('does not crash with other react outside', () => {
46 let clicks = 0;
47 const outer = document.createElement('div');
42 - outer.setAttribute('data-reactid', '.z');
43 - const inner = ReactDOM.render(
44 - <button onClick={() => clicks++}>click me</button>,
45 - outer,
46 - );
47 - ReactTestUtils.SimulateNative.click(inner);
48 - expect(clicks).toBe(1);
48 + document.body.appendChild(outer);
49 + try {
50 + outer.setAttribute('data-reactid', '.z');
51 + const inner = ReactDOM.render(
52 + <button onClick={() => clicks++}>click me</button>,
53 + outer,
54 + );
55 + inner.click();
56 + expect(clicks).toBe(1);
57 + } finally {
58 + document.body.removeChild(outer);
59 + }
60 });
61
62 it('does not when event fired on unmounted tree', () => {
63 let clicks = 0;
64 const container = document.createElement('div');
54 - const button = ReactDOM.render(
55 - <button onClick={() => clicks++}>click me</button>,
56 - container,
57 - );
65 + document.body.appendChild(container);
66 + try {
67 + const button = ReactDOM.render(
68 + <button onClick={() => clicks++}>click me</button>,
69 + container,
70 + );
71
59 - // Now we unmount the component, as if caused by a non-React event handler
60 - // for the same click we're about to simulate, like closing a layer:
61 - ReactDOM.unmountComponentAtNode(container);
62 - ReactTestUtils.SimulateNative.click(button);
72 + // Now we unmount the component, as if caused by a non-React event handler
73 + // for the same click we're about to simulate, like closing a layer:
74 + ReactDOM.unmountComponentAtNode(container);
75 + button.click();
76
64 - // Since the tree is unmounted, we don't dispatch the click event.
65 - expect(clicks).toBe(0);
77 + // Since the tree is unmounted, we don't dispatch the click event.
78 + expect(clicks).toBe(0);
79 + } finally {
80 + document.body.removeChild(container);
81 + }
82 });
83 });
packages/react-dom/src/__tests__/ReactIdentity-test.js
+1 -1
@@ -78,7 +78,7 @@ describe('ReactIdentity', () => {
78
79 const instance = ReactDOM.render(<Wrapper />, container);
80 const span = instance.refs.span;
81 - expect(ReactDOM.findDOMNode(span)).not.toBe(null);
81 + expect(span).not.toBe(null);
82 }
83
84 it('should allow any character as a key, in a detached parent', () => {
packages/react-dom/src/__tests__/ReactServerRenderingHydration.js
+125 -116
@@ -12,7 +12,6 @@
12 let React;
13 let ReactDOM;
14 let ReactDOMServer;
15 -let ReactTestUtils;
15
16 // These tests rely both on ReactDOMServer and ReactDOM.
17 // If a test only needs ReactDOMServer, put it in ReactServerRendering-test instead.
@@ -21,7 +20,6 @@ describe('ReactDOMServerHydration', () => {
20 jest.resetModules();
21 React = require('react');
22 ReactDOM = require('react-dom');
24 - ReactTestUtils = require('react-dom/test-utils');
23 ReactDOMServer = require('react-dom/server');
24 });
25
@@ -48,67 +46,73 @@ describe('ReactDOMServerHydration', () => {
46 }
47
48 const element = document.createElement('div');
51 - ReactDOM.render(<TestComponent />, element);
52 -
53 - let lastMarkup = element.innerHTML;
54 -
55 - // Exercise the update path. Markup should not change,
56 - // but some lifecycle methods should be run again.
57 - ReactDOM.render(<TestComponent name="x" />, element);
58 - expect(mountCount).toEqual(1);
59 -
60 - // Unmount and remount. We should get another mount event and
61 - // we should get different markup, as the IDs are unique each time.
62 - ReactDOM.unmountComponentAtNode(element);
63 - expect(element.innerHTML).toEqual('');
64 - ReactDOM.render(<TestComponent name="x" />, element);
65 - expect(mountCount).toEqual(2);
66 - expect(element.innerHTML).not.toEqual(lastMarkup);
67 -
68 - // Now kill the node and render it on top of server-rendered markup, as if
69 - // we used server rendering. We should mount again, but the markup should
70 - // be unchanged. We will append a sentinel at the end of innerHTML to be
71 - // sure that innerHTML was not changed.
72 - ReactDOM.unmountComponentAtNode(element);
73 - expect(element.innerHTML).toEqual('');
74 -
75 - lastMarkup = ReactDOMServer.renderToString(<TestComponent name="x" />);
76 - element.innerHTML = lastMarkup;
77 -
78 - let instance;
79 -
80 - expect(() => {
81 - instance = ReactDOM.render(<TestComponent name="x" />, element);
82 - }).toLowPriorityWarnDev(
83 - 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' +
84 - 'will stop working in React v17. Replace the ReactDOM.render() call ' +
85 - 'with ReactDOM.hydrate() if you want React to attach to the server HTML.',
86 - );
87 - expect(mountCount).toEqual(3);
88 - expect(element.innerHTML).toBe(lastMarkup);
89 -
90 - // Ensure the events system works after mount into server markup
91 - expect(numClicks).toEqual(0);
92 - ReactTestUtils.Simulate.click(ReactDOM.findDOMNode(instance.refs.span));
93 - expect(numClicks).toEqual(1);
94 -
95 - ReactDOM.unmountComponentAtNode(element);
96 - expect(element.innerHTML).toEqual('');
97 -
98 - // Now simulate a situation where the app is not idempotent. React should
99 - // warn but do the right thing.
100 - element.innerHTML = lastMarkup;
101 - expect(() => {
102 - instance = ReactDOM.render(<TestComponent name="y" />, element);
103 - }).toWarnDev('Text content did not match. Server: "x" Client: "y"');
104 - expect(mountCount).toEqual(4);
105 - expect(element.innerHTML.length > 0).toBe(true);
106 - expect(element.innerHTML).not.toEqual(lastMarkup);
107 -
108 - // Ensure the events system works after markup mismatch.
109 - expect(numClicks).toEqual(1);
110 - ReactTestUtils.Simulate.click(ReactDOM.findDOMNode(instance.refs.span));
111 - expect(numClicks).toEqual(2);
49 + document.body.appendChild(element);
50 + try {
51 + ReactDOM.render(<TestComponent />, element);
52 +
53 + let lastMarkup = element.innerHTML;
54 +
55 + // Exercise the update path. Markup should not change,
56 + // but some lifecycle methods should be run again.
57 + ReactDOM.render(<TestComponent name="x" />, element);
58 + expect(mountCount).toEqual(1);
59 +
60 + // Unmount and remount. We should get another mount event and
61 + // we should get different markup, as the IDs are unique each time.
62 + ReactDOM.unmountComponentAtNode(element);
63 + expect(element.innerHTML).toEqual('');
64 + ReactDOM.render(<TestComponent name="x" />, element);
65 + expect(mountCount).toEqual(2);
66 + expect(element.innerHTML).not.toEqual(lastMarkup);
67 +
68 + // Now kill the node and render it on top of server-rendered markup, as if
69 + // we used server rendering. We should mount again, but the markup should
70 + // be unchanged. We will append a sentinel at the end of innerHTML to be
71 + // sure that innerHTML was not changed.
72 + ReactDOM.unmountComponentAtNode(element);
73 + expect(element.innerHTML).toEqual('');
74 +
75 + lastMarkup = ReactDOMServer.renderToString(<TestComponent name="x" />);
76 + element.innerHTML = lastMarkup;
77 +
78 + let instance;
79 +
80 + expect(() => {
81 + instance = ReactDOM.render(<TestComponent name="x" />, element);
82 + }).toLowPriorityWarnDev(
83 + 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' +
84 + 'will stop working in React v17. Replace the ReactDOM.render() call ' +
85 + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.',
86 + );
87 + expect(mountCount).toEqual(3);
88 + expect(element.innerHTML).toBe(lastMarkup);
89 +
90 + // Ensure the events system works after mount into server markup
91 + expect(numClicks).toEqual(0);
92 +
93 + instance.refs.span.click();
94 + expect(numClicks).toEqual(1);
95 +
96 + ReactDOM.unmountComponentAtNode(element);
97 + expect(element.innerHTML).toEqual('');
98 +
99 + // Now simulate a situation where the app is not idempotent. React should
100 + // warn but do the right thing.
101 + element.innerHTML = lastMarkup;
102 + expect(() => {
103 + instance = ReactDOM.render(<TestComponent name="y" />, element);
104 + }).toWarnDev('Text content did not match. Server: "x" Client: "y"');
105 + expect(mountCount).toEqual(4);
106 + expect(element.innerHTML.length > 0).toBe(true);
107 + expect(element.innerHTML).not.toEqual(lastMarkup);
108 +
109 + // Ensure the events system works after markup mismatch.
110 + expect(numClicks).toEqual(1);
111 + instance.refs.span.click();
112 + expect(numClicks).toEqual(2);
113 + } finally {
114 + document.body.removeChild(element);
115 + }
116 });
117
118 it('should have the correct mounting behavior (new hydrate API)', () => {
@@ -134,59 +138,64 @@ describe('ReactDOMServerHydration', () => {
138 }
139
140 const element = document.createElement('div');
137 - ReactDOM.render(<TestComponent />, element);
138 -
139 - let lastMarkup = element.innerHTML;
140 -
141 - // Exercise the update path. Markup should not change,
142 - // but some lifecycle methods should be run again.
143 - ReactDOM.render(<TestComponent name="x" />, element);
144 - expect(mountCount).toEqual(1);
145 -
146 - // Unmount and remount. We should get another mount event and
147 - // we should get different markup, as the IDs are unique each time.
148 - ReactDOM.unmountComponentAtNode(element);
149 - expect(element.innerHTML).toEqual('');
150 - ReactDOM.render(<TestComponent name="x" />, element);
151 - expect(mountCount).toEqual(2);
152 - expect(element.innerHTML).not.toEqual(lastMarkup);
153 -
154 - // Now kill the node and render it on top of server-rendered markup, as if
155 - // we used server rendering. We should mount again, but the markup should
156 - // be unchanged. We will append a sentinel at the end of innerHTML to be
157 - // sure that innerHTML was not changed.
158 - ReactDOM.unmountComponentAtNode(element);
159 - expect(element.innerHTML).toEqual('');
160 -
161 - lastMarkup = ReactDOMServer.renderToString(<TestComponent name="x" />);
162 - element.innerHTML = lastMarkup;
163 -
164 - let instance = ReactDOM.hydrate(<TestComponent name="x" />, element);
165 - expect(mountCount).toEqual(3);
166 - expect(element.innerHTML).toBe(lastMarkup);
167 -
168 - // Ensure the events system works after mount into server markup
169 - expect(numClicks).toEqual(0);
170 - ReactTestUtils.Simulate.click(ReactDOM.findDOMNode(instance.refs.span));
171 - expect(numClicks).toEqual(1);
172 -
173 - ReactDOM.unmountComponentAtNode(element);
174 - expect(element.innerHTML).toEqual('');
175 -
176 - // Now simulate a situation where the app is not idempotent. React should
177 - // warn but do the right thing.
178 - element.innerHTML = lastMarkup;
179 - expect(() => {
180 - instance = ReactDOM.hydrate(<TestComponent name="y" />, element);
181 - }).toWarnDev('Text content did not match. Server: "x" Client: "y"');
182 - expect(mountCount).toEqual(4);
183 - expect(element.innerHTML.length > 0).toBe(true);
184 - expect(element.innerHTML).not.toEqual(lastMarkup);
185 -
186 - // Ensure the events system works after markup mismatch.
187 - expect(numClicks).toEqual(1);
188 - ReactTestUtils.Simulate.click(ReactDOM.findDOMNode(instance.refs.span));
189 - expect(numClicks).toEqual(2);
141 + document.body.appendChild(element);
142 + try {
143 + ReactDOM.render(<TestComponent />, element);
144 +
145 + let lastMarkup = element.innerHTML;
146 +
147 + // Exercise the update path. Markup should not change,
148 + // but some lifecycle methods should be run again.
149 + ReactDOM.render(<TestComponent name="x" />, element);
150 + expect(mountCount).toEqual(1);
151 +
152 + // Unmount and remount. We should get another mount event and
153 + // we should get different markup, as the IDs are unique each time.
154 + ReactDOM.unmountComponentAtNode(element);
155 + expect(element.innerHTML).toEqual('');
156 + ReactDOM.render(<TestComponent name="x" />, element);
157 + expect(mountCount).toEqual(2);
158 + expect(element.innerHTML).not.toEqual(lastMarkup);
159 +
160 + // Now kill the node and render it on top of server-rendered markup, as if
161 + // we used server rendering. We should mount again, but the markup should
162 + // be unchanged. We will append a sentinel at the end of innerHTML to be
163 + // sure that innerHTML was not changed.
164 + ReactDOM.unmountComponentAtNode(element);
165 + expect(element.innerHTML).toEqual('');
166 +
167 + lastMarkup = ReactDOMServer.renderToString(<TestComponent name="x" />);
168 + element.innerHTML = lastMarkup;
169 +
170 + let instance = ReactDOM.hydrate(<TestComponent name="x" />, element);
171 + expect(mountCount).toEqual(3);
172 + expect(element.innerHTML).toBe(lastMarkup);
173 +
174 + // Ensure the events system works after mount into server markup
175 + expect(numClicks).toEqual(0);
176 + instance.refs.span.click();
177 + expect(numClicks).toEqual(1);
178 +
179 + ReactDOM.unmountComponentAtNode(element);
180 + expect(element.innerHTML).toEqual('');
181 +
182 + // Now simulate a situation where the app is not idempotent. React should
183 + // warn but do the right thing.
184 + element.innerHTML = lastMarkup;
185 + expect(() => {
186 + instance = ReactDOM.hydrate(<TestComponent name="y" />, element);
187 + }).toWarnDev('Text content did not match. Server: "x" Client: "y"');
188 + expect(mountCount).toEqual(4);
189 + expect(element.innerHTML.length > 0).toBe(true);
190 + expect(element.innerHTML).not.toEqual(lastMarkup);
191 +
192 + // Ensure the events system works after markup mismatch.
193 + expect(numClicks).toEqual(1);
194 + instance.refs.span.click();
195 + expect(numClicks).toEqual(2);
196 + } finally {
197 + document.body.removeChild(element);
198 + }
199 });
200
201 // We have a polyfill for autoFocus on the client, but we intentionally don't
packages/react-dom/src/__tests__/ReactTestUtils-test.js
+2 -3
@@ -280,12 +280,11 @@ describe('ReactTestUtils', () => {
280 };
281 spyOnDevAndProd(obj, 'handler').and.callThrough();
282 const container = document.createElement('div');
283 - const instance = ReactDOM.render(
283 + const node = ReactDOM.render(
284 <input type="text" onChange={obj.handler} />,
285 container,
286 );
287
288 - const node = ReactDOM.findDOMNode(instance);
288 node.value = 'giraffe';
289 ReactTestUtils.Simulate.change(node);
290
@@ -321,7 +320,7 @@ describe('ReactTestUtils', () => {
320 container,
321 );
322
324 - const node = ReactDOM.findDOMNode(instance.refs.input);
323 + const node = instance.refs.input;
324 node.value = 'zebra';
325 ReactTestUtils.Simulate.change(node);
326
packages/react-dom/src/__tests__/refs-test.js
+34 -23
@@ -10,6 +10,7 @@
10 'use strict';
11
12 let React = require('react');
13 +let ReactDOM = require('react-dom');
14 let ReactTestUtils = require('react-dom/test-utils');
15
16 /**
@@ -81,24 +82,6 @@ class TestRefsComponent extends React.Component {
82 }
83 }
84
84 -/**
85 - * Render a TestRefsComponent and ensure that the main refs are wired up.
86 - */
87 -const renderTestRefsComponent = function() {
88 - const testRefsComponent = ReactTestUtils.renderIntoDocument(
89 - <TestRefsComponent />,
90 - );
91 - expect(testRefsComponent instanceof TestRefsComponent).toBe(true);
92 -
93 - const generalContainer = testRefsComponent.refs.myContainer;
94 - expect(generalContainer instanceof GeneralContainerComponent).toBe(true);
95 -
96 - const counter = testRefsComponent.refs.myCounter;
97 - expect(counter instanceof ClickCounter).toBe(true);
98 -
99 - return testRefsComponent;
100 -};
101 -
85 const expectClickLogsLengthToBe = function(instance, length) {
86 const clickLogs = ReactTestUtils.scryRenderedDOMComponentsWithClass(
87 instance,
@@ -109,12 +92,40 @@ const expectClickLogsLengthToBe = function(instance, length) {
92 };
93
94 describe('reactiverefs', () => {
95 + let container;
96 +
97 beforeEach(() => {
98 jest.resetModules();
99 React = require('react');
100 + ReactDOM = require('react-dom');
101 ReactTestUtils = require('react-dom/test-utils');
102 });
103
104 + afterEach(() => {
105 + if (container) {
106 + document.body.removeChild(container);
107 + container = null;
108 + }
109 + });
110 +
111 + /**
112 + * Render a TestRefsComponent and ensure that the main refs are wired up.
113 + */
114 + const renderTestRefsComponent = function() {
115 + container = document.createElement('div');
116 + document.body.appendChild(container);
117 + const testRefsComponent = ReactDOM.render(<TestRefsComponent />, container);
118 + expect(testRefsComponent instanceof TestRefsComponent).toBe(true);
119 +
120 + const generalContainer = testRefsComponent.refs.myContainer;
121 + expect(generalContainer instanceof GeneralContainerComponent).toBe(true);
122 +
123 + const counter = testRefsComponent.refs.myCounter;
124 + expect(counter instanceof ClickCounter).toBe(true);
125 +
126 + return testRefsComponent;
127 + };
128 +
129 /**
130 * Ensure that for every click log there is a corresponding ref (from the
131 * perspective of the injected ClickCounter component.
@@ -129,18 +140,18 @@ describe('reactiverefs', () => {
140 expectClickLogsLengthToBe(testRefsComponent, 1);
141
142 // After clicking the reset, there should still only be one click log ref.
132 - ReactTestUtils.Simulate.click(testRefsComponent.refs.resetDiv);
143 + testRefsComponent.refs.resetDiv.click();
144 expectClickLogsLengthToBe(testRefsComponent, 1);
145
146 // Begin incrementing clicks (and therefore refs).
136 - ReactTestUtils.Simulate.click(clickIncrementer);
147 + clickIncrementer.click();
148 expectClickLogsLengthToBe(testRefsComponent, 2);
149
139 - ReactTestUtils.Simulate.click(clickIncrementer);
150 + clickIncrementer.click();
151 expectClickLogsLengthToBe(testRefsComponent, 3);
152
153 // Now reset again
143 - ReactTestUtils.Simulate.click(testRefsComponent.refs.resetDiv);
154 + testRefsComponent.refs.resetDiv.click();
155 expectClickLogsLengthToBe(testRefsComponent, 1);
156 });
157 });
@@ -168,6 +179,7 @@ describe('ref swapping', () => {
179 beforeEach(() => {
180 jest.resetModules();
181 React = require('react');
182 + ReactDOM = require('react-dom');
183 ReactTestUtils = require('react-dom/test-utils');
184
185 RefHopsAround = class extends React.Component {
@@ -293,7 +305,6 @@ describe('ref swapping', () => {
305
306 describe('root level refs', () => {
307 it('attaches and detaches root refs', () => {
296 - const ReactDOM = require('react-dom');
308 let inst = null;
309
310 // host node
packages/react-dom/src/events/__tests__/SimpleEventPlugin-test.internal.js
+40 -30
@@ -12,23 +12,25 @@
12 describe('SimpleEventPlugin', function() {
13 let React;
14 let ReactDOM;
15 - let ReactTestUtils;
15 let ReactFeatureFlags;
16
17 let onClick;
18 + let container;
19
20 function expectClickThru(element) {
21 - ReactTestUtils.SimulateNative.click(ReactDOM.findDOMNode(element));
21 + element.click();
22 expect(onClick).toHaveBeenCalledTimes(1);
23 }
24
25 function expectNoClickThru(element) {
26 - ReactTestUtils.SimulateNative.click(ReactDOM.findDOMNode(element));
26 + element.click();
27 expect(onClick).toHaveBeenCalledTimes(0);
28 }
29
30 function mounted(element) {
31 - element = ReactTestUtils.renderIntoDocument(element);
31 + container = document.createElement('div');
32 + document.body.appendChild(container);
33 + element = ReactDOM.render(element, container);
34 return element;
35 }
36
@@ -60,75 +62,80 @@ describe('SimpleEventPlugin', function() {
62 jest.resetModules();
63 React = require('react');
64 ReactDOM = require('react-dom');
63 - ReactTestUtils = require('react-dom/test-utils');
65
66 onClick = jest.fn();
67 });
68
69 + afterEach(() => {
70 + if (container && document.body.contains(container)) {
71 + document.body.removeChild(container);
72 + container = null;
73 + }
74 + });
75 +
76 it('A non-interactive tags click when disabled', function() {
77 const element = <div onClick={onClick} />;
78 expectClickThru(mounted(element));
79 });
80
81 it('A non-interactive tags clicks bubble when disabled', function() {
74 - const element = ReactTestUtils.renderIntoDocument(
82 + const element = mounted(
83 <div onClick={onClick}>
84 <div />
85 </div>,
86 );
79 - const child = ReactDOM.findDOMNode(element).firstChild;
80 -
81 - ReactTestUtils.SimulateNative.click(child);
87 + const child = element.firstChild;
88 + child.click();
89 expect(onClick).toHaveBeenCalledTimes(1);
90 });
91
92 it('does not register a click when clicking a child of a disabled element', function() {
86 - const element = ReactTestUtils.renderIntoDocument(
93 + const element = mounted(
94 <button onClick={onClick} disabled={true}>
95 <span />
96 </button>,
97 );
91 - const child = ReactDOM.findDOMNode(element).querySelector('span');
98 + const child = element.querySelector('span');
99
93 - ReactTestUtils.SimulateNative.click(child);
100 + child.click();
101 expect(onClick).toHaveBeenCalledTimes(0);
102 });
103
104 it('triggers click events for children of disabled elements', function() {
98 - const element = ReactTestUtils.renderIntoDocument(
105 + const element = mounted(
106 <button disabled={true}>
107 <span onClick={onClick} />
108 </button>,
109 );
103 - const child = ReactDOM.findDOMNode(element).querySelector('span');
110 + const child = element.querySelector('span');
111
105 - ReactTestUtils.SimulateNative.click(child);
112 + child.click();
113 expect(onClick).toHaveBeenCalledTimes(1);
114 });
115
116 it('triggers parent captured click events when target is a child of a disabled elements', function() {
110 - const element = ReactTestUtils.renderIntoDocument(
117 + const element = mounted(
118 <div onClickCapture={onClick}>
119 <button disabled={true}>
120 <span />
121 </button>
122 </div>,
123 );
117 - const child = ReactDOM.findDOMNode(element).querySelector('span');
124 + const child = element.querySelector('span');
125
119 - ReactTestUtils.SimulateNative.click(child);
126 + child.click();
127 expect(onClick).toHaveBeenCalledTimes(1);
128 });
129
130 it('triggers captured click events for children of disabled elements', function() {
124 - const element = ReactTestUtils.renderIntoDocument(
131 + const element = mounted(
132 <button disabled={true}>
133 <span onClickCapture={onClick} />
134 </button>,
135 );
129 - const child = ReactDOM.findDOMNode(element).querySelector('span');
136 + const child = element.querySelector('span');
137
131 - ReactTestUtils.SimulateNative.click(child);
138 + child.click();
139 expect(onClick).toHaveBeenCalledTimes(1);
140 });
141
@@ -152,7 +159,8 @@ describe('SimpleEventPlugin', function() {
159 });
160
161 it('should forward clicks when it becomes not disabled', () => {
155 - const container = document.createElement('div');
162 + container = document.createElement('div');
163 + document.body.appendChild(container);
164 let element = ReactDOM.render(
165 React.createElement(tagName, {onClick: onClick, disabled: true}),
166 container,
@@ -165,7 +173,8 @@ describe('SimpleEventPlugin', function() {
173 });
174
175 it('should not forward clicks when it becomes disabled', () => {
168 - const container = document.createElement('div');
176 + container = document.createElement('div');
177 + document.body.appendChild(container);
178 let element = ReactDOM.render(
179 React.createElement(tagName, {onClick: onClick}),
180 container,
@@ -178,7 +187,8 @@ describe('SimpleEventPlugin', function() {
187 });
188
189 it('should work correctly if the listener is changed', () => {
181 - const container = document.createElement('div');
190 + container = document.createElement('div');
191 + document.body.appendChild(container);
192 let element = ReactDOM.render(
193 React.createElement(tagName, {onClick: onClick, disabled: true}),
194 container,
@@ -193,7 +203,7 @@ describe('SimpleEventPlugin', function() {
203 });
204
205 it('batches updates that occur as a result of a nested event dispatch', () => {
196 - const container = document.createElement('div');
206 + container = document.createElement('div');
207 document.body.appendChild(container);
208
209 let ops = [];
@@ -251,7 +261,7 @@ describe('SimpleEventPlugin', function() {
261 });
262
263 it('flushes pending interactive work before extracting event handler', () => {
254 - const container = document.createElement('div');
264 + container = document.createElement('div');
265 const root = ReactDOM.unstable_createRoot(container);
266 document.body.appendChild(container);
267
@@ -331,7 +341,7 @@ describe('SimpleEventPlugin', function() {
341 });
342
343 it('end result of many interactive updates is deterministic', () => {
334 - const container = document.createElement('div');
344 + container = document.createElement('div');
345 const root = ReactDOM.unstable_createRoot(container);
346 document.body.appendChild(container);
347
@@ -386,7 +396,7 @@ describe('SimpleEventPlugin', function() {
396 });
397
398 it('flushes lowest pending interactive priority', () => {
389 - const container = document.createElement('div');
399 + container = document.createElement('div');
400 document.body.appendChild(container);
401
402 let button;
@@ -459,7 +469,7 @@ describe('SimpleEventPlugin', function() {
469 // See http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
470
471 it('does not add a local click to interactive elements', function() {
462 - const container = document.createElement('div');
472 + container = document.createElement('div');
473
474 ReactDOM.render(<button onClick={onClick} />, container);
475
@@ -471,7 +481,7 @@ describe('SimpleEventPlugin', function() {
481 });
482
483 it('adds a local click listener to non-interactive elements', function() {
474 - const container = document.createElement('div');
484 + container = document.createElement('div');
485
486 ReactDOM.render(<div onClick={onClick} />, container);
487
packages/react-dom/src/events/__tests__/SyntheticEvent-test.js
+3 -9
@@ -11,7 +11,6 @@
11
12 let React;
13 let ReactDOM;
14 -let ReactTestUtils;
14
15 describe('SyntheticEvent', () => {
16 let container;
@@ -19,7 +18,6 @@ describe('SyntheticEvent', () => {
18 beforeEach(() => {
19 React = require('react');
20 ReactDOM = require('react-dom');
22 - ReactTestUtils = require('react-dom/test-utils');
21
22 container = document.createElement('div');
23 document.body.appendChild(container);
@@ -245,17 +243,13 @@ describe('SyntheticEvent', () => {
243 expect(expectedCount).toBe(1);
244 });
245
248 - // TODO: reenable this test. We are currently silencing these warnings when
249 - // using TestUtils.Simulate to avoid spurious warnings that result from the
250 - // way we simulate events.
251 - xit('should properly log warnings when events simulated with rendered components', () => {
246 + it('should properly log warnings when events simulated with rendered components', () => {
247 let event;
253 - const element = document.createElement('div');
248 function assignEvent(e) {
249 event = e;
250 }
257 - const node = ReactDOM.render(<div onClick={assignEvent} />, element);
258 - ReactTestUtils.Simulate.click(ReactDOM.findDOMNode(node));
251 + const node = ReactDOM.render(<div onClick={assignEvent} />, container);
252 + node.click();
253
254 // access a property to cause the warning
255 expect(() => {
packages/react-dom/src/events/__tests__/TapEventPlugin-test.internal.js
+36 -33
@@ -28,6 +28,27 @@ let PARENT;
28 let CHILD;
29
30 let putListener;
31 +let container;
32 +
33 +function touchStart(element, touchEventInit) {
34 + element.dispatchEvent(
35 + new TouchEvent('touchstart', {
36 + bubbles: true,
37 + cancelable: true,
38 + ...touchEventInit,
39 + }),
40 + );
41 +}
42 +
43 +function touchEnd(element, touchEventInit) {
44 + element.dispatchEvent(
45 + new TouchEvent('touchend', {
46 + bubbles: true,
47 + cancelable: true,
48 + ...touchEventInit,
49 + }),
50 + );
51 +}
52
53 describe('TapEventPlugin', () => {
54 beforeEach(() => {
@@ -40,7 +61,8 @@ describe('TapEventPlugin', () => {
61 ReactTestUtils = require('react-dom/test-utils');
62 TapEventPlugin = require('react-dom/src/events/TapEventPlugin').default;
63
43 - const container = document.createElement('div');
64 + container = document.createElement('div');
65 + document.body.appendChild(container);
66
67 const GRANDPARENT_PROPS = {};
68 const PARENT_PROPS = {};
@@ -91,6 +113,11 @@ describe('TapEventPlugin', () => {
113 });
114 });
115
116 + afterEach(() => {
117 + document.body.removeChild(container);
118 + container = null;
119 + });
120 +
121 /**
122 * The onTouchTap inject is ignore future,
123 * we should always test the deprecated message correct.
@@ -99,42 +126,24 @@ describe('TapEventPlugin', () => {
126
127 it('should infer onTouchTap from a touchStart/End', () => {
128 putListener(CHILD, ON_TOUCH_TAP_KEY, recordID.bind(null, CHILD));
102 - ReactTestUtils.SimulateNative.touchStart(
103 - CHILD,
104 - ReactTestUtils.nativeTouchData(0, 0),
105 - );
106 - ReactTestUtils.SimulateNative.touchEnd(
107 - CHILD,
108 - ReactTestUtils.nativeTouchData(0, 0),
109 - );
129 + touchStart(CHILD, ReactTestUtils.nativeTouchData(0, 0));
130 + touchEnd(CHILD, ReactTestUtils.nativeTouchData(0, 0));
131 expect(idCallOrder.length).toBe(1);
132 expect(idCallOrder[0]).toBe(CHILD);
133 });
134
135 it('should infer onTouchTap from when dragging below threshold', () => {
136 putListener(CHILD, ON_TOUCH_TAP_KEY, recordID.bind(null, CHILD));
116 - ReactTestUtils.SimulateNative.touchStart(
117 - CHILD,
118 - ReactTestUtils.nativeTouchData(0, 0),
119 - );
120 - ReactTestUtils.SimulateNative.touchEnd(
121 - CHILD,
122 - ReactTestUtils.nativeTouchData(0, tapMoveThreshold - 1),
123 - );
137 + touchStart(CHILD, ReactTestUtils.nativeTouchData(0, 0));
138 + touchEnd(CHILD, ReactTestUtils.nativeTouchData(0, tapMoveThreshold - 1));
139 expect(idCallOrder.length).toBe(1);
140 expect(idCallOrder[0]).toBe(CHILD);
141 });
142
143 it('should not onTouchTap from when dragging beyond threshold', () => {
144 putListener(CHILD, ON_TOUCH_TAP_KEY, recordID.bind(null, CHILD));
130 - ReactTestUtils.SimulateNative.touchStart(
131 - CHILD,
132 - ReactTestUtils.nativeTouchData(0, 0),
133 - );
134 - ReactTestUtils.SimulateNative.touchEnd(
135 - CHILD,
136 - ReactTestUtils.nativeTouchData(0, tapMoveThreshold + 1),
137 - );
145 + touchStart(CHILD, ReactTestUtils.nativeTouchData(0, 0));
146 + touchEnd(CHILD, ReactTestUtils.nativeTouchData(0, tapMoveThreshold + 1));
147 expect(idCallOrder.length).toBe(0);
148 });
149
@@ -146,14 +155,8 @@ describe('TapEventPlugin', () => {
155 ON_TOUCH_TAP_KEY,
156 recordID.bind(null, GRANDPARENT),
157 );
149 - ReactTestUtils.SimulateNative.touchStart(
150 - CHILD,
151 - ReactTestUtils.nativeTouchData(0, 0),
152 - );
153 - ReactTestUtils.SimulateNative.touchEnd(
154 - CHILD,
155 - ReactTestUtils.nativeTouchData(0, 0),
156 - );
158 + touchStart(CHILD, ReactTestUtils.nativeTouchData(0, 0));
159 + touchEnd(CHILD, ReactTestUtils.nativeTouchData(0, 0));
160 expect(idCallOrder.length).toBe(3);
161 expect(idCallOrder[0] === CHILD).toBe(true);
162 expect(idCallOrder[1] === PARENT).toBe(true);
packages/react-scheduler/src/__tests__/ReactScheduler-test.js
+2
@@ -68,6 +68,8 @@ describe('ReactScheduler', () => {
68 // - requestAnimationFrame should pass the DOMHighResTimeStamp argument
69 // - calling 'window.postMessage' should actually fire postmessage handlers
70 // - Date.now should return the correct thing
71 + // - test with native performance.now()
72 + delete global.performance;
73 global.requestAnimationFrame = function(cb) {
74 return rAFCallbacks.push(() => {
75 cb(startOfLatestFrame);
yarn.lock
+353 -256
@@ -2,12 +2,18 @@
2 # yarn lockfile v1
3
4
5 -"@babel/code-frame@7.0.0-beta.44", "@babel/code-frame@^7.0.0-beta.35":
5 +"@babel/code-frame@7.0.0-beta.44":
6 version "7.0.0-beta.44"
7 resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9"
8 dependencies:
9 "@babel/highlight" "7.0.0-beta.44"
10
11 +"@babel/code-frame@^7.0.0-beta.35":
12 + version "7.0.0-beta.49"
13 + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz#becd805482734440c9d137e46d77340e64d7f51b"
14 + dependencies:
15 + "@babel/highlight" "7.0.0-beta.49"
16 +
17 "@babel/generator@7.0.0-beta.44":
18 version "7.0.0-beta.44"
19 resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.44.tgz#c7e67b9b5284afcf69b309b50d7d37f3e5033d42"
@@ -46,6 +52,14 @@
52 esutils "^2.0.2"
53 js-tokens "^3.0.0"
54
55 +"@babel/highlight@7.0.0-beta.49":
56 + version "7.0.0-beta.49"
57 + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.49.tgz#96bdc6b43e13482012ba6691b1018492d39622cc"
58 + dependencies:
59 + chalk "^2.0.0"
60 + esutils "^2.0.2"
61 + js-tokens "^3.0.0"
62 +
63 "@babel/template@7.0.0-beta.44":
64 version "7.0.0-beta.44"
65 resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f"
@@ -78,10 +92,6 @@
92 lodash "^4.2.0"
93 to-fast-properties "^2.0.0"
94
81 -"@types/node@*":
82 - version "8.5.1"
83 - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.1.tgz#4ec3020bcdfe2abffeef9ba3fbf26fca097514b5"
84 -
95 JSONStream@^1.0.3:
96 version "1.3.1"
97 resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a"
@@ -89,15 +99,15 @@ JSONStream@^1.0.3:
99 jsonparse "^1.2.0"
100 through ">=2.2.7 <3"
101
92 -abab@^1.0.3:
93 - version "1.0.3"
94 - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d"
102 +abab@^1.0.4:
103 + version "1.0.4"
104 + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e"
105
106 abbrev@1:
107 version "1.1.1"
108 resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
109
100 -acorn-globals@^4.0.0:
110 +acorn-globals@^4.1.0:
111 version "4.1.0"
112 resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538"
113 dependencies:
@@ -121,7 +131,11 @@ acorn@^4.0.3:
131 version "4.0.11"
132 resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0"
133
124 -acorn@^5.0.0, acorn@^5.1.2, acorn@^5.2.1:
134 +acorn@^5.0.0, acorn@^5.3.0:
135 + version "5.6.2"
136 + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.6.2.tgz#b1da1d7be2ac1b4a327fb9eab851702c5045b4e7"
137 +
138 +acorn@^5.2.1:
139 version "5.3.0"
140 resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822"
141
@@ -191,11 +205,18 @@ anymatch@^1.3.0:
205 micromatch "^2.1.5"
206 normalize-path "^2.0.0"
207
194 -append-transform@^0.4.0:
195 - version "0.4.0"
196 - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991"
208 +anymatch@^2.0.0:
209 + version "2.0.0"
210 + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
211 + dependencies:
212 + micromatch "^3.1.4"
213 + normalize-path "^2.1.1"
214 +
215 +append-transform@^1.0.0:
216 + version "1.0.0"
217 + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab"
218 dependencies:
198 - default-require-extensions "^1.0.0"
219 + default-require-extensions "^2.0.0"
220
221 aproba@^1.0.3:
222 version "1.2.0"
@@ -313,15 +334,19 @@ async-each@^1.0.0:
334 version "1.0.1"
335 resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d"
336
337 +async-limiter@~1.0.0:
338 + version "1.0.0"
339 + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
340 +
341 async@^1.4.0, async@^1.5.0:
342 version "1.5.2"
343 resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
344
345 async@^2.1.4:
321 - version "2.3.0"
322 - resolved "https://registry.yarnpkg.com/async/-/async-2.3.0.tgz#1013d1051047dd320fe24e494d5c66ecaf6147d9"
346 + version "2.6.1"
347 + resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610"
348 dependencies:
324 - lodash "^4.14.0"
349 + lodash "^4.17.10"
350
351 asynckit@^0.4.0:
352 version "0.4.0"
@@ -1027,18 +1052,6 @@ boom@2.x.x:
1052 dependencies:
1053 hoek "2.x.x"
1054
1030 -boom@4.x.x:
1031 - version "4.3.1"
1032 - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31"
1033 - dependencies:
1034 - hoek "4.x.x"
1035 -
1036 -boom@5.x.x:
1037 - version "5.2.0"
1038 - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02"
1039 - dependencies:
1040 - hoek "4.x.x"
1041 -
1055 brace-expansion@^1.0.0, brace-expansion@^1.1.7:
1056 version "1.1.11"
1057 resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -1109,8 +1122,8 @@ bser@^2.0.0:
1122 node-int64 "^0.4.0"
1123
1124 buffer-from@^1.0.0:
1112 - version "1.0.0"
1113 - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531"
1125 + version "1.1.0"
1126 + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04"
1127
1128 builtin-modules@^1.0.0, builtin-modules@^1.1.0:
1129 version "1.1.1"
@@ -1167,6 +1180,12 @@ camelcase@^4.1.0:
1180 version "4.1.0"
1181 resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
1182
1183 +capture-exit@^1.2.0:
1184 + version "1.2.0"
1185 + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f"
1186 + dependencies:
1187 + rsvp "^3.3.3"
1188 +
1189 caseless@~0.11.0:
1190 version "0.11.0"
1191 resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
@@ -1224,8 +1243,8 @@ chownr@^1.0.1:
1243 resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181"
1244
1245 ci-info@^1.0.0:
1227 - version "1.0.0"
1228 - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534"
1246 + version "1.1.3"
1247 + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2"
1248
1249 circular-json@^0.3.1:
1250 version "0.3.1"
@@ -1273,8 +1292,8 @@ cliui@^3.2.0:
1292 wrap-ansi "^2.0.0"
1293
1294 cliui@^4.0.0:
1276 - version "4.0.0"
1277 - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc"
1295 + version "4.1.0"
1296 + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49"
1297 dependencies:
1298 string-width "^2.1.1"
1299 strip-ansi "^4.0.0"
@@ -1350,7 +1369,7 @@ combine-source-map@~0.6.1:
1369 lodash.memoize "~3.0.3"
1370 source-map "~0.4.2"
1371
1353 -combined-stream@^1.0.5, combined-stream@~1.0.5:
1372 +combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5:
1373 version "1.0.6"
1374 resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
1375 dependencies:
@@ -1375,8 +1394,8 @@ commoner@~0.10.3:
1394 recast "^0.11.17"
1395
1396 compare-versions@^3.1.0:
1378 - version "3.2.1"
1379 - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.2.1.tgz#a49eb7689d4caaf0b6db5220173fd279614000f7"
1397 + version "3.3.0"
1398 + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.3.0.tgz#af93ea705a96943f622ab309578b9b90586f39c3"
1399
1400 component-emitter@^1.2.1:
1401 version "1.2.1"
@@ -1398,10 +1417,6 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0:
1417 version "1.1.0"
1418 resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
1419
1401 -content-type-parser@^1.0.1:
1402 - version "1.0.1"
1403 - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94"
1404 -
1420 convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0:
1421 version "1.5.1"
1422 resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
@@ -1483,19 +1498,13 @@ cryptiles@2.x.x:
1498 dependencies:
1499 boom "2.x.x"
1500
1486 -cryptiles@3.x.x:
1487 - version "3.1.2"
1488 - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe"
1489 - dependencies:
1490 - boom "5.x.x"
1491 -
1501 cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0":
1502 version "0.3.2"
1503 resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b"
1504
1496 -"cssstyle@>= 0.2.37 < 0.3.0":
1497 - version "0.2.37"
1498 - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54"
1505 +"cssstyle@>= 0.3.1 < 0.4.0":
1506 + version "0.3.1"
1507 + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.3.1.tgz#6da9b4cff1bc5d716e6e5fe8e04fcb1b50a49adf"
1508 dependencies:
1509 cssom "0.3.x"
1510
@@ -1543,6 +1552,14 @@ dashdash@^1.12.0:
1552 dependencies:
1553 assert-plus "^1.0.0"
1554
1555 +data-urls@^1.0.0:
1556 + version "1.0.0"
1557 + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.0.0.tgz#24802de4e81c298ea8a9388bb0d8e461c774684f"
1558 + dependencies:
1559 + abab "^1.0.4"
1560 + whatwg-mimetype "^2.0.0"
1561 + whatwg-url "^6.4.0"
1562 +
1563 dateformat@^2.0.0:
1564 version "2.0.0"
1565 resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17"
@@ -1575,11 +1592,11 @@ deep-is@~0.1.3:
1592 version "0.1.3"
1593 resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
1594
1578 -default-require-extensions@^1.0.0:
1579 - version "1.0.0"
1580 - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8"
1595 +default-require-extensions@^2.0.0:
1596 + version "2.0.0"
1597 + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7"
1598 dependencies:
1582 - strip-bom "^2.0.0"
1599 + strip-bom "^3.0.0"
1600
1601 define-properties@^1.1.2:
1602 version "1.1.2"
@@ -1707,8 +1724,10 @@ doctrine@^2.0.2:
1724 esutils "^2.0.2"
1725
1726 domexception@^1.0.0:
1710 - version "1.0.0"
1711 - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.0.tgz#81fe5df81b3f057052cde3a9fa9bf536a85b9ab0"
1727 + version "1.0.1"
1728 + resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90"
1729 + dependencies:
1730 + webidl-conversions "^4.0.2"
1731
1732 dotenv@^4.0.0:
1733 version "4.0.0"
@@ -1767,7 +1786,17 @@ error-ex@^1.2.0:
1786 dependencies:
1787 is-arrayish "^0.2.1"
1788
1770 -es-abstract@^1.5.1, es-abstract@^1.7.0:
1789 +es-abstract@^1.5.1:
1790 + version "1.12.0"
1791 + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165"
1792 + dependencies:
1793 + es-to-primitive "^1.1.1"
1794 + function-bind "^1.1.1"
1795 + has "^1.0.1"
1796 + is-callable "^1.1.3"
1797 + is-regex "^1.0.4"
1798 +
1799 +es-abstract@^1.7.0:
1800 version "1.10.0"
1801 resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864"
1802 dependencies:
@@ -1852,15 +1881,15 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
1881 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
1882
1883 escodegen@^1.9.0:
1855 - version "1.9.0"
1856 - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852"
1884 + version "1.10.0"
1885 + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.10.0.tgz#f647395de22519fbd0d928ffcf1d17e0dec2603e"
1886 dependencies:
1887 esprima "^3.1.3"
1888 estraverse "^4.2.0"
1889 esutils "^2.0.2"
1890 optionator "^0.8.1"
1891 optionalDependencies:
1863 - source-map "~0.5.6"
1892 + source-map "~0.6.1"
1893
1894 escope@^3.6.0:
1895 version "3.6.0"
@@ -2023,8 +2052,8 @@ event-emitter@~0.3.5:
2052 es5-ext "~0.10.14"
2053
2054 exec-sh@^0.2.0:
2026 - version "0.2.0"
2027 - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10"
2055 + version "0.2.1"
2056 + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38"
2057 dependencies:
2058 merge "^1.1.3"
2059
@@ -2074,15 +2103,15 @@ expand-tilde@^1.2.2:
2103 dependencies:
2104 os-homedir "^1.0.1"
2105
2077 -expect@^23.0.1:
2078 - version "23.0.1"
2079 - resolved "https://registry.yarnpkg.com/expect/-/expect-23.0.1.tgz#99131f2fd9115595f8cc3697401e7f0734d45fef"
2106 +expect@^23.1.0:
2107 + version "23.1.0"
2108 + resolved "https://registry.yarnpkg.com/expect/-/expect-23.1.0.tgz#bfdfd57a2a20170d875999ee9787cc71f01c205f"
2109 dependencies:
2110 ansi-styles "^3.2.0"
2111 jest-diff "^23.0.1"
2112 jest-get-type "^22.1.0"
2113 jest-matcher-utils "^23.0.1"
2085 - jest-message-util "^23.0.0"
2114 + jest-message-util "^23.1.0"
2115 jest-regex-util "^23.0.0"
2116
2117 extend-shallow@^2.0.1:
@@ -2338,11 +2367,11 @@ form-data@~2.1.1:
2367 mime-types "^2.1.12"
2368
2369 form-data@~2.3.1:
2341 - version "2.3.1"
2342 - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf"
2370 + version "2.3.2"
2371 + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099"
2372 dependencies:
2373 asynckit "^0.4.0"
2345 - combined-stream "^1.0.5"
2374 + combined-stream "1.0.6"
2375 mime-types "^2.1.12"
2376
2377 fragment-cache@^0.2.1:
@@ -2373,13 +2402,20 @@ fs.realpath@^1.0.0:
2402 version "1.0.0"
2403 resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
2404
2376 -fsevents@^1.0.0, fsevents@^1.1.1:
2405 +fsevents@^1.0.0:
2406 version "1.2.2"
2407 resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.2.tgz#4f598f0f69b273188ef4a62ca4e9e08ace314bbf"
2408 dependencies:
2409 nan "^2.9.2"
2410 node-pre-gyp "^0.9.0"
2411
2412 +fsevents@^1.2.3:
2413 + version "1.2.4"
2414 + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426"
2415 + dependencies:
2416 + nan "^2.9.2"
2417 + node-pre-gyp "^0.10.0"
2418 +
2419 function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1:
2420 version "1.1.1"
2421 resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
@@ -2641,8 +2677,8 @@ gzip-size@^3.0.0:
2677 duplexer "^0.1.1"
2678
2679 handlebars@^4.0.3:
2644 - version "4.0.5"
2645 - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.5.tgz#92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7"
2680 + version "4.0.11"
2681 + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc"
2682 dependencies:
2683 async "^1.4.0"
2684 optimist "^0.6.1"
@@ -2740,23 +2776,10 @@ hawk@~3.1.3:
2776 hoek "2.x.x"
2777 sntp "1.x.x"
2778
2743 -hawk@~6.0.2:
2744 - version "6.0.2"
2745 - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038"
2746 - dependencies:
2747 - boom "4.x.x"
2748 - cryptiles "3.x.x"
2749 - hoek "4.x.x"
2750 - sntp "2.x.x"
2751 -
2779 hoek@2.x.x:
2780 version "2.16.3"
2781 resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
2782
2756 -hoek@4.x.x:
2757 - version "4.2.0"
2758 - resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d"
2759 -
2783 home-or-tmp@^1.0.0:
2784 version "1.0.0"
2785 resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-1.0.0.tgz#4b9f1e40800c3e50c6c27f781676afcce71f3985"
@@ -2781,9 +2804,9 @@ hosted-git-info@^2.1.4:
2804 version "2.6.0"
2805 resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222"
2806
2784 -html-encoding-sniffer@^1.0.1:
2785 - version "1.0.1"
2786 - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da"
2807 +html-encoding-sniffer@^1.0.2:
2808 + version "1.0.2"
2809 + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8"
2810 dependencies:
2811 whatwg-encoding "^1.0.1"
2812
@@ -2814,9 +2837,9 @@ hyperlinker@^1.0.0:
2837 version "1.0.0"
2838 resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e"
2839
2817 -iconv-lite@0.4.13:
2818 - version "0.4.13"
2819 - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"
2840 +iconv-lite@0.4.19:
2841 + version "0.4.19"
2842 + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
2843
2844 iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@^0.4.5, iconv-lite@~0.4.13:
2845 version "0.4.21"
@@ -2939,8 +2962,8 @@ is-callable@^1.1.1, is-callable@^1.1.3:
2962 resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
2963
2964 is-ci@^1.0.10:
2942 - version "1.0.10"
2943 - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e"
2965 + version "1.1.0"
2966 + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5"
2967 dependencies:
2968 ci-info "^1.0.0"
2969
@@ -3218,10 +3241,10 @@ istanbul-lib-coverage@^1.2.0:
3241 resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341"
3242
3243 istanbul-lib-hook@^1.2.0:
3221 - version "1.2.0"
3222 - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.0.tgz#ae556fd5a41a6e8efa0b1002b1e416dfeaf9816c"
3244 + version "1.2.1"
3245 + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz#f614ec45287b2a8fc4f07f5660af787575601805"
3246 dependencies:
3224 - append-transform "^0.4.0"
3247 + append-transform "^1.0.0"
3248
3249 istanbul-lib-instrument@^1.10.1:
3250 version "1.10.1"
@@ -3245,8 +3268,8 @@ istanbul-lib-report@^1.1.4:
3268 supports-color "^3.1.2"
3269
3270 istanbul-lib-source-maps@^1.2.4:
3248 - version "1.2.4"
3249 - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz#cc7ccad61629f4efff8e2f78adb8c522c9976ec7"
3271 + version "1.2.5"
3272 + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz#ffe6be4e7ab86d3603e4290d54990b14506fc9b1"
3273 dependencies:
3274 debug "^3.1.0"
3275 istanbul-lib-coverage "^1.2.0"
@@ -3272,9 +3295,9 @@ jest-changed-files@^23.0.1:
3295 dependencies:
3296 throat "^4.0.0"
3297
3275 -jest-cli@^23.0.1:
3276 - version "23.0.1"
3277 - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.0.1.tgz#351a5ba51cf28ecf20336d97a30b970d1f530a56"
3298 +jest-cli@^23.1.0:
3299 + version "23.1.0"
3300 + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.1.0.tgz#eb8bdd4ce0d15250892e31ad9b69bc99d2a8f6bf"
3301 dependencies:
3302 ansi-escapes "^3.0.0"
3303 chalk "^2.0.1"
@@ -3288,18 +3311,19 @@ jest-cli@^23.0.1:
3311 istanbul-lib-instrument "^1.10.1"
3312 istanbul-lib-source-maps "^1.2.4"
3313 jest-changed-files "^23.0.1"
3291 - jest-config "^23.0.1"
3292 - jest-environment-jsdom "^23.0.1"
3314 + jest-config "^23.1.0"
3315 + jest-environment-jsdom "^23.1.0"
3316 jest-get-type "^22.1.0"
3294 - jest-haste-map "^23.0.1"
3295 - jest-message-util "^23.0.0"
3317 + jest-haste-map "^23.1.0"
3318 + jest-message-util "^23.1.0"
3319 jest-regex-util "^23.0.0"
3320 jest-resolve-dependencies "^23.0.1"
3298 - jest-runner "^23.0.1"
3299 - jest-runtime "^23.0.1"
3321 + jest-runner "^23.1.0"
3322 + jest-runtime "^23.1.0"
3323 jest-snapshot "^23.0.1"
3301 - jest-util "^23.0.1"
3324 + jest-util "^23.1.0"
3325 jest-validate "^23.0.1"
3326 + jest-watcher "^23.1.0"
3327 jest-worker "^23.0.1"
3328 micromatch "^2.3.11"
3329 node-notifier "^5.2.1"
@@ -3311,21 +3335,21 @@ jest-cli@^23.0.1:
3335 which "^1.2.12"
3336 yargs "^11.0.0"
3337
3314 -jest-config@^23.0.1:
3315 - version "23.0.1"
3316 - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.0.1.tgz#6798bff1247c7a390b1327193305001582fc58fa"
3338 +jest-config@^23.1.0:
3339 + version "23.1.0"
3340 + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.1.0.tgz#708ca0f431d356ee424fb4895d3308006bdd8241"
3341 dependencies:
3342 babel-core "^6.0.0"
3343 babel-jest "^23.0.1"
3344 chalk "^2.0.1"
3345 glob "^7.1.1"
3322 - jest-environment-jsdom "^23.0.1"
3323 - jest-environment-node "^23.0.1"
3346 + jest-environment-jsdom "^23.1.0"
3347 + jest-environment-node "^23.1.0"
3348 jest-get-type "^22.1.0"
3325 - jest-jasmine2 "^23.0.1"
3349 + jest-jasmine2 "^23.1.0"
3350 jest-regex-util "^23.0.0"
3327 - jest-resolve "^23.0.1"
3328 - jest-util "^23.0.1"
3351 + jest-resolve "^23.1.0"
3352 + jest-util "^23.1.0"
3353 jest-validate "^23.0.1"
3354 pretty-format "^23.0.1"
3355
@@ -3344,35 +3368,35 @@ jest-docblock@^23.0.1:
3368 dependencies:
3369 detect-newline "^2.1.0"
3370
3347 -jest-each@^23.0.1:
3348 - version "23.0.1"
3349 - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.0.1.tgz#a6e5dbf530afc6bf9d74792dde69d8db70f84706"
3371 +jest-each@^23.1.0:
3372 + version "23.1.0"
3373 + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.1.0.tgz#16146b592c354867a5ae5e13cdf15c6c65b696c6"
3374 dependencies:
3375 chalk "^2.0.1"
3376 pretty-format "^23.0.1"
3377
3354 -jest-environment-jsdom@^23.0.1:
3355 - version "23.0.1"
3356 - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.0.1.tgz#da689eb9358dc16e5708abb208f4eb26a439575c"
3378 +jest-environment-jsdom@^23.1.0:
3379 + version "23.1.0"
3380 + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.1.0.tgz#85929914e23bed3577dac9755f4106d0697c479c"
3381 dependencies:
3358 - jest-mock "^23.0.1"
3359 - jest-util "^23.0.1"
3382 + jest-mock "^23.1.0"
3383 + jest-util "^23.1.0"
3384 jsdom "^11.5.1"
3385
3362 -jest-environment-node@^23.0.1:
3363 - version "23.0.1"
3364 - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.0.1.tgz#676b740e205f1f2be77241969e7812be824ee795"
3386 +jest-environment-node@^23.1.0:
3387 + version "23.1.0"
3388 + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.1.0.tgz#452c0bf949cfcbbacda1e1762eeed70bc784c7d5"
3389 dependencies:
3366 - jest-mock "^23.0.1"
3367 - jest-util "^23.0.1"
3390 + jest-mock "^23.1.0"
3391 + jest-util "^23.1.0"
3392
3393 jest-get-type@^22.1.0:
3394 version "22.1.0"
3395 resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9"
3396
3373 -jest-haste-map@^23.0.1:
3374 - version "23.0.1"
3375 - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.0.1.tgz#cd89052abfc8cba01f560bbec09d4f36aec25d4f"
3397 +jest-haste-map@^23.1.0:
3398 + version "23.1.0"
3399 + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.1.0.tgz#18e6c7d5a8d27136f91b7d9852f85de0c7074c49"
3400 dependencies:
3401 fb-watchman "^2.0.0"
3402 graceful-fs "^4.1.11"
@@ -3382,20 +3406,20 @@ jest-haste-map@^23.0.1:
3406 micromatch "^2.3.11"
3407 sane "^2.0.0"
3408
3385 -jest-jasmine2@^23.0.1:
3386 - version "23.0.1"
3387 - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.0.1.tgz#16d875356e6360872bba48426f7d31fdc1b0bcea"
3409 +jest-jasmine2@^23.1.0:
3410 + version "23.1.0"
3411 + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.1.0.tgz#4afab31729b654ddcd2b074add849396f13b30b8"
3412 dependencies:
3413 chalk "^2.0.1"
3414 co "^4.6.0"
3391 - expect "^23.0.1"
3415 + expect "^23.1.0"
3416 is-generator-fn "^1.0.0"
3417 jest-diff "^23.0.1"
3394 - jest-each "^23.0.1"
3418 + jest-each "^23.1.0"
3419 jest-matcher-utils "^23.0.1"
3396 - jest-message-util "^23.0.0"
3420 + jest-message-util "^23.1.0"
3421 jest-snapshot "^23.0.1"
3398 - jest-util "^23.0.1"
3422 + jest-util "^23.1.0"
3423 pretty-format "^23.0.1"
3424
3425 jest-leak-detector@^23.0.1:
@@ -3412,9 +3436,9 @@ jest-matcher-utils@^23.0.1:
3436 jest-get-type "^22.1.0"
3437 pretty-format "^23.0.1"
3438
3415 -jest-message-util@^23.0.0:
3416 - version "23.0.0"
3417 - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.0.0.tgz#073f3d76c701f7c718a4b9af1eb7f138792c4796"
3439 +jest-message-util@^23.1.0:
3440 + version "23.1.0"
3441 + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.1.0.tgz#9a809ba487ecac5ce511d4e698ee3b5ee2461ea9"
3442 dependencies:
3443 "@babel/code-frame" "^7.0.0-beta.35"
3444 chalk "^2.0.1"
@@ -3422,9 +3446,9 @@ jest-message-util@^23.0.0:
3446 slash "^1.0.0"
3447 stack-utils "^1.0.1"
3448
3425 -jest-mock@^23.0.1:
3426 - version "23.0.1"
3427 - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.0.1.tgz#1569f477968c668fc728273a17c3767773b46357"
3449 +jest-mock@^23.1.0:
3450 + version "23.1.0"
3451 + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.1.0.tgz#a381c31b121ab1f60c462a2dadb7b86dcccac487"
3452
3453 jest-regex-util@^23.0.0:
3454 version "23.0.0"
@@ -3437,35 +3461,35 @@ jest-resolve-dependencies@^23.0.1:
3461 jest-regex-util "^23.0.0"
3462 jest-snapshot "^23.0.1"
3463
3440 -jest-resolve@^23.0.1:
3441 - version "23.0.1"
3442 - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.0.1.tgz#3f8403462b10a34c2df1d47aab5574c4935bcd24"
3464 +jest-resolve@^23.1.0:
3465 + version "23.1.0"
3466 + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.1.0.tgz#b9e316eecebd6f00bc50a3960d1527bae65792d2"
3467 dependencies:
3468 browser-resolve "^1.11.2"
3469 chalk "^2.0.1"
3470 realpath-native "^1.0.0"
3471
3448 -jest-runner@^23.0.1:
3449 - version "23.0.1"
3450 - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.0.1.tgz#b176ae3ecf9e194aa4b84a7fcf70d1b8db231aa7"
3472 +jest-runner@^23.1.0:
3473 + version "23.1.0"
3474 + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.1.0.tgz#fa20a933fff731a5432b3561e7f6426594fa29b5"
3475 dependencies:
3476 exit "^0.1.2"
3477 graceful-fs "^4.1.11"
3454 - jest-config "^23.0.1"
3478 + jest-config "^23.1.0"
3479 jest-docblock "^23.0.1"
3456 - jest-haste-map "^23.0.1"
3457 - jest-jasmine2 "^23.0.1"
3480 + jest-haste-map "^23.1.0"
3481 + jest-jasmine2 "^23.1.0"
3482 jest-leak-detector "^23.0.1"
3459 - jest-message-util "^23.0.0"
3460 - jest-runtime "^23.0.1"
3461 - jest-util "^23.0.1"
3483 + jest-message-util "^23.1.0"
3484 + jest-runtime "^23.1.0"
3485 + jest-util "^23.1.0"
3486 jest-worker "^23.0.1"
3487 source-map-support "^0.5.6"
3488 throat "^4.0.0"
3489
3466 -jest-runtime@^23.0.1:
3467 - version "23.0.1"
3468 - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.0.1.tgz#b1d765fb03fb6d4043805af270676a693f504d57"
3490 +jest-runtime@^23.1.0:
3491 + version "23.1.0"
3492 + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.1.0.tgz#b4ae0e87259ecacfd4a884b639db07cf4dd620af"
3493 dependencies:
3494 babel-core "^6.0.0"
3495 babel-plugin-istanbul "^4.1.6"
@@ -3474,13 +3498,13 @@ jest-runtime@^23.0.1:
3498 exit "^0.1.2"
3499 fast-json-stable-stringify "^2.0.0"
3500 graceful-fs "^4.1.11"
3477 - jest-config "^23.0.1"
3478 - jest-haste-map "^23.0.1"
3479 - jest-message-util "^23.0.0"
3501 + jest-config "^23.1.0"
3502 + jest-haste-map "^23.1.0"
3503 + jest-message-util "^23.1.0"
3504 jest-regex-util "^23.0.0"
3481 - jest-resolve "^23.0.1"
3505 + jest-resolve "^23.1.0"
3506 jest-snapshot "^23.0.1"
3483 - jest-util "^23.0.1"
3507 + jest-util "^23.1.0"
3508 jest-validate "^23.0.1"
3509 micromatch "^2.3.11"
3510 realpath-native "^1.0.0"
@@ -3504,16 +3528,17 @@ jest-snapshot@^23.0.1:
3528 natural-compare "^1.4.0"
3529 pretty-format "^23.0.1"
3530
3507 -jest-util@^23.0.1:
3508 - version "23.0.1"
3509 - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.0.1.tgz#68ea5bd7edb177d3059f9797259f8e0dacce2f99"
3531 +jest-util@^23.1.0:
3532 + version "23.1.0"
3533 + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.1.0.tgz#c0251baf34644c6dd2fea78a962f4263ac55772d"
3534 dependencies:
3535 callsites "^2.0.0"
3536 chalk "^2.0.1"
3537 graceful-fs "^4.1.11"
3538 is-ci "^1.0.10"
3515 - jest-message-util "^23.0.0"
3539 + jest-message-util "^23.1.0"
3540 mkdirp "^0.5.1"
3541 + slash "^1.0.0"
3542 source-map "^0.6.0"
3543
3544 jest-validate@^23.0.1:
@@ -3525,18 +3550,26 @@ jest-validate@^23.0.1:
3550 leven "^2.1.0"
3551 pretty-format "^23.0.1"
3552
3553 +jest-watcher@^23.1.0:
3554 + version "23.1.0"
3555 + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.1.0.tgz#a8d5842e38d9fb4afff823df6abb42a58ae6cdbd"
3556 + dependencies:
3557 + ansi-escapes "^3.0.0"
3558 + chalk "^2.0.1"
3559 + string-length "^2.0.0"
3560 +
3561 jest-worker@^23.0.1:
3562 version "23.0.1"
3563 resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.1.tgz#9e649dd963ff4046026f91c4017f039a6aa4a7bc"
3564 dependencies:
3565 merge-stream "^1.0.1"
3566
3534 -jest@^23.0.1:
3535 - version "23.0.1"
3536 - resolved "https://registry.yarnpkg.com/jest/-/jest-23.0.1.tgz#0d083290ee4112cecfb780df6ff81332ed373201"
3567 +jest@^23.1.0:
3568 + version "23.1.0"
3569 + resolved "https://registry.yarnpkg.com/jest/-/jest-23.1.0.tgz#bbb7f893100a11a742dd8bd0d047a54b0968ad1a"
3570 dependencies:
3571 import-local "^1.0.0"
3539 - jest-cli "^23.0.1"
3572 + jest-cli "^23.1.0"
3573
3574 js-tokens@1.0.1:
3575 version "1.0.1"
@@ -3553,7 +3586,14 @@ js-yaml@3.6.1:
3586 argparse "^1.0.7"
3587 esprima "^2.6.0"
3588
3556 -js-yaml@^3.7.0, js-yaml@^3.9.1:
3589 +js-yaml@^3.7.0:
3590 + version "3.12.0"
3591 + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
3592 + dependencies:
3593 + argparse "^1.0.7"
3594 + esprima "^4.0.0"
3595 +
3596 +js-yaml@^3.9.1:
3597 version "3.10.0"
3598 resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
3599 dependencies:
@@ -3565,33 +3605,35 @@ jsbn@~0.1.0:
3605 resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
3606
3607 jsdom@^11.5.1:
3568 - version "11.5.1"
3569 - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.5.1.tgz#5df753b8d0bca20142ce21f4f6c039f99a992929"
3608 + version "11.11.0"
3609 + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.11.0.tgz#df486efad41aee96c59ad7a190e2449c7eb1110e"
3610 dependencies:
3571 - abab "^1.0.3"
3572 - acorn "^5.1.2"
3573 - acorn-globals "^4.0.0"
3611 + abab "^1.0.4"
3612 + acorn "^5.3.0"
3613 + acorn-globals "^4.1.0"
3614 array-equal "^1.0.0"
3575 - browser-process-hrtime "^0.1.2"
3576 - content-type-parser "^1.0.1"
3615 cssom ">= 0.3.2 < 0.4.0"
3578 - cssstyle ">= 0.2.37 < 0.3.0"
3616 + cssstyle ">= 0.3.1 < 0.4.0"
3617 + data-urls "^1.0.0"
3618 domexception "^1.0.0"
3619 escodegen "^1.9.0"
3581 - html-encoding-sniffer "^1.0.1"
3620 + html-encoding-sniffer "^1.0.2"
3621 left-pad "^1.2.0"
3583 - nwmatcher "^1.4.3"
3584 - parse5 "^3.0.2"
3585 - pn "^1.0.0"
3622 + nwsapi "^2.0.0"
3623 + parse5 "4.0.0"
3624 + pn "^1.1.0"
3625 request "^2.83.0"
3587 - request-promise-native "^1.0.3"
3588 - sax "^1.2.1"
3589 - symbol-tree "^3.2.1"
3626 + request-promise-native "^1.0.5"
3627 + sax "^1.2.4"
3628 + symbol-tree "^3.2.2"
3629 tough-cookie "^2.3.3"
3630 + w3c-hr-time "^1.0.1"
3631 webidl-conversions "^4.0.2"
3592 - whatwg-encoding "^1.0.1"
3593 - whatwg-url "^6.3.0"
3594 - xml-name-validator "^2.0.1"
3632 + whatwg-encoding "^1.0.3"
3633 + whatwg-mimetype "^2.1.0"
3634 + whatwg-url "^6.4.1"
3635 + ws "^4.0.0"
3636 + xml-name-validator "^3.0.0"
3637
3638 jsesc@^1.3.0:
3639 version "1.3.0"
@@ -3703,8 +3745,8 @@ lcov-parse@0.0.10:
3745 resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
3746
3747 left-pad@^1.2.0:
3706 - version "1.2.0"
3707 - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
3748 + version "1.3.0"
3749 + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e"
3750
3751 leven@^1.0.2:
3752 version "1.0.2"
@@ -3868,7 +3910,7 @@ lodash@^3.10.0, lodash@^3.2.0, lodash@^3.9.3:
3910 version "3.10.1"
3911 resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
3912
3871 -lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0:
3913 +lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0:
3914 version "4.17.10"
3915 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
3916
@@ -3955,7 +3997,7 @@ micromatch@^2.1.5, micromatch@^2.3.11:
3997 parse-glob "^3.0.4"
3998 regex-cache "^0.4.2"
3999
3958 -micromatch@^3.1.8:
4000 +micromatch@^3.1.4, micromatch@^3.1.8:
4001 version "3.1.10"
4002 resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
4003 dependencies:
@@ -3999,7 +4041,7 @@ minimatch@^2.0.3:
4041 dependencies:
4042 brace-expansion "^1.0.0"
4043
4002 -minimist@0.0.8, minimist@~0.0.1:
4044 +minimist@0.0.8:
4045 version "0.0.8"
4046 resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
4047
@@ -4007,6 +4049,10 @@ minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0:
4049 version "1.2.0"
4050 resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
4051
4052 +minimist@~0.0.1:
4053 + version "0.0.10"
4054 + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
4055 +
4056 minipass@^2.2.1, minipass@^2.2.4:
4057 version "2.2.4"
4058 resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.2.4.tgz#03c824d84551ec38a8d1bb5bc350a5a30a354a40"
@@ -4108,6 +4154,21 @@ node-notifier@^5.2.1:
4154 shellwords "^0.1.1"
4155 which "^1.3.0"
4156
4157 +node-pre-gyp@^0.10.0:
4158 + version "0.10.0"
4159 + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46"
4160 + dependencies:
4161 + detect-libc "^1.0.2"
4162 + mkdirp "^0.5.1"
4163 + needle "^2.2.0"
4164 + nopt "^4.0.1"
4165 + npm-packlist "^1.1.6"
4166 + npmlog "^4.0.2"
4167 + rc "^1.1.7"
4168 + rimraf "^2.6.1"
4169 + semver "^5.3.0"
4170 + tar "^4"
4171 +
4172 node-pre-gyp@^0.9.0:
4173 version "0.9.1"
4174 resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.9.1.tgz#f11c07516dd92f87199dbc7e1838eab7cd56c9e0"
@@ -4139,7 +4200,7 @@ normalize-package-data@^2.3.2:
4200 semver "2 || 3 || 4 || 5"
4201 validate-npm-package-license "^3.0.1"
4202
4142 -normalize-path@^2.0.0, normalize-path@^2.0.1:
4203 +normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1:
4204 version "2.1.1"
4205 resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
4206 dependencies:
@@ -4175,9 +4236,9 @@ number-is-nan@^1.0.0:
4236 version "1.0.1"
4237 resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
4238
4178 -nwmatcher@^1.4.3:
4179 - version "1.4.3"
4180 - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c"
4239 +nwsapi@^2.0.0:
4240 + version "2.0.3"
4241 + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.3.tgz#3f4010d6c943f34018d3dfb5f2fbc0de90476959"
4242
4243 oauth-sign@~0.8.1, oauth-sign@~0.8.2:
4244 version "0.8.2"
@@ -4383,11 +4444,9 @@ parse-passwd@^1.0.0:
4444 version "1.0.0"
4445 resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
4446
4386 -parse5@^3.0.2:
4387 - version "3.0.3"
4388 - resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c"
4389 - dependencies:
4390 - "@types/node" "*"
4447 +parse5@4.0.0:
4448 + version "4.0.0"
4449 + resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608"
4450
4451 pascalcase@^0.1.1:
4452 version "0.1.1"
@@ -4477,7 +4536,7 @@ pluralize@^7.0.0:
4536 version "7.0.0"
4537 resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"
4538
4480 -pn@^1.0.0:
4539 +pn@^1.1.0:
4540 version "1.1.0"
4541 resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb"
4542
@@ -4549,6 +4608,10 @@ pseudomap@^1.0.2:
4608 version "1.0.2"
4609 resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
4610
4611 +psl@^1.1.24:
4612 + version "1.1.27"
4613 + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.27.tgz#2b2c77019db86855170d903532400bf71ee085b6"
4614 +
4615 pump@^1.0.0:
4616 version "1.0.2"
4617 resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.2.tgz#3b3ee6512f94f0e575538c17995f9f16990a5d51"
@@ -4569,8 +4632,8 @@ punycode@^1.4.1:
4632 resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
4633
4634 punycode@^2.1.0:
4572 - version "2.1.0"
4573 - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d"
4635 + version "2.1.1"
4636 + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
4637
4638 q@^1.1.2:
4639 version "1.5.0"
@@ -4581,8 +4644,8 @@ qs@~6.3.0:
4644 resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c"
4645
4646 qs@~6.5.1:
4584 - version "6.5.1"
4585 - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
4647 + version "6.5.2"
4648 + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
4649
4650 random-seed@^0.3.0:
4651 version "0.3.0"
@@ -4818,7 +4881,7 @@ request-promise-core@1.1.1:
4881 dependencies:
4882 lodash "^4.13.1"
4883
4821 -request-promise-native@^1.0.3:
4884 +request-promise-native@^1.0.5:
4885 version "1.0.5"
4886 resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5"
4887 dependencies:
@@ -4852,8 +4915,8 @@ request@2.79.0:
4915 uuid "^3.0.0"
4916
4917 request@^2.83.0:
4855 - version "2.85.0"
4856 - resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa"
4918 + version "2.87.0"
4919 + resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e"
4920 dependencies:
4921 aws-sign2 "~0.7.0"
4922 aws4 "^1.6.0"
@@ -4863,7 +4926,6 @@ request@^2.83.0:
4926 forever-agent "~0.6.1"
4927 form-data "~2.3.1"
4928 har-validator "~5.0.3"
4866 - hawk "~6.0.2"
4929 http-signature "~1.2.0"
4930 is-typedarray "~1.0.0"
4931 isstream "~0.1.2"
@@ -4873,7 +4935,6 @@ request@^2.83.0:
4935 performance-now "^2.1.0"
4936 qs "~6.5.1"
4937 safe-buffer "^5.1.1"
4876 - stringstream "~0.0.5"
4938 tough-cookie "~2.3.3"
4939 tunnel-agent "^0.6.0"
4940 uuid "^3.1.0"
@@ -5029,6 +5090,10 @@ rollup@^0.52.1:
5090 version "0.52.1"
5091 resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.52.1.tgz#610e8e1be432f18fcfbfa865408a1cd7618cd707"
5092
5093 +rsvp@^3.3.3:
5094 + version "3.6.2"
5095 + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a"
5096 +
5097 run-async@^2.2.0:
5098 version "2.3.0"
5099 resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
@@ -5058,7 +5123,11 @@ rxjs@^5.5.6:
5123 dependencies:
5124 symbol-observable "1.0.1"
5125
5061 -safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
5126 +safe-buffer@^5.0.1:
5127 + version "5.1.2"
5128 + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
5129 +
5130 +safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
5131 version "5.1.1"
5132 resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
5133
@@ -5073,20 +5142,21 @@ safer-buffer@^2.1.0:
5142 resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
5143
5144 sane@^2.0.0:
5076 - version "2.0.0"
5077 - resolved "https://registry.yarnpkg.com/sane/-/sane-2.0.0.tgz#99cb79f21f4a53a69d4d0cd957c2db04024b8eb2"
5145 + version "2.5.2"
5146 + resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa"
5147 dependencies:
5079 - anymatch "^1.3.0"
5148 + anymatch "^2.0.0"
5149 + capture-exit "^1.2.0"
5150 exec-sh "^0.2.0"
5151 fb-watchman "^2.0.0"
5082 - minimatch "^3.0.2"
5152 + micromatch "^3.1.4"
5153 minimist "^1.1.1"
5154 walker "~1.0.5"
5085 - watch "~0.10.0"
5155 + watch "~0.18.0"
5156 optionalDependencies:
5087 - fsevents "^1.1.1"
5157 + fsevents "^1.2.3"
5158
5089 -sax@^1.2.1, sax@^1.2.4:
5159 +sax@^1.2.4:
5160 version "1.2.4"
5161 resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
5162
@@ -5193,12 +5263,6 @@ sntp@1.x.x:
5263 dependencies:
5264 hoek "2.x.x"
5265
5196 -sntp@2.x.x:
5197 - version "2.1.0"
5198 - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8"
5199 - dependencies:
5200 - hoek "4.x.x"
5201 -
5266 source-map-resolve@^0.5.0:
5267 version "0.5.1"
5268 resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a"
@@ -5244,11 +5308,11 @@ source-map@^0.4.4, source-map@~0.4.0, source-map@~0.4.2:
5308 dependencies:
5309 amdefine ">=0.0.4"
5310
5247 -source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.6:
5311 +source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1:
5312 version "0.5.7"
5313 resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
5314
5251 -source-map@^0.6.0:
5315 +source-map@^0.6.0, source-map@~0.6.1:
5316 version "0.6.1"
5317 resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
5318
@@ -5372,7 +5436,7 @@ stringset@~0.2.1:
5436 version "0.2.1"
5437 resolved "https://registry.yarnpkg.com/stringset/-/stringset-0.2.1.tgz#ef259c4e349344377fcd1c913dd2e848c9c042b5"
5438
5375 -stringstream@~0.0.4, stringstream@~0.0.5:
5439 +stringstream@~0.0.4:
5440 version "0.0.5"
5441 resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
5442
@@ -5441,7 +5505,7 @@ symbol-observable@1.0.1:
5505 version "1.0.1"
5506 resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
5507
5444 -symbol-tree@^3.2.1:
5508 +symbol-tree@^3.2.2:
5509 version "3.2.2"
5510 resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
5511
@@ -5605,13 +5669,20 @@ to-regex@^3.0.1, to-regex@^3.0.2:
5669 regex-not "^1.0.2"
5670 safe-regex "^1.1.0"
5671
5608 -tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3:
5672 +tough-cookie@>=2.3.3, tough-cookie@^2.3.3:
5673 + version "2.4.2"
5674 + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.2.tgz#aa9133154518b494efab98a58247bfc38818c00c"
5675 + dependencies:
5676 + psl "^1.1.24"
5677 + punycode "^1.4.1"
5678 +
5679 +tough-cookie@~2.3.0, tough-cookie@~2.3.3:
5680 version "2.3.4"
5681 resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
5682 dependencies:
5683 punycode "^1.4.1"
5684
5614 -tr46@^1.0.0:
5685 +tr46@^1.0.1:
5686 version "1.0.1"
5687 resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
5688 dependencies:
@@ -5666,8 +5737,8 @@ ua-parser-js@^0.7.9:
5737 resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed"
5738
5739 uglify-js@^2.6:
5669 - version "2.8.22"
5670 - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.22.tgz#d54934778a8da14903fa29a326fb24c0ab51a1a0"
5740 + version "2.8.29"
5741 + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
5742 dependencies:
5743 source-map "~0.5.1"
5744 yargs "~3.10.0"
@@ -5800,37 +5871,50 @@ voca@^1.3.1:
5871 version "1.4.0"
5872 resolved "https://registry.yarnpkg.com/voca/-/voca-1.4.0.tgz#e15ac58b38290b72acc0c330366b6cc7984924d7"
5873
5874 +w3c-hr-time@^1.0.1:
5875 + version "1.0.1"
5876 + resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"
5877 + dependencies:
5878 + browser-process-hrtime "^0.1.2"
5879 +
5880 walker@~1.0.5:
5881 version "1.0.7"
5882 resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"
5883 dependencies:
5884 makeerror "1.0.x"
5885
5809 -watch@~0.10.0:
5810 - version "0.10.0"
5811 - resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc"
5886 +watch@~0.18.0:
5887 + version "0.18.0"
5888 + resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986"
5889 + dependencies:
5890 + exec-sh "^0.2.0"
5891 + minimist "^1.2.0"
5892
5813 -webidl-conversions@^4.0.1, webidl-conversions@^4.0.2:
5893 +webidl-conversions@^4.0.2:
5894 version "4.0.2"
5895 resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
5896
5817 -whatwg-encoding@^1.0.1:
5818 - version "1.0.1"
5819 - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4"
5897 +whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3:
5898 + version "1.0.3"
5899 + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3"
5900 dependencies:
5821 - iconv-lite "0.4.13"
5901 + iconv-lite "0.4.19"
5902
5903 whatwg-fetch@>=0.10.0:
5904 version "2.0.4"
5905 resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"
5906
5827 -whatwg-url@^6.3.0:
5828 - version "6.4.0"
5829 - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08"
5907 +whatwg-mimetype@^2.0.0, whatwg-mimetype@^2.1.0:
5908 + version "2.1.0"
5909 + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4"
5910 +
5911 +whatwg-url@^6.4.0, whatwg-url@^6.4.1:
5912 + version "6.5.0"
5913 + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8"
5914 dependencies:
5915 lodash.sortby "^4.7.0"
5832 - tr46 "^1.0.0"
5833 - webidl-conversions "^4.0.1"
5916 + tr46 "^1.0.1"
5917 + webidl-conversions "^4.0.2"
5918
5919 which-module@^1.0.0:
5920 version "1.0.0"
@@ -5840,12 +5924,18 @@ which-module@^2.0.0:
5924 version "2.0.0"
5925 resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
5926
5843 -which@^1.2.12, which@^1.2.8, which@^1.2.9, which@^1.3.0:
5927 +which@^1.2.12, which@^1.2.8, which@^1.2.9:
5928 version "1.3.0"
5929 resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
5930 dependencies:
5931 isexe "^2.0.0"
5932
5933 +which@^1.3.0:
5934 + version "1.3.1"
5935 + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
5936 + dependencies:
5937 + isexe "^2.0.0"
5938 +
5939 wide-align@^1.1.0:
5940 version "1.1.2"
5941 resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710"
@@ -5901,9 +5991,16 @@ write@^0.2.1:
5991 dependencies:
5992 mkdirp "^0.5.1"
5993
5904 -xml-name-validator@^2.0.1:
5905 - version "2.0.1"
5906 - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635"
5994 +ws@^4.0.0:
5995 + version "4.1.0"
5996 + resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289"
5997 + dependencies:
5998 + async-limiter "~1.0.0"
5999 + safe-buffer "~5.1.0"
6000 +
6001 +xml-name-validator@^3.0.0:
6002 + version "3.0.0"
6003 + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
6004
6005 "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1:
6006 version "4.0.1"