Fixed ReactSharedInternals export in UMD bundle#22117
Merged
bvaughn merged 1 commit intofacebook:mainfrom Aug 18, 2021
Merged
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) |
gaearon
approved these changes
Aug 18, 2021
rickhanlonii
approved these changes
Aug 18, 2021
Member
|
Is it conceptually possible to flow type this so we catch it if it happens again? |
Contributor
Author
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. |
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Aug 24, 2021
Summary: Post: https://fb.workplace.com/groups/rnsyncsquad/permalink/879923262900946/ This sync includes the following changes: - **[fc3b6a4](facebook/react@fc3b6a411 )**: Fix a few typos ([#22154](facebook/react#22154)) //<Bowen>// - **[986d0e6](facebook/react@986d0e61d )**: [Scheduler] Add tests for isInputPending ([#22140](facebook/react#22140)) //<Andrew Clark>// - **[d54be90](facebook/react@d54be90be )**: Set up test infra for dynamic Scheduler flags ([#22139](facebook/react#22139)) //<Andrew Clark>// - **[7ed0706](facebook/react@7ed0706d7 )**: Remove the warning for setState on unmounted components ([#22114](facebook/react#22114)) //<Dan Abramov>// - **[9eb2aaa](facebook/react@9eb2aaaf8 )**: Fixed ReactSharedInternals export in UMD bundle ([#22117](facebook/react#22117)) //<Brian Vaughn>// - **[bd25570](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
zhengjitf
pushed a commit
to zhengjitf/react
that referenced
this pull request
Apr 15, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #22113
Prior to this PR, the
reactUMD bundle contained twoReactSharedInternalsobjects. The firstReactSharedInternalsobject came from here:react/packages/react/src/ReactSharedInternals.js
Lines 15 to 26 in bd25570
The second
ReactSharedInternalsobject (ReactSharedInternals$1in 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 aSchedulerkey but not aReactCurrentActQueuekey. 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: