@samitouri / QOS-React / commits / 4d08914985

Fix for #10388. Renames renderToStream to renderToNodeStream. (#10425)

Sasha Aickin committed Aug 10, 2017 at 12:23 UTC 4d0891498575f60e12ed80d7e4a7c0e35b8b7975
10 files changed +255 -183
docs/docs/reference-react-dom-node-stream.md
+7 -7
@@ -14,17 +14,17 @@ Unlike other packages in React, `ReactDOMNodeStream` depends on a package (`stre
14
15 The `ReactDOMNodeStream` object allows you to render your components in Node.js and stream the resulting markup.
16
17 - - [`renderToStream()`](#rendertostream)
18 - - [`renderToStaticStream()`](#rendertostaticstream)
17 + - [`renderToNodeStream()`](#rendertonodestream)
18 + - [`renderToStaticNodeStream()`](#rendertostaticnodestream)
19
20 * * *
21
22 ## Reference
23
24 -### `renderToStream()`
24 +### `renderToNodeStream()`
25
26 ```javascript
27 -ReactDOMNodeStream.renderToStream(element)
27 +ReactDOMNodeStream.renderToNodeStream(element)
28 ```
29
30 Render a React element to its initial HTML. This should only be used in Node.js; it will not work in the browser, since the browser does not support Node.js streams. React will return a [Readable stream](https://nodejs.org/api/stream.html#stream_readable_streams) that outputs an HTML string. The HTML output by this stream will be exactly equal to what [`ReactDOMServer.renderToString`](https://facebook.github.io/react/docs/react-dom-server.html#rendertostring) would return. You can use this method to generate HTML on the server and send the markup down on the initial request for faster page loads and to allow search engines to crawl your pages for SEO purposes.
@@ -35,12 +35,12 @@ Note that the stream returned from this method will return a byte stream encoded
35
36 * * *
37
38 -### `renderToStaticStream()`
38 +### `renderToStaticNodeStream()`
39
40 ```javascript
41 -ReactDOMNodeStream.renderToStaticStream(element)
41 +ReactDOMNodeStream.renderToStaticNodeStream(element)
42 ```
43
44 -Similar to [`renderToStream`](#rendertostream), except this doesn't create extra DOM attributes such as `data-reactid`, that React uses internally. This is useful if you want to use React as a simple static page generator, as stripping away the extra attributes can save lots of bytes.
44 +Similar to [`renderToNodeStream`](#rendertonodestream), except this doesn't create extra DOM attributes such as `data-reactid`, that React uses internally. This is useful if you want to use React as a simple static page generator, as stripping away the extra attributes can save lots of bytes.
45
46 Note that the stream returned from this method will return a byte stream encoded in utf-8. If you need a stream in another encoding, take a look a project like [iconv-lite](https://www.npmjs.com/package/iconv-lite), which provides transform streams for transcoding text.
scripts/error-codes/codes.json
+4 -4
@@ -204,10 +204,10 @@
204 "202": "ReactDOM.render(): Invalid component element. Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.",
205 "203": "ReactDOM.render(): Invalid component element. This may be caused by unintentionally loading two independent copies of React.",
206 "204": "ReactDOM.render(): Invalid component element.",
207 - "205": "renderToStream(): Invalid component element.",
208 - "206": "renderToStaticStream(): Invalid component element.",
209 - "207": "ReactDOMServer.renderToStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.",
210 - "208": "ReactDOMServer.renderToStaticStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.",
207 + "205": "renderToNodeStream(): Invalid component element.",
208 + "206": "renderToStaticNodeStream(): Invalid component element.",
209 + "207": "ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.",
210 + "208": "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.",
211 "209": "renderToString(): Invalid component element.",
212 "210": "renderToStaticMarkup(): Invalid component element.",
213 "211": "Missing injection for fiber findDOMNode",
scripts/fiber/tests-passing-except-dev.txt
+1 -2
@@ -1,2 +1 @@
1 -src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
2 -* gives source code refs for unknown prop warning for exact elements in composition (ssr)
1 +
scripts/fiber/tests-passing.txt
+139 -68
@@ -20,9 +20,7 @@ eslint-rules/__tests__/warning-and-invariant-args-test.js
20 * warning(true, 'error!');
21 * warning(true, '%s %s, %s %s: %s (%s)', 1, 2, 3, 4, 5, 6);
22
23 -scripts/error-codes/__tests__/replace-invariant-error-codes-test.js
24 -* should replace __DEV__ in if
25 -* should replace warning calls
23 +scripts/error-codes/__tests__/dev-expression-with-codes-test.js
24 * should add `reactProdInvariant` when it finds `require('invariant')`
25 * should replace simple invariant calls
26 * should only add `reactProdInvariant` once
@@ -35,6 +33,10 @@ scripts/error-codes/__tests__/invertObject-test.js
33 * should take the last value when there're duplications in vals
34 * should preserve the original order
35
36 +scripts/rollup/plugins/__tests__/wrap-warning-with-env-check-test.js
37 +* should wrap warning calls
38 +* should not wrap invariant calls
39 +
40 scripts/shared/__tests__/evalToString-test.js
41 * should support StringLiteral
42 * should support string concat (`+`)
@@ -336,6 +338,12 @@ src/renderers/__tests__/ReactComponent-test.js
338 * includes owner name in the error about badly-typed elements
339 * throws if a plain object is used as a child
340 * throws if a plain object even if it is in an owner
341 +* throws if a plain object is used as a child when using SSR
342 +* throws if a plain object even if it is in an owner when using SSR
343 +* warns on function as a return value from a function
344 +* warns on function as a return value from a class
345 +* warns on function as a child to host component
346 +* does not warn for function-as-a-child that gets resolved
347
348 src/renderers/__tests__/ReactComponentLifeCycle-test.js
349 * should not reuse an instance when it has been unmounted
@@ -633,6 +641,7 @@ src/renderers/dom/__tests__/ReactDOMProduction-test.js
641 * should use prod fbjs
642 * should use prod React
643 * should handle a simple flow
644 +* should handle a simple flow (ssr)
645 * should call lifecycle methods
646 * should throw with an error code in production
647 * should not crash with devtools installed
@@ -715,15 +724,12 @@ src/renderers/dom/shared/__tests__/DOMPropertyOperations-test.js
724 * should not remove empty attributes for special properties
725 * should remove for falsey boolean properties
726 * should remove when setting custom attr to null
718 -* should use mutation method where applicable
727 * should set className to empty string instead of null
728 * should remove property properly for boolean properties
721 -* should remove property properly even with different name
729 * should update an empty attribute to zero
730 * should always assign the value attribute for non-inputs
731 * should remove attributes for normal properties
732 * should not remove attributes for special properties
726 -* should not leave all options selected when deleting multiple
733
734 src/renderers/dom/shared/__tests__/ReactBrowserEventEmitter-test.js
735 * should store a listener correctly
@@ -855,6 +861,7 @@ src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
861 * gives source code refs for unknown prop warning for exact elements
862 * gives source code refs for unknown prop warning for exact elements (ssr)
863 * gives source code refs for unknown prop warning for exact elements in composition
864 +* gives source code refs for unknown prop warning for exact elements in composition (ssr)
865 * should suggest property name if available
866 * should suggest property name if available (ssr)
867 * renders innerHTML and preserves whitespace
@@ -901,6 +908,41 @@ src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js
908 * renders a self-closing tag as a child with clean client render
909 * renders a self-closing tag as a child with client render on top of good server markup
910 * renders a self-closing tag as a child with client render on top of bad server markup
911 +* renders a string with server string render
912 +* renders a string with server stream render
913 +* renders a string with clean client render
914 +* renders a string with client render on top of good server markup
915 +* renders a string with client render on top of bad server markup
916 +* renders a number with server string render
917 +* renders a number with server stream render
918 +* renders a number with clean client render
919 +* renders a number with client render on top of good server markup
920 +* renders a number with client render on top of bad server markup
921 +* renders an array with one child with server string render
922 +* renders an array with one child with server stream render
923 +* renders an array with one child with clean client render
924 +* renders an array with one child with client render on top of good server markup
925 +* renders an array with one child with client render on top of bad server markup
926 +* renders an array with several children with server string render
927 +* renders an array with several children with server stream render
928 +* renders an array with several children with clean client render
929 +* renders an array with several children with client render on top of good server markup
930 +* renders an array with several children with client render on top of bad server markup
931 +* renders a nested array with server string render
932 +* renders a nested array with server stream render
933 +* renders a nested array with clean client render
934 +* renders a nested array with client render on top of good server markup
935 +* renders a nested array with client render on top of bad server markup
936 +* renders an iterable with server string render
937 +* renders an iterable with server stream render
938 +* renders an iterable with clean client render
939 +* renders an iterable with client render on top of good server markup
940 +* renders an iterable with client render on top of bad server markup
941 +* renders emptyish values with server string render
942 +* renders emptyish values with server stream render
943 +* renders emptyish values with clean client render
944 +* renders emptyish values with client render on top of good server markup
945 +* renders emptyish values with client render on top of bad server markup
946 * renders simple numbers with server string render
947 * renders simple numbers with server stream render
948 * renders simple numbers with clean client render
@@ -1391,6 +1433,11 @@ src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js
1433 * renders a div with a single child surrounded by whitespace with clean client render
1434 * renders a div with a single child surrounded by whitespace with client render on top of good server markup
1435 * renders a div with a single child surrounded by whitespace with client render on top of bad server markup
1436 +* renders a composite with multiple children with server string render
1437 +* renders a composite with multiple children with server stream render
1438 +* renders a composite with multiple children with clean client render
1439 +* renders a composite with multiple children with client render on top of good server markup
1440 +* renders a composite with multiple children with client render on top of bad server markup
1441 * renders >,<, and & as single child with server string render
1442 * renders >,<, and & as single child with server stream render
1443 * renders >,<, and & as single child with clean client render
@@ -1401,30 +1448,21 @@ src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js
1448 * renders >,<, and & as multiple children with clean client render
1449 * renders >,<, and & as multiple children with client render on top of good server markup
1450 * renders >,<, and & as multiple children with client render on top of bad server markup
1404 -* throws when rendering a string component with server string render
1405 -* throws when rendering a string component with clean client render
1406 -* throws when rendering a string component with client render on top of bad server markup
1407 -* throws when rendering an undefined component with server string render
1408 -* throws when rendering an undefined component with clean client render
1409 -* throws when rendering an undefined component with client render on top of bad server markup
1410 -* throws when rendering a number component with server string render
1411 -* throws when rendering a number component with clean client render
1412 -* throws when rendering a number component with client render on top of bad server markup
1413 -* throws when rendering null with server string render
1414 -* throws when rendering null with clean client render
1415 -* throws when rendering null with client render on top of bad server markup
1416 -* throws when rendering false with server string render
1417 -* throws when rendering false with clean client render
1418 -* throws when rendering false with client render on top of bad server markup
1419 -* throws when rendering undefined with server string render
1420 -* throws when rendering undefined with clean client render
1421 -* throws when rendering undefined with client render on top of bad server markup
1422 -* throws when rendering number with server string render
1423 -* throws when rendering number with clean client render
1424 -* throws when rendering number with client render on top of bad server markup
1425 -* throws when rendering string with server string render
1426 -* throws when rendering string with clean client render
1427 -* throws when rendering string with client render on top of bad server markup
1451 +* throws when rendering a function returning undefined with server string render
1452 +* throws when rendering a function returning undefined with clean client render
1453 +* throws when rendering a function returning undefined with client render on top of bad server markup
1454 +* throws when rendering a class returning undefined with server string render
1455 +* throws when rendering a class returning undefined with clean client render
1456 +* throws when rendering a class returning undefined with client render on top of bad server markup
1457 +* throws when rendering a function returning an object with server string render
1458 +* throws when rendering a function returning an object with clean client render
1459 +* throws when rendering a function returning an object with client render on top of bad server markup
1460 +* throws when rendering a class returning an object with server string render
1461 +* throws when rendering a class returning an object with clean client render
1462 +* throws when rendering a class returning an object with client render on top of bad server markup
1463 +* throws when rendering top-level object with server string render
1464 +* throws when rendering top-level object with clean client render
1465 +* throws when rendering top-level object with client render on top of bad server markup
1466 * renders an input with a value and an onChange with server string render
1467 * renders an input with a value and an onChange with server stream render
1468 * renders an input with a value and an onChange with clean client render
@@ -1694,7 +1732,8 @@ src/renderers/dom/shared/__tests__/ReactMount-test.js
1732 * should render different components in same root
1733 * should unmount and remount if the key changes
1734 * should reuse markup if rendering to the same target twice
1697 -* should warn if mounting into dirty rendered markup
1735 +* should warn if mounting into left padded rendered markup
1736 +* should warn if mounting into right padded rendered markup
1737 * should not warn if mounting into non-empty node
1738 * should warn when mounting into document.body
1739 * should account for escaping on a checksum mismatch
@@ -1718,6 +1757,14 @@ src/renderers/dom/shared/__tests__/ReactRenderDocument-test.js
1757 * should give helpful errors on state desync
1758 * should throw on full document render w/ no markup
1759 * supports findDOMNode on full-page components
1760 +* should be able to adopt server markup
1761 +* should not be able to unmount component from document node
1762 +* should not be able to switch root constructors
1763 +* should be able to mount into document
1764 +* renders over an existing text child without throwing
1765 +* should give helpful errors on state desync
1766 +* should render w/ no markup to full document
1767 +* supports findDOMNode on full-page components
1768
1769 src/renderers/dom/shared/__tests__/ReactServerRendering-test.js
1770 * should generate simple markup
@@ -1726,7 +1773,8 @@ src/renderers/dom/shared/__tests__/ReactServerRendering-test.js
1773 * should generate comment markup for component returns null
1774 * should render composite components
1775 * should only execute certain lifecycle methods
1729 -* should have the correct mounting behavior
1776 +* should have the correct mounting behavior (old hydrate API)
1777 +* should have the correct mounting behavior (new hydrate API)
1778 * should throw with silly args
1779 * should not put checksum and React ID on components
1780 * should not put checksum and React ID on text components
@@ -1742,6 +1790,11 @@ src/renderers/dom/shared/__tests__/ReactServerRendering-test.js
1790 * warns with a no-op when an async forceUpdate is triggered
1791 * should warn when children are mutated during render
1792
1793 +src/renderers/dom/shared/__tests__/ReactServerRenderingBrowser-test.js
1794 +* provides the same top-level API as react-dom/server
1795 +* returns the same results as react-dom/server
1796 +* throws meaningfully for server-only APIs
1797 +
1798 src/renderers/dom/shared/__tests__/escapeTextContentForBrowser-test.js
1799 * should escape boolean to string
1800 * should escape object to string
@@ -2060,29 +2113,6 @@ src/renderers/dom/shared/wrappers/__tests__/ReactDOMTextarea-test.js
2113 * should warn if value and defaultValue are specified
2114
2115 src/renderers/dom/test/__tests__/ReactTestUtils-test.js
2063 -* should call all of the lifecycle hooks
2064 -* should only render 1 level deep
2065 -* should have shallow rendering
2066 -* should enable shouldComponentUpdate to prevent a re-render
2067 -* should shallow render a functional component
2068 -* should throw for invalid elements
2069 -* should have shallow unmounting
2070 -* can shallow render to null
2071 -* can shallow render with a ref
2072 -* lets you update shallowly rendered components
2073 -* can access the mounted component instance
2074 -* can shallowly render components with contextTypes
2075 -* can shallowly render components with ref as function
2076 -* can setState in componentWillMount when shallow rendering
2077 -* can setState in componentWillReceiveProps when shallow rendering
2078 -* can setState with an updater function
2079 -* can setState with a callback
2080 -* can replaceState with a callback
2081 -* can forceUpdate with a callback
2082 -* can pass context when shallowly rendering
2083 -* should track context across updates
2084 -* can fail context when shallowly rendering
2085 -* should warn about propTypes (but only once)
2116 * can scryRenderedDOMComponentsWithClass with TextComponent
2117 * can scryRenderedDOMComponentsWithClass with className contains \n
2118 * can scryRenderedDOMComponentsWithClass with multiple classes
@@ -2093,7 +2123,6 @@ src/renderers/dom/test/__tests__/ReactTestUtils-test.js
2123 * should throw when attempting to use ReactTestUtils.Simulate with shallow rendering
2124 * should not warn when simulating events with extra properties
2125 * can scry with stateless components involved
2096 -* should enable rendering of cloned element
2126 * should set the type of the event
2127 * should work with renderIntoDocument
2128 * should call setState callback with no arguments
@@ -2133,7 +2162,7 @@ src/renderers/native/__tests__/createReactNativeComponentClass-test.js
2162 * should not allow viewConfigs with duplicate uiViewClassNames to be registered
2163
2164 src/renderers/shared/__tests__/ReactDOMFrameScheduling-test.js
2136 -* throws when requestAnimationFrame is not polyfilled in the browser
2165 +* warns when requestAnimationFrame is not polyfilled in the browser
2166 * can import findDOMNode in Node environment
2167
2168 src/renderers/shared/__tests__/ReactDebugTool-test.js
@@ -2175,6 +2204,10 @@ src/renderers/shared/fiber/__tests__/ReactIncremental-test.js
2204 * maintains the correct context when providers bail out due to low priority
2205 * maintains the correct context when unwinding due to an error in render
2206 * should not recreate masked context unless inputs have changed
2207 +* updates descendants with new context values
2208 +* updates descendants with multiple context-providing ancestors with new context values
2209 +* should not update descendants with new context values if shouldComponentUpdate returns false
2210 +* should update descendants with new context values if setState() is called in the middle of the tree
2211
2212 src/renderers/shared/fiber/__tests__/ReactIncrementalErrorHandling-test.js
2213 * catches render error in a boundary during full deferred mounting
@@ -2191,6 +2224,8 @@ src/renderers/shared/fiber/__tests__/ReactIncrementalErrorHandling-test.js
2224 * can schedule updates after uncaught error in render on mount
2225 * can schedule updates after uncaught error in render on update
2226 * can schedule updates after uncaught error during umounting
2227 +* should not attempt to recover an unmounting error boundary
2228 +* can unmount an error boundary before it is handled
2229 * continues work on other roots despite caught errors
2230 * continues work on other roots despite uncaught errors
2231 * unwinds the context stack correctly on error
@@ -2321,6 +2356,18 @@ src/renderers/shared/shared/event/eventPlugins/__tests__/ResponderEventPlugin-te
2356 * should negotiate scroll
2357 * should cancel correctly
2358
2359 +src/renderers/shared/stack/__tests__/PooledClass-test.js
2360 +* should initialize a pool correctly
2361 +* should return a new instance when the pool is empty
2362 +* should return the instance back into the pool when it gets released
2363 +* should return an old instance if available in the pool
2364 +* should call the destructor when instance gets released
2365 +* should accept poolers with different arguments
2366 +* should call a new constructor with arguments
2367 +* should call an old constructor with arguments
2368 +* should throw when the class releases an instance of a different type
2369 +* should throw if no destructor is defined
2370 +
2371 src/renderers/shared/stack/reconciler/__tests__/Transaction-test.js
2372 * should invoke closers with/only-with init returns
2373 * should invoke closers and wrapped method when inits success
@@ -2362,6 +2409,36 @@ src/renderers/shared/utils/__tests__/adler32-test.js
2409 * doesn't barf on large inputs
2410 * doesn't barf on international inputs
2411
2412 +src/renderers/testing/__tests__/ReactShallowRenderer-test.js
2413 +* should call all of the lifecycle hooks
2414 +* should only render 1 level deep
2415 +* should have shallow rendering
2416 +* should enable shouldComponentUpdate to prevent a re-render
2417 +* should shallow render a functional component
2418 +* should shallow render a component returning strings directly from render
2419 +* should shallow render a component returning numbers directly from render
2420 +* should shallow render a fragment
2421 +* should throw for invalid elements
2422 +* should have shallow unmounting
2423 +* can shallow render to null
2424 +* can shallow render with a ref
2425 +* lets you update shallowly rendered components
2426 +* can access the mounted component instance
2427 +* can shallowly render components with contextTypes
2428 +* passes expected params to component lifecycle methods
2429 +* can shallowly render components with ref as function
2430 +* can setState in componentWillMount when shallow rendering
2431 +* can setState in componentWillReceiveProps when shallow rendering
2432 +* can setState with an updater function
2433 +* can setState with a callback
2434 +* can replaceState with a callback
2435 +* can forceUpdate with a callback
2436 +* can pass context when shallowly rendering
2437 +* should track context across updates
2438 +* can fail context when shallowly rendering
2439 +* should warn about propTypes (but only once)
2440 +* should enable rendering of cloned element
2441 +
2442 src/renderers/testing/__tests__/ReactTestRenderer-test.js
2443 * renders a simple component
2444 * renders a top-level empty component
@@ -2387,17 +2464,11 @@ src/renderers/testing/__tests__/ReactTestRenderer-test.js
2464 * can update text nodes when rendered as root
2465 * can render and update root fragments
2466
2390 -src/shared/utils/__tests__/PooledClass-test.js
2391 -* should initialize a pool correctly
2392 -* should return a new instance when the pool is empty
2393 -* should return the instance back into the pool when it gets released
2394 -* should return an old instance if available in the pool
2395 -* should call the destructor when instance gets released
2396 -* should accept poolers with different arguments
2397 -* should call a new constructor with arguments
2398 -* should call an old constructor with arguments
2399 -* should throw when the class releases an instance of a different type
2400 -* should throw if no destructor is defined
2467 +src/renderers/testing/__tests__/ReactTestRendererTraversal-test.js
2468 +* initializes
2469 +* searches via .find() / .findAll()
2470 +* searches via .findByType() / .findAllByType()
2471 +* searches via .findByProps() / .findAllByProps()
2472
2473 src/shared/utils/__tests__/reactProdInvariant-test.js
2474 * should throw with the correct number of `%s`s in the URL
scripts/rollup/results.json
+82 -82
@@ -1,164 +1,164 @@
1 {
2 "bundleSizes": {
3 "react.development.js (UMD_DEV)": {
4 - "size": 65928,
5 - "gzip": 16792
4 + "size": 65905,
5 + "gzip": 16729
6 },
7 "react.production.min.js (UMD_PROD)": {
8 - "size": 6361,
9 - "gzip": 2599
8 + "size": 6359,
9 + "gzip": 2597
10 },
11 "react.development.js (NODE_DEV)": {
12 - "size": 56228,
13 - "gzip": 14438
12 + "size": 56312,
13 + "gzip": 14447
14 },
15 "react.production.min.js (NODE_PROD)": {
16 - "size": 5384,
17 - "gzip": 2231
16 + "size": 5382,
17 + "gzip": 2230
18 },
19 "React-dev.js (FB_DEV)": {
20 - "size": 53485,
21 - "gzip": 13653
20 + "size": 53513,
21 + "gzip": 13663
22 },
23 "React-prod.js (FB_PROD)": {
24 - "size": 25016,
25 - "gzip": 6705
24 + "size": 25014,
25 + "gzip": 6703
26 },
27 "react-dom.development.js (UMD_DEV)": {
28 - "size": 624336,
29 - "gzip": 142708
28 + "size": 635283,
29 + "gzip": 144613
30 },
31 "react-dom.production.min.js (UMD_PROD)": {
32 - "size": 114616,
33 - "gzip": 35769
32 + "size": 108379,
33 + "gzip": 33966
34 },
35 "react-dom.development.js (NODE_DEV)": {
36 - "size": 583734,
37 - "gzip": 133055
36 + "size": 594095,
37 + "gzip": 135122
38 },
39 "react-dom.production.min.js (NODE_PROD)": {
40 - "size": 118288,
41 - "gzip": 37153
40 + "size": 112397,
41 + "gzip": 35476
42 },
43 "ReactDOMFiber-dev.js (FB_DEV)": {
44 - "size": 583017,
45 - "gzip": 133083
44 + "size": 590915,
45 + "gzip": 134583
46 },
47 "ReactDOMFiber-prod.js (FB_PROD)": {
48 - "size": 426172,
49 - "gzip": 96450
48 + "size": 424931,
49 + "gzip": 95294
50 },
51 "react-dom-test-utils.development.js (NODE_DEV)": {
52 - "size": 53332,
53 - "gzip": 13396
52 + "size": 53359,
53 + "gzip": 13402
54 },
55 "ReactTestUtils-dev.js (FB_DEV)": {
56 - "size": 53124,
57 - "gzip": 13357
56 + "size": 53151,
57 + "gzip": 13364
58 },
59 "react-dom-unstable-native-dependencies.development.js (UMD_DEV)": {
60 - "size": 84047,
61 - "gzip": 21057
60 + "size": 88196,
61 + "gzip": 22328
62 },
63 "react-dom-unstable-native-dependencies.production.min.js (UMD_PROD)": {
64 - "size": 15672,
65 - "gzip": 5027
64 + "size": 15149,
65 + "gzip": 4910
66 },
67 "react-dom-unstable-native-dependencies.development.js (NODE_DEV)": {
68 - "size": 77475,
69 - "gzip": 19101
68 + "size": 81733,
69 + "gzip": 20383
70 },
71 "react-dom-unstable-native-dependencies.production.min.js (NODE_PROD)": {
72 - "size": 14133,
73 - "gzip": 4451
72 + "size": 13926,
73 + "gzip": 4403
74 },
75 "ReactDOMUnstableNativeDependencies-dev.js (FB_DEV)": {
76 - "size": 77189,
77 - "gzip": 19061
76 + "size": 81432,
77 + "gzip": 20341
78 },
79 "ReactDOMUnstableNativeDependencies-prod.js (FB_PROD)": {
80 - "size": 65908,
81 - "gzip": 15704
80 + "size": 66066,
81 + "gzip": 15736
82 },
83 "react-dom-server.browser.development.js (UMD_DEV)": {
84 - "size": 122873,
85 - "gzip": 31036
84 + "size": 124076,
85 + "gzip": 31288
86 },
87 "react-dom-server.browser.production.min.js (UMD_PROD)": {
88 - "size": 21199,
89 - "gzip": 8114
88 + "size": 19874,
89 + "gzip": 7592
90 },
91 "react-dom-server.browser.development.js (NODE_DEV)": {
92 - "size": 92049,
93 - "gzip": 23628
92 + "size": 92358,
93 + "gzip": 23695
94 },
95 "react-dom-server.browser.production.min.js (NODE_PROD)": {
96 - "size": 19962,
97 - "gzip": 7604
96 + "size": 18930,
97 + "gzip": 7264
98 },
99 "ReactDOMServer-dev.js (FB_DEV)": {
100 - "size": 89559,
101 - "gzip": 23201
100 + "size": 91551,
101 + "gzip": 23617
102 },
103 "ReactDOMServer-prod.js (FB_PROD)": {
104 - "size": 49640,
105 - "gzip": 13644
104 + "size": 49652,
105 + "gzip": 13866
106 },
107 "react-dom-server.node.development.js (NODE_DEV)": {
108 - "size": 94782,
109 - "gzip": 24195
108 + "size": 95135,
109 + "gzip": 24258
110 },
111 "react-dom-server.node.production.min.js (NODE_PROD)": {
112 - "size": 21053,
113 - "gzip": 7964
112 + "size": 19986,
113 + "gzip": 7613
114 },
115 "react-art.development.js (UMD_DEV)": {
116 - "size": 363064,
117 - "gzip": 80610
116 + "size": 307891,
117 + "gzip": 66652
118 },
119 "react-art.production.min.js (UMD_PROD)": {
120 - "size": 88702,
121 - "gzip": 27224
120 + "size": 47498,
121 + "gzip": 14839
122 },
123 "react-art.development.js (NODE_DEV)": {
124 - "size": 284435,
125 - "gzip": 60532
124 + "size": 295222,
125 + "gzip": 62807
126 },
127 "react-art.production.min.js (NODE_PROD)": {
128 - "size": 57226,
129 - "gzip": 17683
128 + "size": 52520,
129 + "gzip": 16419
130 },
131 "ReactARTFiber-dev.js (FB_DEV)": {
132 - "size": 283868,
133 - "gzip": 60453
132 + "size": 294163,
133 + "gzip": 62866
134 },
135 "ReactARTFiber-prod.js (FB_PROD)": {
136 - "size": 217459,
137 - "gzip": 45301
136 + "size": 220269,
137 + "gzip": 45845
138 },
139 "ReactNativeStack-dev.js (RN_DEV)": {
140 - "size": 201024,
141 - "gzip": 37385
140 + "size": 201067,
141 + "gzip": 37391
142 },
143 "ReactNativeStack-prod.js (RN_PROD)": {
144 - "size": 137686,
145 - "gzip": 26481
144 + "size": 136715,
145 + "gzip": 26222
146 },
147 "ReactNativeFiber-dev.js (RN_DEV)": {
148 - "size": 284667,
149 - "gzip": 51712
148 + "size": 305992,
149 + "gzip": 52996
150 },
151 "ReactNativeFiber-prod.js (RN_PROD)": {
152 - "size": 220270,
153 - "gzip": 38503
152 + "size": 221418,
153 + "gzip": 38321
154 },
155 "react-test-renderer.development.js (NODE_DEV)": {
156 - "size": 281620,
157 - "gzip": 59461
156 + "size": 299690,
157 + "gzip": 63255
158 },
159 "ReactTestRendererFiber-dev.js (FB_DEV)": {
160 - "size": 281044,
161 - "gzip": 59382
160 + "size": 298616,
161 + "gzip": 63330
162 },
163 "react-test-renderer-shallow.development.js (NODE_DEV)": {
164 "size": 9556,
@@ -169,8 +169,8 @@
169 "gzip": 2338
170 },
171 "react-noop-renderer.development.js (NODE_DEV)": {
172 - "size": 275726,
173 - "gzip": 57882
172 + "size": 286933,
173 + "gzip": 60117
174 },
175 "react-dom-server.development.js (UMD_DEV)": {
176 "size": 120897,
src/renderers/dom/ReactDOMNodeStreamRenderer.js
+9 -9
@@ -38,36 +38,36 @@ class ReactMarkupReadableStream extends Readable {
38 /**
39 * Render a ReactElement to its initial HTML. This should only be used on the
40 * server.
41 - * See https://facebook.github.io/react/docs/react-dom-stream.html#rendertostream
41 + * See https://facebook.github.io/react/docs/react-dom-stream.html#rendertonodestream
42 */
43 -function renderToStream(element) {
43 +function renderToNodeStream(element) {
44 const disableNewFiberFeatures = ReactFeatureFlags.disableNewFiberFeatures;
45 if (disableNewFiberFeatures) {
46 invariant(
47 React.isValidElement(element),
48 - 'renderToStream(): Invalid component element.',
48 + 'renderToNodeStream(): Invalid component element.',
49 );
50 }
51 return new ReactMarkupReadableStream(element, false);
52 }
53
54 /**
55 - * Similar to renderToStream, except this doesn't create extra DOM attributes
55 + * Similar to renderToNodeStream, except this doesn't create extra DOM attributes
56 * such as data-react-id that React uses internally.
57 - * See https://facebook.github.io/react/docs/react-dom-stream.html#rendertostaticstream
57 + * See https://facebook.github.io/react/docs/react-dom-stream.html#rendertostaticnodestream
58 */
59 -function renderToStaticStream(element) {
59 +function renderToStaticNodeStream(element) {
60 const disableNewFiberFeatures = ReactFeatureFlags.disableNewFiberFeatures;
61 if (disableNewFiberFeatures) {
62 invariant(
63 React.isValidElement(element),
64 - 'renderToStaticStream(): Invalid component element.',
64 + 'renderToStaticNodeStream(): Invalid component element.',
65 );
66 }
67 return new ReactMarkupReadableStream(element, true);
68 }
69
70 module.exports = {
71 - renderToStream: renderToStream,
72 - renderToStaticStream: renderToStaticStream,
71 + renderToNodeStream: renderToNodeStream,
72 + renderToStaticNodeStream: renderToStaticNodeStream,
73 };
src/renderers/dom/ReactDOMServerBrowserEntry.js
+4 -4
@@ -20,17 +20,17 @@ require('ReactDOMInjection');
20 module.exports = {
21 renderToString: ReactDOMStringRenderer.renderToString,
22 renderToStaticMarkup: ReactDOMStringRenderer.renderToStaticMarkup,
23 - renderToStream() {
23 + renderToNodeStream() {
24 invariant(
25 false,
26 - 'ReactDOMServer.renderToStream(): The streaming API is not available ' +
26 + 'ReactDOMServer.renderToNodeStream(): The streaming API is not available ' +
27 'in the browser. Use ReactDOMServer.renderToString() instead.',
28 );
29 },
30 - renderToStaticStream() {
30 + renderToStaticNodeStream() {
31 invariant(
32 false,
33 - 'ReactDOMServer.renderToStaticStream(): The streaming API is not available ' +
33 + 'ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available ' +
34 'in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.',
35 );
36 },
src/renderers/dom/ReactDOMServerNodeEntry.js
+2 -2
@@ -20,7 +20,7 @@ require('ReactDOMInjection');
20 module.exports = {
21 renderToString: ReactDOMStringRenderer.renderToString,
22 renderToStaticMarkup: ReactDOMStringRenderer.renderToStaticMarkup,
23 - renderToStream: ReactDOMNodeStreamRenderer.renderToStream,
24 - renderToStaticStream: ReactDOMNodeStreamRenderer.renderToStaticStream,
23 + renderToNodeStream: ReactDOMNodeStreamRenderer.renderToNodeStream,
24 + renderToStaticNodeStream: ReactDOMNodeStreamRenderer.renderToStaticNodeStream,
25 version: ReactVersion,
26 };
src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js
+1 -1
@@ -119,7 +119,7 @@ async function renderIntoStream(reactElement, errorCount = 0) {
119 () =>
120 new Promise(resolve => {
121 let writable = new DrainWritable();
122 - ReactDOMServer.renderToStream(reactElement).pipe(writable);
122 + ReactDOMServer.renderToNodeStream(reactElement).pipe(writable);
123 writable.on('finish', () => resolve(writable.buffer));
124 }),
125 errorCount,
src/renderers/dom/shared/__tests__/ReactServerRenderingBrowser-test.js
+6 -4
@@ -57,12 +57,14 @@ describe('ReactServerRenderingBrowser', () => {
57
58 if (ReactDOMFeatureFlags.useFiber) {
59 it('throws meaningfully for server-only APIs', () => {
60 - expect(() => ReactDOMServerBrowser.renderToStream(<div />)).toThrow(
61 - 'ReactDOMServer.renderToStream(): The streaming API is not available ' +
60 + expect(() => ReactDOMServerBrowser.renderToNodeStream(<div />)).toThrow(
61 + 'ReactDOMServer.renderToNodeStream(): The streaming API is not available ' +
62 'in the browser. Use ReactDOMServer.renderToString() instead.',
63 );
64 - expect(() => ReactDOMServerBrowser.renderToStaticStream(<div />)).toThrow(
65 - 'ReactDOMServer.renderToStaticStream(): The streaming API is not available ' +
64 + expect(() =>
65 + ReactDOMServerBrowser.renderToStaticNodeStream(<div />),
66 + ).toThrow(
67 + 'ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available ' +
68 'in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.',
69 );
70 });