Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cache in the fixture #20303

Closed
wants to merge 5 commits into from
Closed

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Nov 20, 2020

Doesn't yet add necessary APIs. But it hooks the cache up to the fixture. Fetching works.

This adds readCache to the dispatcher. Currently it's copy pasta from readContext and actually requires passing in the context. This would be fixed later on. For now I just need an injection mechanism that's usable on the client but doesn't throw in the Flight Server environment. It would be replaced by dedicated Hooks that will also let us remove the cache entry point.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Nov 20, 2020
fixtures/flight/package.json Outdated Show resolved Hide resolved
@@ -10,10 +11,13 @@ function resolve(path) {
}

module.exports = async function(req, res) {
CacheContext._currentValue = createCache();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essentially a global now. But it should probably be created by the server itself (?)

@gaearon gaearon changed the title Rudimentary cache [WIP] Use cache in the fixture Nov 20, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 20, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 94543c8:

Sandbox Source
React Configuration

@sizebot
Copy link

sizebot commented Nov 20, 2020

Details of bundled changes.

Comparing: 89d4fe1...94543c8

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js +0.1% 0.0% 575.12 KB 575.65 KB 125.76 KB 125.81 KB NODE_DEV
ReactTestRenderer-dev.js +0.1% 0.0% 584.8 KB 585.31 KB 126.62 KB 126.67 KB RN_FB_DEV
ReactTestRenderer-prod.js 🔺+0.1% 🔺+0.1% 228.44 KB 228.6 KB 41.73 KB 41.75 KB RN_FB_PROD
ReactTestRenderer-profiling.js +0.1% +0.1% 239.84 KB 240 KB 43.89 KB 43.92 KB RN_FB_PROFILING
react-test-renderer.development.js +0.1% +0.1% 603.74 KB 604.33 KB 127.21 KB 127.27 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.1% 0.0% 76.17 KB 76.25 KB 23.98 KB 23.99 KB UMD_PROD
react-test-renderer.production.min.js 🔺+0.1% 🔺+0.1% 75.97 KB 76.06 KB 23.68 KB 23.71 KB NODE_PROD
ReactTestRenderer-dev.js +0.1% 0.0% 590.15 KB 590.68 KB 126.85 KB 126.9 KB FB_WWW_DEV

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-test-utils.development.js 0.0% 0.0% 71.29 KB 71.29 KB 19.31 KB 19.31 KB UMD_DEV
ReactDOMServer-dev.js +0.1% +0.1% 141.4 KB 141.51 KB 36.3 KB 36.33 KB FB_WWW_DEV
react-dom.development.js +0.1% 0.0% 903.13 KB 903.66 KB 205.53 KB 205.57 KB NODE_DEV
ReactDOMForked-dev.js +0.1% 0.0% 953.61 KB 954.13 KB 213.14 KB 213.19 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.1% 1.22 KB 1.22 KB 712 B 713 B UMD_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.3% 1.17 KB 1.17 KB 666 B 668 B NODE_PROD
react-dom.production.min.js 🔺+0.1% 🔺+0.1% 121.49 KB 121.57 KB 39.11 KB 39.13 KB NODE_PROD
ReactDOMForked-prod.js 0.0% 0.0% 366.53 KB 366.7 KB 68.04 KB 68.06 KB FB_WWW_PROD
react-dom.profiling.min.js +0.1% +0.1% 127 KB 127.08 KB 40.79 KB 40.81 KB NODE_PROFILING
ReactDOMForked-profiling.js 0.0% 0.0% 382.96 KB 383.13 KB 71.05 KB 71.07 KB FB_WWW_PROFILING
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 4.6 KB 4.6 KB 1.64 KB 1.65 KB NODE_DEV
ReactDOM-dev.js +0.1% 0.0% 954.17 KB 954.69 KB 213.44 KB 213.49 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.2% 1.01 KB 1.01 KB 617 B 618 B NODE_PROD
ReactDOM-prod.js 0.0% 0.0% 366.76 KB 366.93 KB 68.17 KB 68.19 KB FB_WWW_PROD
ReactDOM-profiling.js 0.0% 0.0% 383.19 KB 383.36 KB 71.17 KB 71.19 KB FB_WWW_PROFILING
react-dom-server.browser.development.js +0.1% +0.1% 144.37 KB 144.49 KB 36.71 KB 36.74 KB UMD_DEV
react-dom-server.node.development.js +0.1% +0.1% 138.23 KB 138.34 KB 36.52 KB 36.55 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.2% 🔺+0.1% 20.28 KB 20.32 KB 7.53 KB 7.53 KB UMD_PROD
react-dom-server.node.production.min.js 🔺+0.2% 🔺+0.3% 20.6 KB 20.64 KB 7.63 KB 7.65 KB NODE_PROD
react-dom-server.browser.development.js +0.1% +0.1% 136.96 KB 137.07 KB 36.27 KB 36.3 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.2% 🔺+0.2% 20.18 KB 20.22 KB 7.48 KB 7.49 KB NODE_PROD
react-dom-test-utils.production.min.js 0.0% 0.0% 13.71 KB 13.71 KB 5.32 KB 5.32 KB UMD_PROD
ReactDOMServer-prod.js 🔺+0.2% 🔺+0.1% 46.28 KB 46.36 KB 10.79 KB 10.8 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% 0.0% 66.11 KB 66.11 KB 18.79 KB 18.8 KB NODE_DEV
ReactDOMTesting-dev.js +0.1% 0.0% 906.79 KB 907.31 KB 204.26 KB 204.3 KB FB_WWW_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 13.7 KB 13.7 KB 5.27 KB 5.27 KB NODE_PROD
ReactDOMTesting-prod.js 0.0% 0.0% 368.23 KB 368.4 KB 69.77 KB 69.79 KB FB_WWW_PROD
react-dom.development.js +0.1% 0.0% 949.05 KB 949.64 KB 208.09 KB 208.17 KB UMD_DEV
react-dom.production.min.js 🔺+0.1% 0.0% 121.32 KB 121.4 KB 39.87 KB 39.87 KB UMD_PROD
react-dom.profiling.min.js +0.1% 0.0% 126.64 KB 126.72 KB 41.53 KB 41.54 KB UMD_PROFILING
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 5.07 KB 5.07 KB 1.74 KB 1.74 KB UMD_DEV
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 5.35 KB 5.35 KB 1.8 KB 1.81 KB NODE_DEV

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-dev.js +0.1% 0.0% 656.31 KB 656.82 KB 141.88 KB 141.93 KB RN_OSS_DEV
ReactFabric-prod.js 🔺+0.1% 0.0% 261.21 KB 261.37 KB 46.46 KB 46.48 KB RN_OSS_PROD
ReactFabric-profiling.js +0.1% 0.0% 272.59 KB 272.75 KB 48.67 KB 48.68 KB RN_OSS_PROFILING
ReactNativeRenderer-dev.js +0.1% 0.0% 675.56 KB 676.07 KB 146.54 KB 146.58 KB RN_OSS_DEV
ReactNativeRenderer-prod.js 🔺+0.1% 0.0% 267.39 KB 267.55 KB 47.73 KB 47.74 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js +0.1% 0.0% 278.91 KB 279.07 KB 49.93 KB 49.95 KB RN_OSS_PROFILING

react-transport-dom-relay

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFlightDOMRelayServer-dev.js +1.5% +1.5% 24.96 KB 25.35 KB 6.59 KB 6.68 KB FB_WWW_DEV
ReactFlightDOMRelayServer-prod.js 🔺+2.4% 🔺+2.1% 13.4 KB 13.72 KB 3.59 KB 3.66 KB FB_WWW_PROD

react-transport-native-relay

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFlightNativeRelayServer-dev.js +1.5% +1.4% 24.82 KB 25.19 KB 6.69 KB 6.79 KB RN_FB_DEV
ReactFlightNativeRelayServer-prod.js 🔺+2.6% 🔺+2.6% 13.79 KB 14.14 KB 3.68 KB 3.78 KB RN_FB_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-prod.js 🔺+0.1% 0.0% 229.94 KB 230.11 KB 40.85 KB 40.85 KB FB_WWW_PROD
react-art.development.js +0.1% 0.0% 686.44 KB 687.03 KB 145.82 KB 145.88 KB UMD_DEV
react-art.production.min.js 🔺+0.1% 0.0% 110.59 KB 110.67 KB 34.42 KB 34.43 KB UMD_PROD
react-art.development.js +0.1% 0.0% 587.8 KB 588.33 KB 128 KB 128.04 KB NODE_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.1% 75.47 KB 75.56 KB 23.48 KB 23.5 KB NODE_PROD
ReactART-dev.js +0.1% 0.0% 621.43 KB 621.96 KB 132.34 KB 132.39 KB FB_WWW_DEV

react-server

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-server.development.js 0.0% +0.1% 5.27 KB 5.27 KB 1.69 KB 1.69 KB NODE_DEV
react-server.production.min.js 0.0% 🔺+0.2% 1.16 KB 1.16 KB 650 B 651 B NODE_PROD
react-server-flight.development.js +1.6% +1.4% 24.52 KB 24.91 KB 6.71 KB 6.81 KB NODE_DEV
react-server-flight.production.min.js 🔺+1.7% 🔺+2.1% 6.34 KB 6.45 KB 2.62 KB 2.67 KB NODE_PROD

react-transport-dom-webpack

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-transport-dom-webpack.development.js 0.0% 0.0% 16.35 KB 16.35 KB 4.72 KB 4.72 KB NODE_DEV
react-transport-dom-webpack.production.min.js 0.0% 🔺+0.2% 3.7 KB 3.7 KB 1.65 KB 1.66 KB NODE_PROD
react-transport-dom-webpack-node-loader.js 0.0% +0.2% 822 B 822 B 464 B 465 B NODE_ESM
react-transport-dom-webpack-plugin.js 0.0% +0.3% 437 B 437 B 298 B 299 B NODE_ES2015
react-transport-dom-webpack.development.js 0.0% 0.0% 17.54 KB 17.54 KB 4.83 KB 4.83 KB UMD_DEV
react-transport-dom-webpack.production.min.js 0.0% 🔺+0.1% 3.9 KB 3.9 KB 1.75 KB 1.75 KB UMD_PROD
react-transport-dom-webpack-server.browser.development.js +1.6% +1.6% 25.64 KB 26.06 KB 6.72 KB 6.83 KB UMD_DEV
react-transport-dom-webpack-server.node.development.js +1.6% +1.5% 25.01 KB 25.4 KB 6.84 KB 6.95 KB NODE_DEV
react-transport-dom-webpack-server.browser.production.min.js 🔺+1.7% 🔺+2.1% 6.28 KB 6.39 KB 2.62 KB 2.67 KB UMD_PROD
react-transport-dom-webpack-server.node.production.min.js 🔺+1.7% 🔺+2.0% 6.27 KB 6.37 KB 2.55 KB 2.61 KB NODE_PROD
react-transport-dom-webpack-server.browser.development.js +1.6% +1.6% 24.07 KB 24.46 KB 6.59 KB 6.69 KB NODE_DEV
react-transport-dom-webpack-node-register.js 0.0% +0.8% 578 B 578 B 375 B 378 B NODE_ES2015
react-transport-dom-webpack-server.browser.production.min.js 🔺+1.7% 🔺+2.0% 6.07 KB 6.18 KB 2.53 KB 2.58 KB NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-reflection.development.js 0.0% 0.0% 15.89 KB 15.89 KB 4.85 KB 4.85 KB NODE_DEV
react-reconciler.development.js +0.1% 0.0% 645.16 KB 645.69 KB 137.96 KB 138.01 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.1% 🔺+0.1% 85.32 KB 85.4 KB 26.39 KB 26.42 KB NODE_PROD
react-reconciler.profiling.min.js +0.1% +0.1% 90.8 KB 90.89 KB 28.08 KB 28.1 KB NODE_PROFILING

react-debug-tools

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-debug-tools.development.js +0.5% +0.7% 20.29 KB 20.4 KB 5.62 KB 5.65 KB NODE_DEV
react-debug-tools.production.min.js 🔺+6.5% 🔺+9.2% 5.47 KB 5.82 KB 2.12 KB 2.32 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: 🔺+0.1%

Size changes (experimental)

Generated by 🚫 dangerJS against 94543c8

@sizebot
Copy link

sizebot commented Nov 20, 2020

Details of bundled changes.

Comparing: 89d4fe1...94543c8

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js +0.1% 0.0% 575.09 KB 575.62 KB 125.74 KB 125.79 KB NODE_DEV
ReactTestRenderer-dev.js +0.1% 0.0% 584.79 KB 585.3 KB 126.61 KB 126.66 KB RN_FB_DEV
ReactTestRenderer-prod.js 🔺+0.1% 🔺+0.1% 228.42 KB 228.58 KB 41.72 KB 41.75 KB RN_FB_PROD
ReactTestRenderer-profiling.js +0.1% +0.1% 239.83 KB 239.99 KB 43.88 KB 43.91 KB RN_FB_PROFILING
react-test-renderer.development.js +0.1% +0.1% 603.72 KB 604.31 KB 127.19 KB 127.26 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.1% 0.0% 76.14 KB 76.23 KB 23.96 KB 23.97 KB UMD_PROD
react-test-renderer.production.min.js 🔺+0.1% 🔺+0.1% 75.95 KB 76.03 KB 23.66 KB 23.69 KB NODE_PROD
ReactTestRenderer-dev.js +0.1% 0.0% 590.14 KB 590.67 KB 126.84 KB 126.89 KB FB_WWW_DEV

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-test-utils.development.js 0.0% 0.0% 71.28 KB 71.28 KB 19.3 KB 19.3 KB UMD_DEV
ReactDOMServer-dev.js +0.1% +0.1% 145.43 KB 145.54 KB 37.31 KB 37.34 KB FB_WWW_DEV
react-dom.development.js +0.1% 0.0% 870.71 KB 871.24 KB 199.31 KB 199.36 KB NODE_DEV
ReactDOMForked-dev.js +0.1% 0.0% 979.19 KB 979.71 KB 217.95 KB 217.99 KB FB_WWW_DEV
react-dom.production.min.js 🔺+0.1% 🔺+0.1% 117.57 KB 117.65 KB 37.91 KB 37.93 KB NODE_PROD
ReactDOMForked-prod.js 0.0% 0.0% 377.87 KB 378.04 KB 69.92 KB 69.94 KB FB_WWW_PROD
react-dom.profiling.min.js +0.1% +0.1% 121.65 KB 121.73 KB 39.07 KB 39.09 KB NODE_PROFILING
ReactDOMForked-profiling.js 0.0% 0.0% 394.35 KB 394.52 KB 72.9 KB 72.92 KB FB_WWW_PROFILING
ReactDOM-dev.js +0.1% 0.0% 979.75 KB 980.28 KB 218.15 KB 218.2 KB FB_WWW_DEV
ReactDOM-prod.js 0.0% 0.0% 378.1 KB 378.26 KB 69.94 KB 69.96 KB FB_WWW_PROD
ReactDOM-profiling.js 0.0% 0.0% 394.58 KB 394.75 KB 72.94 KB 72.96 KB FB_WWW_PROFILING
react-dom-server.browser.development.js +0.1% +0.1% 142.78 KB 142.91 KB 36.51 KB 36.54 KB UMD_DEV
react-dom-server.node.development.js +0.1% +0.1% 136.72 KB 136.83 KB 36.31 KB 36.34 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.2% 🔺+0.1% 19.82 KB 19.86 KB 7.44 KB 7.44 KB UMD_PROD
react-dom-server.node.production.min.js 🔺+0.2% 🔺+0.2% 20.14 KB 20.18 KB 7.56 KB 7.58 KB NODE_PROD
react-dom-server.browser.development.js +0.1% +0.1% 135.45 KB 135.56 KB 36.06 KB 36.09 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.2% 🔺+0.2% 19.72 KB 19.76 KB 7.4 KB 7.42 KB NODE_PROD
react-dom-test-utils.production.min.js 0.0% 0.0% 13.7 KB 13.7 KB 5.32 KB 5.32 KB UMD_PROD
ReactDOMServer-prod.js 🔺+0.2% 🔺+0.2% 47.15 KB 47.23 KB 11 KB 11.01 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% 0.0% 66.1 KB 66.1 KB 18.79 KB 18.79 KB NODE_DEV
ReactDOMTesting-dev.js +0.1% 0.0% 935.13 KB 935.65 KB 209.77 KB 209.81 KB FB_WWW_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 13.68 KB 13.68 KB 5.26 KB 5.26 KB NODE_PROD
ReactDOMTesting-prod.js 0.0% 0.0% 381.38 KB 381.55 KB 72 KB 72.02 KB FB_WWW_PROD
react-dom.development.js +0.1% 0.0% 915.02 KB 915.61 KB 201.84 KB 201.91 KB UMD_DEV
react-dom.production.min.js 🔺+0.1% -0.0% 117.47 KB 117.55 KB 38.66 KB 38.65 KB UMD_PROD
react-dom.profiling.min.js +0.1% +0.1% 121.37 KB 121.46 KB 39.82 KB 39.84 KB UMD_PROFILING

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-dev.js +0.1% 0.0% 656.3 KB 656.81 KB 141.88 KB 141.92 KB RN_OSS_DEV
ReactFabric-prod.js 🔺+0.1% 0.0% 261.2 KB 261.36 KB 46.46 KB 46.47 KB RN_OSS_PROD
ReactFabric-profiling.js +0.1% 0.0% 272.58 KB 272.74 KB 48.66 KB 48.68 KB RN_OSS_PROFILING
ReactNativeRenderer-dev.js +0.1% 0.0% 675.55 KB 676.06 KB 146.53 KB 146.57 KB RN_OSS_DEV
ReactFabric-dev.js +0.1% 0.0% 661.7 KB 662.21 KB 142.77 KB 142.81 KB RN_FB_DEV
ReactNativeRenderer-prod.js 🔺+0.1% 0.0% 267.38 KB 267.54 KB 47.72 KB 47.73 KB RN_OSS_PROD
ReactFabric-prod.js 🔺+0.1% 0.0% 261.16 KB 261.32 KB 46.44 KB 46.46 KB RN_FB_PROD
ReactNativeRenderer-profiling.js +0.1% 0.0% 278.9 KB 279.06 KB 49.92 KB 49.94 KB RN_OSS_PROFILING
ReactFabric-profiling.js +0.1% 0.0% 272.54 KB 272.7 KB 48.64 KB 48.66 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js +0.1% 0.0% 680.95 KB 681.46 KB 147.4 KB 147.45 KB RN_FB_DEV
ReactNativeRenderer-prod.js 🔺+0.1% 0.0% 267.33 KB 267.49 KB 47.7 KB 47.72 KB RN_FB_PROD
ReactNativeRenderer-profiling.js +0.1% 0.0% 278.85 KB 279.01 KB 49.9 KB 49.92 KB RN_FB_PROFILING

react-transport-dom-relay

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFlightDOMRelayServer-dev.js +1.5% +1.5% 24.96 KB 25.35 KB 6.59 KB 6.68 KB FB_WWW_DEV
ReactFlightDOMRelayServer-prod.js 🔺+2.4% 🔺+2.1% 13.4 KB 13.72 KB 3.59 KB 3.66 KB FB_WWW_PROD

react-transport-native-relay

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFlightNativeRelayServer-dev.js +1.5% +1.4% 24.82 KB 25.19 KB 6.69 KB 6.79 KB RN_FB_DEV
ReactFlightNativeRelayServer-prod.js 🔺+2.6% 🔺+2.6% 13.79 KB 14.14 KB 3.68 KB 3.78 KB RN_FB_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-prod.js 🔺+0.1% 0.0% 237.08 KB 237.25 KB 42.12 KB 42.13 KB FB_WWW_PROD
react-art.development.js +0.1% 0.0% 662.81 KB 663.4 KB 141.17 KB 141.23 KB UMD_DEV
react-art.production.min.js 🔺+0.1% 0.0% 108.32 KB 108.4 KB 33.72 KB 33.73 KB UMD_PROD
react-art.development.js +0.1% 0.0% 565.29 KB 565.83 KB 123.4 KB 123.44 KB NODE_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.1% 73.26 KB 73.34 KB 22.83 KB 22.86 KB NODE_PROD
ReactART-dev.js +0.1% 0.0% 631.44 KB 631.97 KB 134.37 KB 134.42 KB FB_WWW_DEV

react-server

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-server.development.js 0.0% +0.1% 5.26 KB 5.26 KB 1.68 KB 1.68 KB NODE_DEV
react-server.production.min.js 0.0% 🔺+0.2% 1.15 KB 1.15 KB 642 B 643 B NODE_PROD
react-server-flight.development.js +1.6% +1.4% 24.51 KB 24.89 KB 6.7 KB 6.8 KB NODE_DEV
react-server-flight.production.min.js 🔺+1.7% 🔺+2.1% 6.33 KB 6.43 KB 2.61 KB 2.67 KB NODE_PROD

react-transport-dom-webpack

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-transport-dom-webpack.development.js 0.0% 0.0% 16.34 KB 16.34 KB 4.71 KB 4.71 KB NODE_DEV
react-transport-dom-webpack-node-loader.js 0.0% +0.2% 809 B 809 B 455 B 456 B NODE_ESM
react-transport-dom-webpack.development.js 0.0% 0.0% 17.53 KB 17.53 KB 4.82 KB 4.82 KB UMD_DEV
react-transport-dom-webpack.production.min.js 0.0% 🔺+0.1% 3.89 KB 3.89 KB 1.74 KB 1.75 KB UMD_PROD
react-transport-dom-webpack-server.browser.development.js +1.7% +1.6% 25.63 KB 26.05 KB 6.71 KB 6.82 KB UMD_DEV
react-transport-dom-webpack-server.node.development.js +1.6% +1.5% 25 KB 25.38 KB 6.84 KB 6.94 KB NODE_DEV
react-transport-dom-webpack-server.browser.production.min.js 🔺+1.7% 🔺+2.1% 6.27 KB 6.38 KB 2.61 KB 2.66 KB UMD_PROD
react-transport-dom-webpack-server.node.production.min.js 🔺+1.7% 🔺+2.0% 6.25 KB 6.36 KB 2.55 KB 2.6 KB NODE_PROD
react-transport-dom-webpack-server.browser.development.js +1.6% +1.6% 24.05 KB 24.44 KB 6.58 KB 6.68 KB NODE_DEV
react-transport-dom-webpack-node-register.js 0.0% -0.5% 565 B 565 B 370 B 368 B NODE_ES2015
react-transport-dom-webpack-server.browser.production.min.js 🔺+1.7% 🔺+2.0% 6.06 KB 6.17 KB 2.52 KB 2.57 KB NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-reflection.development.js 0.0% 0.0% 15.88 KB 15.88 KB 4.84 KB 4.84 KB NODE_DEV
react-reconciler.development.js +0.1% 0.0% 620.17 KB 620.71 KB 132.79 KB 132.84 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.1% 🔺+0.1% 82.66 KB 82.75 KB 25.65 KB 25.67 KB NODE_PROD
react-reconciler.profiling.min.js +0.1% +0.1% 86.73 KB 86.81 KB 26.85 KB 26.87 KB NODE_PROFILING

react-debug-tools

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-debug-tools.development.js +0.5% +0.6% 20.28 KB 20.39 KB 5.61 KB 5.64 KB NODE_DEV
react-debug-tools.production.min.js 🔺+6.5% 🔺+9.3% 5.45 KB 5.81 KB 2.12 KB 2.31 KB NODE_PROD

ReactDOM: size: 🔺+0.2%, gzip: 🔺+0.1%

Size changes (stable)

Generated by 🚫 dangerJS against 94543c8

for (var key in require.cache) {
delete require.cache[key];
}
// for (var key in require.cache) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESM breaks this

Remove the actual implementation so we can fill it in from scratch. We'll be starting with the server one but for now let's make both throw.

Also remove the cache entry point in the React package for now. Because it will go through the dispatcher.

The fetch test still fails and our fixture does, too. I'll fix them next.
This implements a naive readCache() in the Flight Server environment only.

It lets us fix up the NodeFetch test to use Server Components.
@gaearon gaearon closed this Nov 22, 2020
@gaearon gaearon deleted the simple-cache branch November 22, 2020 21:34
@gaearon
Copy link
Collaborator Author

gaearon commented Nov 22, 2020

Cleaned up and resubmitted as #20315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants