Remove react-test-renderer/shallow export
Based on
- https://github.com/facebook/react/pull/28489
- https://github.com/facebook/react/pull/28419
Summary
The shallow renderer was extracted from the repo years ago and published by enzyme: https://github.com/enzymejs/react-shallow-renderer
We no longer need to reexport under the react-test-renderer namespace. People can import react-shallow-renderer as needed
How did you test this change?
- Observe shallow.js in react-test-renderer package from standard build
- Run build with changes on this branch
- Observe no more shallow.js export in build output
Comparing: f73d11f0923ace72b867bec6a9f48930c3a4b9b6...a4c5ff602aef5103c4175c9cb9c83a848c6ff104
Critical size changes
Includes critical production bundles, as well as any change greater than 2%:
| Name | +/- | Base | Current | +/- gzip | Base gzip | Current gzip |
|---|---|---|---|---|---|---|
| oss-stable/react-dom/cjs/react-dom.production.min.js | = | 175.94 kB | 175.94 kB | = | 54.54 kB | 54.54 kB |
| oss-experimental/react-dom/cjs/react-dom.production.min.js | = | 172.42 kB | 172.42 kB | = | 53.72 kB | 53.72 kB |
| facebook-www/ReactDOM-prod.classic.js | = | 590.84 kB | 590.84 kB | = | 103.76 kB | 103.76 kB |
| facebook-www/ReactDOM-prod.modern.js | = | 574.36 kB | 574.36 kB | = | 100.83 kB | 100.83 kB |
| oss-experimental/react-test-renderer/shallow.js | +226.87% | 0.07 kB | 0.22 kB | +94.12% | 0.09 kB | 0.17 kB |
| oss-stable-semver/react-test-renderer/shallow.js | +226.87% | 0.07 kB | 0.22 kB | +94.12% | 0.09 kB | 0.17 kB |
| oss-stable/react-test-renderer/shallow.js | +226.87% | 0.07 kB | 0.22 kB | +94.12% | 0.09 kB | 0.17 kB |
| test_utils/ReactAllWarnings.js | Deleted | 64.83 kB | 0.00 kB | Deleted | 16.08 kB | 0.00 kB |
Significant size changes
Includes any change greater than 0.2%:
Expand to show
| Name | +/- | Base | Current | +/- gzip | Base gzip | Current gzip |
|---|---|---|---|---|---|---|
| oss-experimental/react-test-renderer/shallow.js | +226.87% | 0.07 kB | 0.22 kB | +94.12% | 0.09 kB | 0.17 kB |
| oss-stable-semver/react-test-renderer/shallow.js | +226.87% | 0.07 kB | 0.22 kB | +94.12% | 0.09 kB | 0.17 kB |
| oss-stable/react-test-renderer/shallow.js | +226.87% | 0.07 kB | 0.22 kB | +94.12% | 0.09 kB | 0.17 kB |
| test_utils/ReactAllWarnings.js | Deleted | 64.83 kB | 0.00 kB | Deleted | 16.08 kB | 0.00 kB |
Generated by :no_entry_sign: dangerJS against a4c5ff602aef5103c4175c9cb9c83a848c6ff104
It's a bit unfortunate that we never landed a deprecation warning. Instead of removing, can we throw in the entrypoint with a message pointing to the new package?