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

Upgrade all @babel/* packages to fix DevTools builds #19647

Merged
merged 1 commit into from Aug 20, 2020

Conversation

taneliang
Copy link
Contributor

@taneliang taneliang commented Aug 19, 2020

Summary

As discussed in #19634, DevTools packages' yarn build commands are failing with the following error when run with the latest versions of Node 12 and Node 14:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /home/e-liang/react/node_modules/@babel/helper-compilation-targets/package.json

In babel/babel#11216 (comment), Babel's maintainer's recommends that all @babel/* packages should be updated to fix the error. This PR does that, upgrading all @babel/* packages across the repository, excluding fixtures.

The commit in this PR is cherry picked from a633ac3 (#19634) as @bvaughn requested.

Test Plan

Gathered from discussions in #19634.

Green CI, and:

Build DevTools packages

With latest Node 12 (v12.18.3) (yarn build commands here fail on master):

yarn
yarn build-for-devtools

cd packages/react-devtools-core && rm -rf dist && yarn build
cd ../react-devtools-extensions && rm -rf build && yarn build
cd ../react-devtools-inline && rm -rf dist && yarn build
cd ../react-devtools-shell && rm -rf dist && yarn build

Diff build artifacts to ensure that core packages are not broken

git checkout scheduling-profiler-import # Since the commit in this PR is cherry picked from that PR (#19634), the diff should be identical
yarn

RELEASE_CHANNEL=experimental yarn build
cp -r build ~/react-build-spi-experimental

RELEASE_CHANNEL=stable yarn build
cp -r build ~/react-build-spi-stable

git checkout master
yarn

RELEASE_CHANNEL=experimental yarn build
cp -r build ~/react-build-master-experimental

RELEASE_CHANNEL=stable yarn build
cp -r build ~/react-build-master-stable

cd ~
diff -ENwbur react-build-master-experimental react-build-spi-experimental > experimental.diff
diff -ENwbur react-build-master-stable react-build-spi-stable > stable.diff
# Both diff files uploaded to https://gist.github.com/taneliang/c193548a1d5f07f083486ce859c2edf1

There are about 2300 lines of changes in the main React packages, but I didn't notice anything concerning. I've uploaded the diffs here: https://gist.github.com/taneliang/c193548a1d5f07f083486ce859c2edf1. Most of the differences seem to be one of the following:

@codesandbox-ci
Copy link

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 c99301a:

Sandbox Source
React Configuration

@sizebot
Copy link

sizebot commented Aug 19, 2020

Details of bundled changes.

Comparing: 87b3e2d...c99301a

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.0% -0.0% 685.54 KB 685.21 KB 148.53 KB 148.47 KB RN_FB_DEV
ReactFabric-dev.js -0.0% -0.0% 666.15 KB 665.85 KB 143.9 KB 143.83 KB RN_FB_DEV
ReactNativeRenderer-dev.js -0.0% -0.0% 680.14 KB 679.82 KB 147.68 KB 147.61 KB RN_OSS_DEV
ReactFabric-prod.js -0.0% -0.0% 266.76 KB 266.76 KB 47.23 KB 47.23 KB RN_FB_PROD
ReactNativeRenderer-prod.js -0.0% -0.0% 273.13 KB 273.12 KB 48.56 KB 48.56 KB RN_OSS_PROD
ReactFabric-profiling.js -0.0% -0.0% 278.36 KB 278.35 KB 49.43 KB 49.43 KB RN_FB_PROFILING
ReactNativeRenderer-profiling.js -0.0% -0.0% 284.63 KB 284.63 KB 50.75 KB 50.75 KB RN_OSS_PROFILING
ReactNativeRenderer-prod.js -0.0% -0.0% 273.08 KB 273.08 KB 48.55 KB 48.54 KB RN_FB_PROD
ReactNativeRenderer-profiling.js -0.0% -0.0% 284.59 KB 284.58 KB 50.73 KB 50.73 KB RN_FB_PROFILING
ReactFabric-dev.js -0.0% -0.1% 660.74 KB 660.45 KB 143.04 KB 142.96 KB RN_OSS_DEV
ReactFabric-prod.js -0.0% -0.0% 266.8 KB 266.8 KB 47.25 KB 47.25 KB RN_OSS_PROD
ReactFabric-profiling.js -0.0% -0.0% 278.4 KB 278.39 KB 49.45 KB 49.45 KB RN_OSS_PROFILING

eslint-plugin-react-hooks

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
eslint-plugin-react-hooks.development.js -3.9% -0.1% 87.11 KB 83.67 KB 20.04 KB 20.02 KB NODE_DEV
eslint-plugin-react-hooks.production.min.js -0.5% 🔺+2.1% 24.43 KB 24.31 KB 8.26 KB 8.43 KB NODE_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-prod.js -0.0% -0.0% 245.29 KB 245.29 KB 43.21 KB 43.21 KB FB_WWW_PROD
react-art.development.js -0.0% -0.0% 667 KB 666.83 KB 142.11 KB 142.07 KB UMD_DEV
react-art.production.min.js -0.0% -0.0% 109.82 KB 109.82 KB 34.06 KB 34.06 KB UMD_PROD
react-art.development.js -0.0% -0.0% 569.39 KB 569.24 KB 124.38 KB 124.34 KB NODE_DEV
react-art.production.min.js -0.0% -0.0% 74.77 KB 74.76 KB 23.18 KB 23.18 KB NODE_PROD
ReactART-dev.js -0.1% -0.1% 632.04 KB 631.64 KB 134.15 KB 134.08 KB FB_WWW_DEV

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -0.0% -0.0% 605.45 KB 605.27 KB 127.36 KB 127.31 KB UMD_DEV
react-test-renderer.production.min.js -0.0% -0.0% 76.96 KB 76.96 KB 24.14 KB 24.14 KB UMD_PROD
react-test-renderer.development.js -0.0% -0.0% 576.87 KB 576.7 KB 125.93 KB 125.89 KB NODE_DEV
react-test-renderer.production.min.js -0.0% -0.0% 76.75 KB 76.74 KB 23.79 KB 23.78 KB NODE_PROD
ReactTestRenderer-dev.js -0.1% -0.1% 592.36 KB 591.88 KB 127.14 KB 127.06 KB FB_WWW_DEV
ReactTestRenderer-dev.js -0.1% -0.1% 586.99 KB 586.51 KB 126.87 KB 126.8 KB RN_FB_DEV
ReactTestRenderer-prod.js -0.0% -0.0% 232.33 KB 232.32 KB 42.2 KB 42.19 KB RN_FB_PROD
ReactTestRenderer-profiling.js -0.0% -0.0% 243.72 KB 243.72 KB 44.35 KB 44.35 KB RN_FB_PROFILING

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js -0.0% -0.0% 877.95 KB 877.78 KB 201 KB 200.96 KB NODE_DEV
ReactDOMForked-prod.js -0.0% -0.0% 392.98 KB 392.98 KB 72.13 KB 72.13 KB FB_WWW_PROD
react-dom-server.node.development.js -0.0% -0.0% 137.08 KB 137.08 KB 36.38 KB 36.38 KB NODE_DEV
react-dom.production.min.js -0.0% 0.0% 119.37 KB 119.37 KB 38.4 KB 38.4 KB NODE_PROD
ReactDOMForked-profiling.js -0.0% -0.0% 406.55 KB 406.55 KB 74.59 KB 74.59 KB FB_WWW_PROFILING
react-dom-server.browser.development.js -0.0% -0.0% 143.16 KB 143.16 KB 36.58 KB 36.58 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 12.9 KB 12.9 KB 5.05 KB 5.05 KB UMD_PROD
ReactDOMTesting-dev.js -0.0% -0.0% 950.36 KB 950.13 KB 212.88 KB 212.81 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% 0.0% 61.02 KB 61.02 KB 17.68 KB 17.68 KB NODE_DEV
ReactDOMTesting-prod.js -0.0% -0.0% 392.93 KB 392.92 KB 73.52 KB 73.52 KB FB_WWW_PROD
react-dom.development.js -0.0% -0.0% 922.37 KB 922.2 KB 203.47 KB 203.42 KB UMD_DEV
react-dom.production.min.js -0.0% -0.0% 119.33 KB 119.33 KB 39.04 KB 39.04 KB UMD_PROD
react-dom.profiling.min.js -0.0% -0.0% 123.23 KB 123.23 KB 40.29 KB 40.29 KB UMD_PROFILING
ReactDOMForked-dev.js -0.0% -0.0% 993.37 KB 993.14 KB 219.97 KB 219.89 KB FB_WWW_DEV
react-dom.profiling.min.js -0.0% -0.0% 123.44 KB 123.43 KB 39.65 KB 39.65 KB NODE_PROFILING
ReactDOM-dev.js -0.0% -0.0% 986.39 KB 986.16 KB 219.1 KB 219.03 KB FB_WWW_DEV
ReactDOM-prod.js -0.0% -0.0% 389.46 KB 389.45 KB 71.44 KB 71.43 KB FB_WWW_PROD
react-dom-server.browser.development.js -0.0% -0.0% 135.81 KB 135.81 KB 36.13 KB 36.13 KB NODE_DEV
ReactDOM-profiling.js -0.0% -0.0% 402.59 KB 402.58 KB 73.84 KB 73.84 KB FB_WWW_PROFILING
ReactDOMServer-dev.js -1.1% -0.2% 147.01 KB 145.37 KB 37.33 KB 37.27 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% 0.0% 66.02 KB 66.02 KB 18.21 KB 18.21 KB UMD_DEV

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (stable)

Generated by 🚫 dangerJS against c99301a

@sizebot
Copy link

sizebot commented Aug 19, 2020

Details of bundled changes.

Comparing: 87b3e2d...c99301a

eslint-plugin-react-hooks

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
eslint-plugin-react-hooks.development.js -3.9% -0.1% 87.12 KB 83.68 KB 20.04 KB 20.02 KB NODE_DEV
eslint-plugin-react-hooks.production.min.js -0.5% 🔺+2.1% 24.45 KB 24.33 KB 8.27 KB 8.44 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.0% -0.0% 680.16 KB 679.83 KB 147.69 KB 147.62 KB RN_OSS_DEV
ReactNativeRenderer-prod.js -0.0% -0.0% 273.14 KB 273.13 KB 48.57 KB 48.57 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js -0.0% -0.0% 284.65 KB 284.64 KB 50.76 KB 50.76 KB RN_OSS_PROFILING
ReactFabric-dev.js -0.0% -0.1% 660.76 KB 660.46 KB 143.05 KB 142.97 KB RN_OSS_DEV
ReactFabric-prod.js -0.0% -0.0% 266.81 KB 266.81 KB 47.25 KB 47.25 KB RN_OSS_PROD
ReactFabric-profiling.js -0.0% -0.0% 278.41 KB 278.4 KB 49.46 KB 49.46 KB RN_OSS_PROFILING

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js -0.0% -0.0% 694.11 KB 693.94 KB 147.12 KB 147.07 KB UMD_DEV
react-art.production.min.js -0.0% -0.0% 112.8 KB 112.79 KB 34.96 KB 34.96 KB UMD_PROD
react-art.development.js -0.0% -0.0% 595.23 KB 595.08 KB 129.3 KB 129.26 KB NODE_DEV
react-art.production.min.js -0.0% -0.0% 77.68 KB 77.68 KB 24.04 KB 24.04 KB NODE_PROD
ReactART-dev.js -0.1% -0.1% 622.03 KB 621.63 KB 132.12 KB 132.05 KB FB_WWW_DEV

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -0.0% -0.0% 605.47 KB 605.29 KB 127.38 KB 127.33 KB UMD_DEV
react-test-renderer.production.min.js -0.0% -0.0% 76.99 KB 76.98 KB 24.16 KB 24.16 KB UMD_PROD
react-test-renderer.development.js -0.0% -0.0% 576.9 KB 576.73 KB 125.94 KB 125.9 KB NODE_DEV
react-test-renderer.production.min.js -0.0% 0.0% 76.77 KB 76.77 KB 23.8 KB 23.8 KB NODE_PROD
ReactTestRenderer-dev.js -0.1% -0.1% 592.37 KB 591.89 KB 127.15 KB 127.07 KB FB_WWW_DEV
ReactTestRenderer-dev.js -0.1% -0.1% 587 KB 586.52 KB 126.87 KB 126.81 KB RN_FB_DEV
ReactTestRenderer-prod.js -0.0% -0.0% 232.34 KB 232.34 KB 42.21 KB 42.2 KB RN_FB_PROD
ReactTestRenderer-profiling.js -0.0% -0.0% 243.74 KB 243.73 KB 44.36 KB 44.36 KB RN_FB_PROFILING

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js -0.0% -0.0% 913.71 KB 913.48 KB 207.53 KB 207.46 KB NODE_DEV
react-dom-server.node.development.js -0.0% -0.0% 138.59 KB 138.59 KB 36.6 KB 36.59 KB NODE_DEV
react-dom.production.min.js -0.0% -0.0% 123.98 KB 123.97 KB 39.78 KB 39.78 KB NODE_PROD
react-dom-server.browser.development.js -0.0% -0.0% 144.75 KB 144.74 KB 36.78 KB 36.78 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 12.91 KB 12.91 KB 5.06 KB 5.06 KB UMD_PROD
ReactDOMTesting-dev.js -0.0% -0.0% 922.3 KB 922.07 KB 207.38 KB 207.32 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% 0.0% 61.03 KB 61.03 KB 17.69 KB 17.69 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 5.52 KB 5.52 KB 1.84 KB 1.84 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 12.74 KB 12.74 KB 4.98 KB 4.98 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.17 KB 1.17 KB 667 B 666 B NODE_PROD
react-dom.development.js -0.0% -0.0% 959.89 KB 959.66 KB 210.1 KB 210.04 KB UMD_DEV
react-dom.production.min.js -0.0% -0.0% 123.88 KB 123.87 KB 40.48 KB 40.48 KB UMD_PROD
react-dom.profiling.min.js -0.0% -0.0% 129.12 KB 129.12 KB 42.1 KB 42.1 KB UMD_PROFILING
ReactDOMForked-dev.js -0.0% -0.0% 967.87 KB 967.64 KB 215.22 KB 215.14 KB FB_WWW_DEV
react-dom.profiling.min.js -0.0% -0.0% 129.41 KB 129.41 KB 41.38 KB 41.38 KB NODE_PROFILING
ReactDOM-dev.js -0.0% -0.0% 960.9 KB 960.67 KB 214.43 KB 214.36 KB FB_WWW_DEV
ReactDOM-prod.js 0.0% -0.0% 378.31 KB 378.31 KB 69.75 KB 69.75 KB FB_WWW_PROD
react-dom-server.browser.development.js -0.0% -0.0% 137.32 KB 137.32 KB 36.34 KB 36.34 KB NODE_DEV
ReactDOM-profiling.js 0.0% -0.0% 391.39 KB 391.39 KB 72.15 KB 72.15 KB FB_WWW_PROFILING
ReactDOMServer-dev.js -1.1% -0.2% 142.98 KB 141.34 KB 36.33 KB 36.25 KB FB_WWW_DEV

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against c99301a

@bvaughn bvaughn self-requested a review August 19, 2020 14:07
@bvaughn bvaughn self-assigned this Aug 19, 2020
@bvaughn
Copy link
Contributor

bvaughn commented Aug 19, 2020

Excellent. Thanks for splitting this off.

@bvaughn
Copy link
Contributor

bvaughn commented Aug 19, 2020

Confirmed I am able to build the DevTools extension using Node v12.18.3 and v14.5.0 with these deps.

Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

These changes look good to me but I am going to run the PR by the rest of the team before landing, to make sure there are no concerns about changing deps at the moment.

@bvaughn
Copy link
Contributor

bvaughn commented Aug 20, 2020

I haven't heard any concerns about changing deps, and the delta between the build artifacts looks like it's strictly an improvement (although minor) so let's go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants