-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Fixed ReactSharedInternals export in UMD bundle #22117
Conversation
Comparing: bd25570...130b59e Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
Is it conceptually possible to flow type this so we catch it if it happens again? |
Unclear, since (in this case) the missing properties weren't part of the statically declared type, but rather, were dynamic properties added in the I'm going to merge this fix now (since the UMD bundle is broken) but we can follow up on this. |
Summary: Post: https://fb.workplace.com/groups/rnsyncsquad/permalink/879923262900946/ This sync includes the following changes: - **[fc3b6a411](facebook/react@fc3b6a411 )**: Fix a few typos ([#22154](facebook/react#22154)) //<Bowen>// - **[986d0e61d](facebook/react@986d0e61d )**: [Scheduler] Add tests for isInputPending ([#22140](facebook/react#22140)) //<Andrew Clark>// - **[d54be90be](facebook/react@d54be90be )**: Set up test infra for dynamic Scheduler flags ([#22139](facebook/react#22139)) //<Andrew Clark>// - **[7ed0706d7](facebook/react@7ed0706d7 )**: Remove the warning for setState on unmounted components ([#22114](facebook/react#22114)) //<Dan Abramov>// - **[9eb2aaaf8](facebook/react@9eb2aaaf8 )**: Fixed ReactSharedInternals export in UMD bundle ([#22117](facebook/react#22117)) //<Brian Vaughn>// - **[bd255700d](facebook/react@bd255700d )**: Show a soft error when a text string or number is supplied as a child to non text wrappers ([#22109](facebook/react#22109)) //<Sota>// Changelog: [General][Changed] - React Native sync for revisions 424fe58...bd5bf55 jest_e2e[run_all_tests] Reviewed By: yungsters Differential Revision: D30485521 fbshipit-source-id: c5b92356e9e666eae94536ed31b8de43536419f8
Resolves #22113
Prior to this PR, the
react
UMD bundle contained twoReactSharedInternals
objects. The firstReactSharedInternals
object came from here:react/packages/react/src/ReactSharedInternals.js
Lines 15 to 26 in bd25570
The second
ReactSharedInternals
object (ReactSharedInternals$1
in the bundle) came from here:react/packages/react/src/forks/ReactSharedInternals.umd.js
Lines 15 to 28 in bd25570
The second one is the one that ended up being shared via
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
. It had aScheduler
key but not aReactCurrentActQueue
key. The fix was to make sure both keys got added to the UMD override.Testing
Re-built the bundle:
Then inspected the output at:
Also dropped both into a small repro app: