-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Remove internal utf8
utility
#17146
Remove internal utf8
utility
#17146
Conversation
@facebook-github-bot label Needs more information @facebook-github-bot label Needs more information Generated by 🚫 dangerJS |
https://github.com/facebook/react-native/blob/master/Libraries/Utilities/utf8.js#L9 This is what causes react-native's utf8 to override node_modules one, not the filename. |
The real question would be: why is it even there? I couldn't find a single require/import of utf8 in the whole repo. |
Outside of the tests, indeed! |
Yea I think we can delete it unless some internal code @fb depends on it. |
@facebook-github-bot label Needs more information @facebook-github-bot label Needs more information Generated by 🚫 dangerJS |
@davidaurelio Can you confirm whether this is used internally at Facebook? If not, I’d be happy to update the patch to remove these files. |
@mathiasbynens You can go ahead and remove it, it won't pass fb internal CI anyway if it's used. |
utf8
utilityutf8
utility
It was not used anyway. Furthermore, removing it makes it possible for developers to use the `utf8` package from npm in combination with React Native. Ref. mathiasbynens/utf8.js#17 Update __utf8.js
@janicduplessis Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Landing, I could not find internal uses but like Janic said, CI should block this from landing if it's indeed used internally. |
Summary: Changelog: [General][Changed] - React sync for revisions 0b61e2698...6cff70a74 (Includes React 16.11.0) This sync includes the following changes: - **[6cff70a74](facebook/react@6cff70a74 )**: [react-interactions] Expost host instance to Scope Query function (#17341) //<Dominic Gannaway>// - **[b8f825877](facebook/react@b8f825877 )**: Split ReactDOM entry point (#17331) //<Dan Abramov>// - **[a7b4d51a2](facebook/react@a7b4d51a2 )**: Warn when doing creat eRoot twice on the same node (another approach) (#17329) //<Dan Abramov>// - **[be3bfa6fa](facebook/react@be3bfa6fa )**: [Flight] Basic Integr ation Test (#17307) //<Dan Abramov>// - **[6cb6b1d66](facebook/react@6cb6b1d66 )**: Add yarn build --unsa fe-partial (#17316) //<Dan Abramov>// - **[38dd17ab9](facebook/react@38dd17ab9 )**: [RN] Hoist static dee pDiffer options object (#17303) //<Moti Zilberman>// - **[61d3dd0e0](facebook/react@61d3dd0e0 )**: Update deepDiffer usa ge in React Native renderer (#17282) //<Moti Zilberman>// - **[e701632ad](facebook/react@e701632ad )**: [react-interactions] Change unmount blur logic to a dedicated event (#17291) //<Dominic Gannaway>// - **[ce4b3e998](facebook/react@ce4b3e998 )**: [react-interactions] Add optional searchNodes to Scope.queryAllNodes (#17293) //<Dominic Gannaway>// - **[dee03049f](facebook/react@dee03049f )**: [Flight] Basic Streaming Suspense Support (#17285) //<Sebastian Markbåge>// - **[f50f39b55](facebook/react@f50f39b55 )**: [Flight] Better compat with http.createServer (#17289) //<Dan Abramov>// - **[345270630](facebook/react@345270630 )**: DevTools cleanup (#17283) //<Brian Vaughn>// - **[cd1bdcd06](facebook/react@cd1bdcd06 )**: [react-interactions] Prevent duplicate onPress firing for keyboard Enter (#17266) //<Dominic Gannaway>// - **[4f02c93c7](facebook/react@4f02c93c7 )**: Fix devtools displaying Anonymous for memo of ref-forwarding components (#17274) //<Waseem Dahman>// - **[053cf0fed](facebook/react@053cf0fed )**: Fix react-is memo and lazy type checks (#17278) //<Brian Vaughn>// - **[0f3838a01](facebook/react@0f3838a01 )**: Remove `debugRenderPhaseSideEffects` flag (#17270) //<Andrew Clark>// - **[cb09dbe0a](facebook/react@cb09dbe0a )**: [react-interactions] Add handleSimulateChildBlur upon DOM node removal (#17225) //<Dominic Gannaway>// - **[6095993d4](facebook/react@6095993d4 )**: Types: findHostInstance_DEPRECATED returns React.ElementRef<HostComponent<mixed>> (#17265) //<Eli White>// - **[62ef25077](facebook/react@62ef25077 )**: Avoid bundling in ponyfill for Object.assign in use-subscription package (#17259) //<Mateusz Burzyński>// - **[f4148b256](facebook/react@f4148b256 )**: [Flight] Move around the Server side a bit (#17251) //<Sebastian Markbåge>// - **[fadc97167](facebook/react@fadc97167 )**: [Flight] Add Client Infrastructure (#17234) //<Sebastian Markbåge>// - **[36fd29f09](facebook/react@36fd29f09 )**: Don't show empty (no work) commits in Profiler (#17253) //<Brian Vaughn>// - **[a2e05b6c1](facebook/react@a2e05b6c1 )**: [Scheduler] Delete old rAF implementation (#17252) //<Andrew Clark>// - **[6dc2734b4](facebook/react@6dc2734b4 )**: Codemod tests to `it.experimental` (#17243) //<Andrew Clark>// - **[273679a78](facebook/react@273679a78 )**: DevTools standalone shell changes: (#17213) //<Brian Vaughn>// - **[d0fc0ba0a](facebook/react@d0fc0ba0a )**: Revert "Dispatch commands to both UIManagers from both renderers (#17211)" (#17232) //<Eli White>// - **[bdcdb69a2](facebook/react@bdcdb69a2 )**: Rename findHostInstance_deprecated to findHostInstance_DEPRECATED (#17228) //<Eli White>// - **[515746c21](facebook/react@515746c21 )**: Add findHostInstance_deprecated to the React Native Renderer (#17224) //<Eli White>// - **[9a35adc96](facebook/react@9a35adc96 )**: Only call Profiler onRender when a descendant had work (#17223) //<Brian Vaughn>// - **[8eee0eb01](facebook/react@8eee0eb01 )**: Dispatch commands to both UIManagers from both renderers (#17211) //<Eli White>// - **[f4e974d26](facebook/react@f4e974d26 )**: Add Experimental Flight Infrastructure (#16398) //<Sebastian Markbåge>// - **[6cd365cac](facebook/react@6cd365cac )**: Don't treat the last row in hidden as deleted if already mounted (#17206) //<Sebastian Markbåge>// - **[048879eda](facebook/react@048879eda )**: [react-interactions] Ensure props on scope query function is always object (#17212) //<Dominic Gannaway>// - **[3497ccc14](facebook/react@3497ccc14 )**: Add guard to handle modified React elements with non-string keys (#17164) //<Brian Vaughn>// - **[3f9c03675](facebook/react@3f9c03675 )**: Typo fix in comment (#17111) //<Deniz Susman>// - **[f6b8d31a7](facebook/react@f6b8d31a7 )**: Rename createSyncRoot to createBlockingRoot (#17165) //<Dan Abramov>// - **[9c02d2654](facebook/react@9c02d2654 )**: docs: Fixed a typo in readme.md (#17119) //<Wilco Fiers>// - **[8075c8505](facebook/react@8075c8505 )**: Update local package versions for 16.10 release //<Andrew Clark>// - **[5faf377df](facebook/react@5faf377df )**: Fixed a style bug in props editor (#17162) //<Brian Vaughn>// - **[f7ec65eeb](facebook/react@f7ec65eeb )**: [react-interactions] Make events non-passive to allow preventDefault (#17136) //<Dominic Gannaway>// - **[1022ee0ec](facebook/react@1022ee0ec )**: Read current time without marking event start time (#17160) //<Andrew Clark>// - **[349cf5acc](facebook/react@349cf5acc )**: Experimental test helper: `it.experimental` (#17149) //<Andrew Clark>// - **[edc234c73](facebook/react@edc234c73 )**: Build script should default to experimental (#17144) //<Andrew Clark>// - **[3cc564547](facebook/react@3cc564547 )**: SuspenseList support in DevTools (#17145) //<Sebastian Markbåge>// - **[68fb58029](facebook/react@68fb58029 )**: Remove unstable_ prefix in various internal uses (#17146) //<Sebastian Markbåge>// - **[7082d5a2d](facebook/react@7082d5a2d )**: Don't build non-experimental www bundles (#17139) //<Andrew Clark>// - **[c47f59331](facebook/react@c47f59331 )**: Move SuspenseList to experimental package (#17130) //<Andrew Clark>// - **[685ed561f](facebook/react@685ed561f )**: Migrate useDeferredValue and useTransition (#17058) //<Luna Ruan>// - **[0b61e2698](facebook/react@0b61e2698 )**: Update RN typings for a shim (#17138) //<Dan Abramov>// Reviewed By: threepointone Differential Revision: D18428149 fbshipit-source-id: 28273be4d7a4c7ec0fe0451cea134ee09a3b4d86
Motivation
As requested by @davidaurelio in mathiasbynens/utf8.js#17 (comment), this makes it possible for developers to use the
utf8
package from npm in combination with React Native.Ref. mathiasbynens/utf8.js#17